1 | #*------------------------------------------------------------------- |
---|
2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
3 | * |
---|
4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
6 | * http://www.enq.ufrgs.br/alsoc. |
---|
7 | * |
---|
8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | * Sample file for model pfr |
---|
17 | * |
---|
18 | * |
---|
19 | * Adiabatic Production of Acetic Anhydride with a PFR |
---|
20 | * |
---|
21 | * Based on Example 8-6 of Elements of Chemical Reaction Engineering |
---|
22 | * Second Edition H. Scott Fogler |
---|
23 | * |
---|
24 | * |
---|
25 | *-------------------------------------------------------------------- |
---|
26 | * |
---|
27 | * This sample file needs VRTherm (www.vrtech.com.br) to run. |
---|
28 | * |
---|
29 | *---------------------------------------------------------------------- |
---|
30 | * Author: Rafael de P. Soares |
---|
31 | * Paula B. Staudt |
---|
32 | * $Id: sample_pfr.mso 170 2007-03-01 18:35:36Z bicca $ |
---|
33 | *--------------------------------------------------------------------*# |
---|
34 | |
---|
35 | using "reactors/pfr"; |
---|
36 | |
---|
37 | FlowSheet PFR_AceticAnhydride |
---|
38 | |
---|
39 | PARAMETERS |
---|
40 | |
---|
41 | PP as Plugin (Brief="Physical Properties",File="vrpp"); |
---|
42 | NComp as Integer; |
---|
43 | |
---|
44 | DEVICES |
---|
45 | |
---|
46 | s1 as source; |
---|
47 | Reac as pfr; |
---|
48 | |
---|
49 | SET |
---|
50 | |
---|
51 | PP.Components = ["acetone", "acetic anhydride", "methane" ]; |
---|
52 | PP.LiquidModel = "PR"; |
---|
53 | PP.VapourModel = "PR"; |
---|
54 | |
---|
55 | NComp = PP.NumberOfComponents; |
---|
56 | |
---|
57 | Reac.NDisc = 10; |
---|
58 | Reac.Across = 0.7 * 'in^2'; |
---|
59 | Reac.L = 2.28 * 'm'; |
---|
60 | Reac.NReac = 1; |
---|
61 | |
---|
62 | # Reaction 1: A -> B + C |
---|
63 | Reac.stoic(:,1) = [-1, 1, 1]; |
---|
64 | |
---|
65 | EQUATIONS |
---|
66 | |
---|
67 | for z in [1:Reac.NDisc] |
---|
68 | |
---|
69 | "Reaction Rate = k*C(1)" |
---|
70 | Reac.r(1,z) = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z); |
---|
71 | |
---|
72 | "Heat of reaction" |
---|
73 | Reac.Hr(1,z) = -80.77 * 'kJ/mol'; |
---|
74 | |
---|
75 | "Pressure Drop (no pressure drop)" |
---|
76 | Reac.str(z+1).P = Reac.str(z).P; |
---|
77 | |
---|
78 | end |
---|
79 | |
---|
80 | SPECIFY |
---|
81 | s1.Outlet.F = 138/1000 * 'kmol/h'; |
---|
82 | s1.Outlet.T = 1035 * 'K'; |
---|
83 | s1.Outlet.P = 1.6 * 'atm'; |
---|
84 | s1.Outlet.z = [1, 0, 0]; |
---|
85 | |
---|
86 | "Adiabatic" |
---|
87 | Reac.q = 0 * 'J/s'; |
---|
88 | |
---|
89 | CONNECTIONS |
---|
90 | |
---|
91 | s1.Outlet to Reac.Inlet; |
---|
92 | |
---|
93 | INITIAL |
---|
94 | |
---|
95 | for z in [2:Reac.NDisc+1] |
---|
96 | |
---|
97 | Reac.str(z).T = Reac.Inlet.T; |
---|
98 | Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1); |
---|
99 | |
---|
100 | end |
---|
101 | |
---|
102 | OPTIONS |
---|
103 | # This model can be solved in both steady or dynamic |
---|
104 | Dynamic = true; |
---|
105 | TimeStep = 0.05; |
---|
106 | TimeEnd = 3; |
---|
107 | NLASolver = "sundials"; |
---|
108 | #DAESolver = "dassl"; |
---|
109 | end |
---|