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 | * EMSO Sample file showing an Adiabatic Production of Acetic Anhydride with a PFR and recycle |
---|
17 | * |
---|
18 | * |
---|
19 | * Based on Example 8-6 of Elements of Chemical Reaction Engineering |
---|
20 | * Second Edition H. Scott Fogler |
---|
21 | * |
---|
22 | * |
---|
23 | *-------------------------------------------------------------------- |
---|
24 | * |
---|
25 | * This sample file needs VRTherm (www.vrtech.com.br) to run. |
---|
26 | * |
---|
27 | *---------------------------------------------------------------------- |
---|
28 | * Author: Rafael de P. Soares |
---|
29 | * Paula B. Staudt |
---|
30 | * Gerson B. Bicca |
---|
31 | * $Id: sample_process.mso 213 2007-03-15 19:40:55Z rafael $ |
---|
32 | *--------------------------------------------------------------------*# |
---|
33 | using "heat_exchangers/heater"; |
---|
34 | using "heat_exchangers/Mheatex"; |
---|
35 | using "reactors/pfr"; |
---|
36 | |
---|
37 | FlowSheet AceticAnhydride_Process |
---|
38 | |
---|
39 | PARAMETERS |
---|
40 | |
---|
41 | PP as Plugin (Brief="Physical Properties", |
---|
42 | Type = "PP", |
---|
43 | Components = ["acetone", "acetic anhydride", "methane"], |
---|
44 | LiquidModel = "PR", |
---|
45 | VapourModel = "PR" |
---|
46 | ); |
---|
47 | NComp as Integer; |
---|
48 | |
---|
49 | DEVICES |
---|
50 | |
---|
51 | Feed as simple_source; # A Feed Stream |
---|
52 | Mheater as Mheatex; # A Multi-stream Heat Exchanger |
---|
53 | Cooler as cooler; # A Cooler |
---|
54 | Heater as heater; # A heater |
---|
55 | Reac as pfr; # A PFR Reactor |
---|
56 | Product as sink; # Product |
---|
57 | Heat_1 as energy_source; # Heat Supplied |
---|
58 | Cold_2 as energy_source; # Cold Supplied |
---|
59 | SET |
---|
60 | |
---|
61 | NComp = PP.NumberOfComponents; |
---|
62 | Mheater.Nhot = 1; |
---|
63 | Mheater.Ncold = 1; |
---|
64 | Heater.Ninlet = 1; |
---|
65 | Cooler.Ninlet = 1; |
---|
66 | Heater.Kvalues = "no";# Faster convergence |
---|
67 | Cooler.Kvalues = "no";# Faster convergence |
---|
68 | Mheater.FlowDirection = "counter"; |
---|
69 | |
---|
70 | Reac.NDisc = 10; |
---|
71 | Reac.Across = 0.7 * 'in^2'; |
---|
72 | Reac.L = 2.28 * 'm'; |
---|
73 | Reac.NReac = 1; |
---|
74 | |
---|
75 | # Reaction 1: A -> B + C |
---|
76 | Reac.stoic(:,1) = [-1, 1, 1]; |
---|
77 | |
---|
78 | EQUATIONS |
---|
79 | |
---|
80 | for z in [1:Reac.NDisc] |
---|
81 | |
---|
82 | "Reaction Rate = k*C(1)" |
---|
83 | Reac.r(1,z) = exp(34.34 - (34222 * 'K') / Reac.str(z).T)*'1/s' * Reac.C(1,z); |
---|
84 | |
---|
85 | "Heat of reaction" |
---|
86 | Reac.Hr(1,z) = -80.77 * 'kJ/mol'; |
---|
87 | |
---|
88 | "Pressure Drop (no pressure drop)" |
---|
89 | Reac.str(z+1).P = Reac.str(z).P; |
---|
90 | |
---|
91 | end |
---|
92 | |
---|
93 | SPECIFY |
---|
94 | |
---|
95 | Feed.Outlet.F = 1 * 'kmol/h'; |
---|
96 | Feed.Outlet.T = 350 * 'K'; |
---|
97 | Feed.Outlet.P = 1.6 * 'atm'; |
---|
98 | Feed.Outlet.z = [1, 0, 0]; |
---|
99 | |
---|
100 | Mheater.Method.Fc = 1; |
---|
101 | Mheater.OutletCold(1).T = 400*'K'; |
---|
102 | |
---|
103 | Mheater.OutletHot(1).P = 1.5 * 'atm'; |
---|
104 | Mheater.OutletCold(1).P = 1.6 * 'atm'; |
---|
105 | |
---|
106 | Heater.Outlet.T = 1035*'K'; |
---|
107 | Heater.Outlet.P = 1.6 * 'atm'; |
---|
108 | |
---|
109 | Cooler.Outlet.T = 400*'K'; |
---|
110 | Cooler.Outlet.P = 1.5 * 'atm'; |
---|
111 | |
---|
112 | Reac.q = 0 * 'J/s'; |
---|
113 | |
---|
114 | CONNECTIONS |
---|
115 | |
---|
116 | Feed.Outlet to Mheater.InletCold(1); |
---|
117 | Mheater.OutletCold(1) to Heater.Inlet(1); |
---|
118 | Heater.Outlet to Reac.Inlet; |
---|
119 | Reac.Outlet to Mheater.InletHot(1); |
---|
120 | Mheater.OutletHot(1) to Cooler.Inlet(1); |
---|
121 | Cooler.Outlet to Product.Inlet; |
---|
122 | Heat_1.OutletQ to Heater.InletQ; |
---|
123 | Cold_2.OutletQ to Cooler.InletQ; |
---|
124 | |
---|
125 | INITIAL |
---|
126 | |
---|
127 | for z in [2:Reac.NDisc+1] |
---|
128 | |
---|
129 | Reac.str(z).T = Reac.Inlet.T; |
---|
130 | Reac.str(z).z(1:NComp-1) = Reac.Inlet.z(1:NComp-1); |
---|
131 | |
---|
132 | end |
---|
133 | |
---|
134 | OPTIONS |
---|
135 | TimeStep = 0.05; |
---|
136 | TimeEnd = 10; |
---|
137 | Dynamic = true; |
---|
138 | DAESolver( |
---|
139 | File = "dasslc", |
---|
140 | RelativeAccuracy = 1e-4 |
---|
141 | ); |
---|
142 | end |
---|