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 | * Model of a tray |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | * - Streams |
---|
19 | * * a liquid outlet stream |
---|
20 | * * a liquid inlet stream |
---|
21 | * * a vapour outlet stream |
---|
22 | * * a vapour inlet stream |
---|
23 | * * a feed stream |
---|
24 | * |
---|
25 | * - Assumptions |
---|
26 | * * both phases (liquid and vapour) exists all the time |
---|
27 | * * thermodymanic equilibrium (Murphree plate efficiency=1) |
---|
28 | * * no entrainment of liquid or vapour phase |
---|
29 | * * no weeping |
---|
30 | * * the dymanics in the downcomer are neglected |
---|
31 | * |
---|
32 | * - Tray hydraulics: Roffel B.,Betlem B.H.L.,Ruijter J.A.F. (2000) |
---|
33 | * Computers and Chemical Engineering |
---|
34 | * Frauke Reepmeyer, Jens-Uwe Repke and Günter Wozny (2003) |
---|
35 | * Chem. Eng. Technol. 26 (2003) 1 |
---|
36 | * |
---|
37 | * - Specify: |
---|
38 | * * the Feed stream |
---|
39 | * * the Liquid inlet stream |
---|
40 | * * the Vapour inlet stream |
---|
41 | * * the Vapour outlet flow (OutletV.F) |
---|
42 | * |
---|
43 | * - Initial: |
---|
44 | * * the plate temperature (OutletL.T) |
---|
45 | * * the liquid height (Level) or the liquid flow OutletL.F |
---|
46 | * * (NoComps - 1) OutletL compositions |
---|
47 | * |
---|
48 | *---------------------------------------------------------------------- |
---|
49 | * Author: Paula B. Staudt |
---|
50 | * $Id: tray.mso 124 2007-01-19 17:54:55Z rafael $ |
---|
51 | *--------------------------------------------------------------------*# |
---|
52 | |
---|
53 | using "streams"; |
---|
54 | |
---|
55 | Model trayBasic |
---|
56 | |
---|
57 | PARAMETERS |
---|
58 | outer PP as Plugin; |
---|
59 | outer NComp as Integer; |
---|
60 | V as volume(Brief="Total Volume of the tray"); |
---|
61 | Q as heat_rate (Brief="Rate of heat supply"); |
---|
62 | Ap as area (Brief="Plate area = Atray - Adowncomer"); |
---|
63 | |
---|
64 | VARIABLES |
---|
65 | in Inlet as stream; |
---|
66 | in InletL as stream; |
---|
67 | in InletV as stream; |
---|
68 | out OutletL as liquid_stream; |
---|
69 | out OutletV as vapour_stream; |
---|
70 | |
---|
71 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
72 | ML as mol (Brief="Molar liquid holdup"); |
---|
73 | MV as mol (Brief="Molar vapour holdup"); |
---|
74 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
75 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
76 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
77 | Level as length (Brief="Height of clear liquid on plate"); |
---|
78 | yideal(NComp) as fraction; |
---|
79 | Emv as Real (Brief = "Murphree efficiency"); |
---|
80 | |
---|
81 | EQUATIONS |
---|
82 | "Component Molar Balance" |
---|
83 | diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z |
---|
84 | - OutletL.F*OutletL.z - OutletV.F*OutletV.z; |
---|
85 | |
---|
86 | "Energy Balance" |
---|
87 | diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h |
---|
88 | - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ); |
---|
89 | |
---|
90 | "Molar Holdup" |
---|
91 | M = ML*OutletL.z + MV*OutletV.z; |
---|
92 | |
---|
93 | "Energy Holdup" |
---|
94 | E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; |
---|
95 | |
---|
96 | "Mol fraction normalisation" |
---|
97 | sum(OutletL.z)= 1.0; |
---|
98 | sum(OutletL.z)= sum(OutletV.z); |
---|
99 | |
---|
100 | "Liquid Volume" |
---|
101 | vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); |
---|
102 | "Vapour Volume" |
---|
103 | vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
104 | |
---|
105 | "Chemical Equilibrium" |
---|
106 | PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = |
---|
107 | PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; |
---|
108 | |
---|
109 | "Murphree Efficiency" |
---|
110 | OutletV.z = Emv * (yideal - InletV.z) + InletV.z; |
---|
111 | |
---|
112 | "Thermal Equilibrium" |
---|
113 | OutletV.T = OutletL.T; |
---|
114 | |
---|
115 | "Mechanical Equilibrium" |
---|
116 | OutletV.P = OutletL.P; |
---|
117 | |
---|
118 | "Geometry Constraint" |
---|
119 | V = ML* vL + MV*vV; |
---|
120 | |
---|
121 | "Level of clear liquid over the weir" |
---|
122 | Level = ML*vL/Ap; |
---|
123 | end |
---|
124 | |
---|
125 | Model tray as trayBasic |
---|
126 | |
---|
127 | PARAMETERS |
---|
128 | Ah as area (Brief="Total holes area"); |
---|
129 | lw as length (Brief="Weir length"); |
---|
130 | g as acceleration (Default=9.81); |
---|
131 | hw as length (Brief="Weir height"); |
---|
132 | beta as fraction (Brief="Aeration fraction"); |
---|
133 | alfa as fraction (Brief="Dry pressure drop coefficient"); |
---|
134 | |
---|
135 | VARIABLES |
---|
136 | rhoL as dens_mass; |
---|
137 | rhoV as dens_mass; |
---|
138 | |
---|
139 | EQUATIONS |
---|
140 | "Liquid Density" |
---|
141 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
142 | "Vapour Density" |
---|
143 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
144 | |
---|
145 | if Level > (beta * hw) then |
---|
146 | "Francis Equation" |
---|
147 | OutletL.F = 1.84*"m^0.5/s"*lw*((Level-(beta*hw))/(beta))^2/vL; |
---|
148 | else |
---|
149 | "Low level" |
---|
150 | OutletL.F = 0 * "mol/h"; |
---|
151 | end |
---|
152 | |
---|
153 | end |
---|
154 | |
---|
155 | #*------------------------------------------------------------------- |
---|
156 | * Model of a tray with reaction |
---|
157 | *-------------------------------------------------------------------*# |
---|
158 | Model trayReact |
---|
159 | |
---|
160 | PARAMETERS |
---|
161 | outer PP as Plugin; |
---|
162 | outer NComp as Integer; |
---|
163 | V as volume(Brief="Total Volume of the tray"); |
---|
164 | Q as power (Brief="Rate of heat supply"); |
---|
165 | Ap as area (Brief="Plate area = Atray - Adowncomer"); |
---|
166 | |
---|
167 | Ah as area (Brief="Total holes area"); |
---|
168 | lw as length (Brief="Weir length"); |
---|
169 | g as acceleration (Default=9.81); |
---|
170 | hw as length (Brief="Weir height"); |
---|
171 | beta as fraction (Brief="Aeration fraction"); |
---|
172 | alfa as fraction (Brief="Dry pressure drop coefficient"); |
---|
173 | |
---|
174 | stoic(NComp) as Real(Brief="Stoichiometric matrix"); |
---|
175 | Hr as energy_mol; |
---|
176 | Pstartup as pressure; |
---|
177 | |
---|
178 | VARIABLES |
---|
179 | in Inlet as stream; |
---|
180 | in InletL as stream; |
---|
181 | in InletV as stream; |
---|
182 | out OutletL as liquid_stream; |
---|
183 | out OutletV as vapour_stream; |
---|
184 | |
---|
185 | yideal(NComp) as fraction; |
---|
186 | Emv as Real (Brief = "Murphree efficiency"); |
---|
187 | |
---|
188 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
189 | ML as mol (Brief="Molar liquid holdup"); |
---|
190 | MV as mol (Brief="Molar vapour holdup"); |
---|
191 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
192 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
193 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
194 | Level as length (Brief="Height of clear liquid on plate"); |
---|
195 | Vol as volume; |
---|
196 | |
---|
197 | rhoL as dens_mass; |
---|
198 | rhoV as dens_mass; |
---|
199 | r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s"); |
---|
200 | C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l"); |
---|
201 | |
---|
202 | EQUATIONS |
---|
203 | "Molar Concentration" |
---|
204 | OutletL.z = vL * C; |
---|
205 | |
---|
206 | "Component Molar Balance" |
---|
207 | diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z |
---|
208 | - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL; |
---|
209 | |
---|
210 | "Energy Balance" |
---|
211 | diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h |
---|
212 | - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r * vL*ML; |
---|
213 | |
---|
214 | "Molar Holdup" |
---|
215 | M = ML*OutletL.z + MV*OutletV.z; |
---|
216 | |
---|
217 | "Energy Holdup" |
---|
218 | E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; |
---|
219 | |
---|
220 | "Mol fraction normalisation" |
---|
221 | sum(OutletL.z)= 1.0; |
---|
222 | |
---|
223 | "Liquid Volume" |
---|
224 | vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); |
---|
225 | "Vapour Volume" |
---|
226 | vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
227 | |
---|
228 | "Thermal Equilibrium" |
---|
229 | OutletV.T = OutletL.T; |
---|
230 | |
---|
231 | "Mechanical Equilibrium" |
---|
232 | OutletV.P = OutletL.P; |
---|
233 | |
---|
234 | "vaporization fraction " |
---|
235 | OutletV.v = 1.0; |
---|
236 | OutletL.v = 0.0; |
---|
237 | |
---|
238 | "Level of clear liquid over the weir" |
---|
239 | Level = ML*vL/Ap; |
---|
240 | |
---|
241 | Vol = ML*vL; |
---|
242 | |
---|
243 | "Liquid Density" |
---|
244 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
245 | "Vapour Density" |
---|
246 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
247 | |
---|
248 | if Level > (beta * hw) then |
---|
249 | "Francis Equation" |
---|
250 | OutletL.F = (1.84*"1/s"*lw*((Level-(beta*hw))/(beta))^2/vL); |
---|
251 | else |
---|
252 | "Low level" |
---|
253 | OutletL.F = 0 * "mol/h"; |
---|
254 | end |
---|
255 | |
---|
256 | |
---|
257 | "Pressure Drop through the tray" |
---|
258 | OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/"Pa"))/2 * |
---|
259 | Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * "atm") / (alfa*rhoV) ); |
---|
260 | |
---|
261 | |
---|
262 | "Chemical Equilibrium" |
---|
263 | PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = |
---|
264 | PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; |
---|
265 | |
---|
266 | OutletV.z = Emv * (yideal - InletV.z) + InletV.z; |
---|
267 | |
---|
268 | sum(OutletL.z)= sum(OutletV.z); |
---|
269 | |
---|
270 | "Geometry Constraint" |
---|
271 | V = ML* vL + MV*vV; |
---|
272 | end |
---|