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 | * Author: Paula B. Staudt |
---|
17 | * $Id: tray.mso 453 2008-02-07 19:26:42Z paula $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "streams"; |
---|
21 | |
---|
22 | Model trayBasic |
---|
23 | ATTRIBUTES |
---|
24 | Pallete = false; |
---|
25 | Icon = "icon/Tray"; |
---|
26 | Brief = "Basic equations of a tray column model."; |
---|
27 | Info = |
---|
28 | "This model contains only the main equations of a column tray equilibrium model without |
---|
29 | the hidraulic equations. |
---|
30 | |
---|
31 | == Assumptions == |
---|
32 | * both phases (liquid and vapour) exists all the time; |
---|
33 | * thermodymanic equilibrium with Murphree plate efficiency; |
---|
34 | * no entrainment of liquid or vapour phase; |
---|
35 | * no weeping; |
---|
36 | * the dymanics in the downcomer are neglected. |
---|
37 | "; |
---|
38 | |
---|
39 | PARAMETERS |
---|
40 | outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); |
---|
41 | outer NComp as Integer; |
---|
42 | V as volume(Brief="Total Volume of the tray"); |
---|
43 | Q as heat_rate (Brief="Rate of heat supply"); |
---|
44 | Ap as area (Brief="Plate area = Atray - Adowncomer"); |
---|
45 | |
---|
46 | VARIABLES |
---|
47 | in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}"); |
---|
48 | in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); |
---|
49 | in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); |
---|
50 | out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); |
---|
51 | out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); |
---|
52 | |
---|
53 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
54 | ML as mol (Brief="Molar liquid holdup"); |
---|
55 | MV as mol (Brief="Molar vapour holdup"); |
---|
56 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
57 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
58 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
59 | Level as length (Brief="Height of clear liquid on plate"); |
---|
60 | yideal(NComp) as fraction; |
---|
61 | Emv as Real (Brief = "Murphree efficiency"); |
---|
62 | |
---|
63 | EQUATIONS |
---|
64 | "Component Molar Balance" |
---|
65 | diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z |
---|
66 | - OutletL.F*OutletL.z - OutletV.F*OutletV.z; |
---|
67 | |
---|
68 | "Energy Balance" |
---|
69 | diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h |
---|
70 | - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ); |
---|
71 | |
---|
72 | "Molar Holdup" |
---|
73 | M = ML*OutletL.z + MV*OutletV.z; |
---|
74 | |
---|
75 | "Energy Holdup" |
---|
76 | E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; |
---|
77 | |
---|
78 | "Mol fraction normalisation" |
---|
79 | sum(OutletL.z)= 1.0; |
---|
80 | sum(OutletL.z)= sum(OutletV.z); |
---|
81 | |
---|
82 | "Liquid Volume" |
---|
83 | vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); |
---|
84 | "Vapour Volume" |
---|
85 | vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
86 | |
---|
87 | "Chemical Equilibrium" |
---|
88 | PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = |
---|
89 | PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; |
---|
90 | |
---|
91 | "Murphree Efficiency" |
---|
92 | OutletV.z = Emv * (yideal - InletV.z) + InletV.z; |
---|
93 | |
---|
94 | "Thermal Equilibrium" |
---|
95 | OutletV.T = OutletL.T; |
---|
96 | |
---|
97 | "Mechanical Equilibrium" |
---|
98 | OutletV.P = OutletL.P; |
---|
99 | |
---|
100 | "Geometry Constraint" |
---|
101 | V = ML* vL + MV*vV; |
---|
102 | |
---|
103 | "Level of clear liquid over the weir" |
---|
104 | Level = ML*vL/Ap; |
---|
105 | end |
---|
106 | |
---|
107 | Model tray as trayBasic |
---|
108 | ATTRIBUTES |
---|
109 | Pallete = false; |
---|
110 | Icon = "icon/Tray"; |
---|
111 | Brief = "Complete model of a column tray."; |
---|
112 | Info = |
---|
113 | "== Specify == |
---|
114 | * the Feed stream |
---|
115 | * the Liquid inlet stream |
---|
116 | * the Vapour inlet stream |
---|
117 | * the Vapour outlet flow (OutletV.F) |
---|
118 | |
---|
119 | == Initial == |
---|
120 | * the plate temperature (OutletL.T) |
---|
121 | * the liquid height (Level) OR the liquid flow OutletL.F |
---|
122 | * (NoComps - 1) OutletL compositions |
---|
123 | "; |
---|
124 | |
---|
125 | PARAMETERS |
---|
126 | Ah as area (Brief="Total holes area"); |
---|
127 | lw as length (Brief="Weir length"); |
---|
128 | g as acceleration (Default=9.81); |
---|
129 | hw as length (Brief="Weir height"); |
---|
130 | beta as fraction (Brief="Aeration fraction"); |
---|
131 | alfa as fraction (Brief="Dry pressure drop coefficient"); |
---|
132 | |
---|
133 | VapourFlow as Switcher(Valid = ["on", "off"], Default = "on"); |
---|
134 | LiquidFlow as Switcher(Valid = ["on", "off"], Default = "on"); |
---|
135 | |
---|
136 | VARIABLES |
---|
137 | rhoL as dens_mass; |
---|
138 | rhoV as dens_mass; |
---|
139 | |
---|
140 | EQUATIONS |
---|
141 | "Liquid Density" |
---|
142 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
143 | "Vapour Density" |
---|
144 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
145 | |
---|
146 | switch LiquidFlow |
---|
147 | case "on": |
---|
148 | "Francis Equation" |
---|
149 | # OutletL.F*vL = 1.84*'m^0.5/s'*lw*((Level-(beta*hw))/(beta))^1.5; |
---|
150 | OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2; |
---|
151 | when Level < (beta * hw) switchto "off"; |
---|
152 | |
---|
153 | case "off": |
---|
154 | "Low level" |
---|
155 | OutletL.F = 0 * 'mol/h'; |
---|
156 | when Level > (beta * hw) + 1e-6*'m' switchto "on"; |
---|
157 | end |
---|
158 | |
---|
159 | switch VapourFlow |
---|
160 | case "on": |
---|
161 | InletV.F*vV = sqrt((InletV.P - OutletV.P)/(rhoV*alfa))*Ah; |
---|
162 | when InletV.F < 1e-6 * 'kmol/h' switchto "off"; |
---|
163 | |
---|
164 | case "off": |
---|
165 | InletV.F = 0 * 'mol/s'; |
---|
166 | when InletV.P > OutletV.P + Level*g*rhoL + 1e-1 * 'atm' switchto "on"; |
---|
167 | end |
---|
168 | |
---|
169 | end |
---|
170 | |
---|
171 | Model packedStageOld as trayBasic |
---|
172 | PARAMETERS |
---|
173 | PPwater as Plugin(Brief="Physical Properties", |
---|
174 | Type="PP", |
---|
175 | Components = [ "water" ], |
---|
176 | LiquidModel = "PR", |
---|
177 | VapourModel = "PR" |
---|
178 | ); |
---|
179 | |
---|
180 | # PackingType as Switcher(Valid = ["random", "structured"], Default = "randon"); |
---|
181 | # PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl"); |
---|
182 | |
---|
183 | a as Real (Brief="Constant used in Leva equation", Default=873.55); |
---|
184 | b as Real (Brief="Constant used in Leva equation", Default=0.058); |
---|
185 | # Fp as Real (Brief="Packing factor", Default = 300); |
---|
186 | e as fraction (Brief="Packing Porosity", Default=0.84); |
---|
187 | dp as length (Brief="Packing Dimension", Default=0.013); |
---|
188 | # C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994); |
---|
189 | |
---|
190 | # S as length (Brief="Structured packing parameter", Default=0.009); |
---|
191 | # teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45); |
---|
192 | # C3 as Real (Brief="Structured packing parameter", Default=3.38); |
---|
193 | |
---|
194 | Across as area (Brief="Tower cross section area"); |
---|
195 | Mw(NComp) as molweight (Brief = "Component Mol Weight"); |
---|
196 | g as acceleration (Default=9.81); |
---|
197 | |
---|
198 | SET |
---|
199 | Mw = PP.MolecularWeight(); |
---|
200 | Ap = Across; |
---|
201 | |
---|
202 | VARIABLES |
---|
203 | rhoL as dens_mass (Brief="Liquid density"); |
---|
204 | rhoV as dens_mass (Brief="Vapor density"); |
---|
205 | viscL as viscosity (Brief="Liquid Viscosity"); |
---|
206 | viscV as viscosity (Brief="Vapor Viscosity"); |
---|
207 | rhow as dens_mass (Brief="Water density"); |
---|
208 | visclw as viscosity (Brief="Water viscosity"); |
---|
209 | |
---|
210 | L as flux_mass (Brief="Liquid mass flux"); |
---|
211 | G as flux_mass (Brief="Liquid mass flux"); |
---|
212 | Llin as flux_mass (Brief="Water contribution on liquid mass flux"); |
---|
213 | # X as Real (Brief="Term in Prahl correlation"); |
---|
214 | # Y as Real (Brief="Term in Prahl correlation"); |
---|
215 | # Reg as Real (Brief="Packing Reynolds"); |
---|
216 | # Ge as velocity (Brief="Temporay variable"); |
---|
217 | # Fr as Real (Brief="Froud number"); |
---|
218 | phiL as Real (Brief="Liquid holdup in packed towers"); |
---|
219 | |
---|
220 | # deltaP_z as Real (Unit = 'inH2O/ft'); |
---|
221 | |
---|
222 | EQUATIONS |
---|
223 | # deltaP_z = (InletV.P - OutletV.P) / (V/Across); |
---|
224 | |
---|
225 | "If the liquid is not water - mass flux correction" |
---|
226 | Llin = L * rhow/rhoL; |
---|
227 | |
---|
228 | "Base unit conversion (mol -> mass)" |
---|
229 | L = OutletL.F*sum(Mw*OutletL.z)/Across; |
---|
230 | G = OutletV.F*sum(Mw*OutletV.z)/Across; |
---|
231 | |
---|
232 | # "X in Prahl correlation" |
---|
233 | # X * G = L * (rhoV/rhoL)^0.5; |
---|
234 | |
---|
235 | # "Y in Prahl correlation" |
---|
236 | # Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ; |
---|
237 | |
---|
238 | "Water Liquid Viscosity" |
---|
239 | visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1); |
---|
240 | "Water Liquid Density" |
---|
241 | rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1); |
---|
242 | "Liquid Viscosity" |
---|
243 | viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); |
---|
244 | "Vapor Viscosity" |
---|
245 | viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z); |
---|
246 | "Liquid Density" |
---|
247 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
248 | "Vapour Density" |
---|
249 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
250 | |
---|
251 | # "Froud number" |
---|
252 | # Fr = (L/rhoL)^2 / S/g; |
---|
253 | # "Reynolds number" |
---|
254 | # Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV; |
---|
255 | # "Temporary variable" |
---|
256 | # Ge = G/rhoV /(e*sin(teta)); |
---|
257 | "Conversion from ML to phiL" |
---|
258 | phiL = ML*vL / V; |
---|
259 | |
---|
260 | # switch PackingType |
---|
261 | # case "random": |
---|
262 | # switch PressureDropModel |
---|
263 | # case "Leva": |
---|
264 | (InletV.P - OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3')); |
---|
265 | #(InletV.P - OutletV.P) / (V/(Across) ) = a * 10^(b*Llin) * (G)^2/(rhoV); |
---|
266 | # case "Prahl": |
---|
267 | # (InletV.P - OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1-Y*(35*X+3)); |
---|
268 | # end |
---|
269 | phiL = (1.53e-4 + (2.9e-5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(-1.2); |
---|
270 | #* case "structured": |
---|
271 | (InletV.P - OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) ) |
---|
272 | * (1/(1-C3 * sqrt(Fr) ))^5; |
---|
273 | |
---|
274 | phiL = C3 * sqrt(Fr); |
---|
275 | end |
---|
276 | *# |
---|
277 | end |
---|
278 | |
---|
279 | Model packedStage as trayBasic |
---|
280 | PARAMETERS |
---|
281 | a as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); |
---|
282 | g as acceleration; |
---|
283 | e as Real (Brief="Void fraction of packing, m^3/m^3"); |
---|
284 | Across as area; |
---|
285 | ds as length (Brief="Column diameter"); |
---|
286 | d as length (Brief="size of an element of packing"); |
---|
287 | #h as length (Brief="Height of packing"); |
---|
288 | C as Real (Brief="Constant for resitance factor equation"); #Billet pp 80 (Cf+Cfl)/2 |
---|
289 | Cp as Real (Brief="Constant for resitance at loading point factor equation"); # Billet pp94 |
---|
290 | Mw(NComp) as molweight (Brief = "Component Mol Weight"); |
---|
291 | |
---|
292 | VARIABLES |
---|
293 | niL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s'); |
---|
294 | niV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s'); |
---|
295 | rhoL as dens_mass; |
---|
296 | rhoV as dens_mass; |
---|
297 | hL as Real (Brief="Liquid holdup", Default = 0.424); |
---|
298 | VL as volume (Brief="Liquid volume", Default = 0.025); |
---|
299 | uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Default = 0.007); |
---|
300 | uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Default = 1.14); |
---|
301 | ksi as Real (Brief="Coefficient of Resistance", Default = 0.784); |
---|
302 | ksil as Real (Brief="Coefficient of Resistance", Default = 0.032); |
---|
303 | Rev as Real(Brief="Vapor Reynolds",Default = 0.966); |
---|
304 | hLs as Real(Default = 0.037); |
---|
305 | hs as length (Brief="Height of the packing stage"); |
---|
306 | |
---|
307 | SET |
---|
308 | Mw = PP.MolecularWeight(); |
---|
309 | Ap = Across; |
---|
310 | |
---|
311 | EQUATIONS |
---|
312 | "Liquid Density" |
---|
313 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
314 | "Vapour Density" |
---|
315 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
316 | "Liquid viscosity" |
---|
317 | niL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); |
---|
318 | "Vapour viscosity" |
---|
319 | niV = PP.VapourViscosity(InletV.T, InletV.P, InletV.z); |
---|
320 | |
---|
321 | "Liquid volume" |
---|
322 | VL = vL * ML; |
---|
323 | "Liquid holdup" |
---|
324 | hL = VL/V; |
---|
325 | |
---|
326 | "Volume flow rate of liquid, m^3/m^2/s" |
---|
327 | uL * Across = OutletL.F * vL; |
---|
328 | "Volume flow rate of vapor, m^3/m^2/s" |
---|
329 | uV * Across = OutletV.F * vV; |
---|
330 | |
---|
331 | # "Coefficient of Resistance" |
---|
332 | # ksi * C^2 * (uL/uV * sqrt(rhoV/rhoL) * (niL/niV)^5.8)^3 = g/1*'s^2/m'; |
---|
333 | #ksil = Cp * (exp(uL*rhoL/a/niL/200)*(hL/hLs)^0.3) * (64/Rev+(1.8/Rev)) * |
---|
334 | ksil = Cp * (exp(uL*rhoL/a/niL/200)*(hL/hLs)^0.3) * (64/Rev+(1.8/Rev)) * |
---|
335 | ((e-hL)/e); |
---|
336 | |
---|
337 | # "Liquid holdup and Liquid flow" |
---|
338 | # a^2 * niL * uL = hL^1 *(g*rhoL/3 - ksi*a*rhoV*uV^2/(4*hL*(e-hL)^2)); |
---|
339 | |
---|
340 | # "Pressure drop and Vapor flow" |
---|
341 | # (InletV.P - OutletV.P)/hs = ksil *(a/2 + 2/ds)*(uV^2*rhoV/(e-hL)^3); |
---|
342 | |
---|
343 | "Vapor Reynolds number" |
---|
344 | Rev = uV * (d-2*hL/a) * rhoV/ niV; |
---|
345 | |
---|
346 | "Theoretical Liquid Holdup" |
---|
347 | #hLs = (12*a^2*niL*uL/g/rhoL)^0.333; |
---|
348 | hLs = (12*a^2*niL*uL/g/rhoL); |
---|
349 | end |
---|
350 | |
---|
351 | #*------------------------------------------------------------------- |
---|
352 | * Model of a tray with reaction |
---|
353 | *-------------------------------------------------------------------*# |
---|
354 | Model trayReact |
---|
355 | ATTRIBUTES |
---|
356 | Pallete = false; |
---|
357 | Icon = "icon/Tray"; |
---|
358 | Brief = "Model of a tray with reaction."; |
---|
359 | Info = |
---|
360 | "== Assumptions == |
---|
361 | * both phases (liquid and vapour) exists all the time; |
---|
362 | * thermodymanic equilibrium with Murphree plate efficiency; |
---|
363 | * no entrainment of liquid or vapour phase; |
---|
364 | * no weeping; |
---|
365 | * the dymanics in the downcomer are neglected. |
---|
366 | |
---|
367 | == Specify == |
---|
368 | * the Feed stream; |
---|
369 | * the Liquid inlet stream; |
---|
370 | * the Vapour inlet stream; |
---|
371 | * the Vapour outlet flow (OutletV.F); |
---|
372 | * the reaction related variables. |
---|
373 | |
---|
374 | == Initial == |
---|
375 | * the plate temperature (OutletL.T) |
---|
376 | * the liquid height (Level) OR the liquid flow OutletL.F |
---|
377 | * (NoComps - 1) OutletL compositions |
---|
378 | "; |
---|
379 | |
---|
380 | PARAMETERS |
---|
381 | outer PP as Plugin(Type="PP"); |
---|
382 | outer NComp as Integer; |
---|
383 | V as volume(Brief="Total Volume of the tray"); |
---|
384 | Q as power (Brief="Rate of heat supply"); |
---|
385 | Ap as area (Brief="Plate area = Atray - Adowncomer"); |
---|
386 | |
---|
387 | Ah as area (Brief="Total holes area"); |
---|
388 | lw as length (Brief="Weir length"); |
---|
389 | g as acceleration (Default=9.81); |
---|
390 | hw as length (Brief="Weir height"); |
---|
391 | beta as fraction (Brief="Aeration fraction"); |
---|
392 | alfa as fraction (Brief="Dry pressure drop coefficient"); |
---|
393 | |
---|
394 | stoic(NComp) as Real(Brief="Stoichiometric matrix"); |
---|
395 | Hr as energy_mol; |
---|
396 | Pstartup as pressure; |
---|
397 | |
---|
398 | VapourFlow as Switcher(Valid = ["on", "off"], Default = "off"); |
---|
399 | LiquidFlow as Switcher(Valid = ["on", "off"], Default = "off"); |
---|
400 | |
---|
401 | VARIABLES |
---|
402 | in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}"); |
---|
403 | in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); |
---|
404 | in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); |
---|
405 | out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); |
---|
406 | out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); |
---|
407 | |
---|
408 | yideal(NComp) as fraction; |
---|
409 | Emv as Real (Brief = "Murphree efficiency"); |
---|
410 | |
---|
411 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
412 | ML as mol (Brief="Molar liquid holdup"); |
---|
413 | MV as mol (Brief="Molar vapour holdup"); |
---|
414 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
415 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
416 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
417 | Level as length (Brief="Height of clear liquid on plate"); |
---|
418 | Vol as volume; |
---|
419 | |
---|
420 | rhoL as dens_mass; |
---|
421 | rhoV as dens_mass; |
---|
422 | r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s'); |
---|
423 | C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l"); |
---|
424 | |
---|
425 | EQUATIONS |
---|
426 | "Molar Concentration" |
---|
427 | OutletL.z = vL * C; |
---|
428 | |
---|
429 | "Reaction" |
---|
430 | r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4))*'l/mol/s'; |
---|
431 | |
---|
432 | "Component Molar Balance" |
---|
433 | diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z |
---|
434 | - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL; |
---|
435 | |
---|
436 | "Energy Balance" |
---|
437 | diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h |
---|
438 | - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r3 * vL*ML; |
---|
439 | |
---|
440 | "Molar Holdup" |
---|
441 | M = ML*OutletL.z + MV*OutletV.z; |
---|
442 | |
---|
443 | "Energy Holdup" |
---|
444 | E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; |
---|
445 | |
---|
446 | "Mol fraction normalisation" |
---|
447 | sum(OutletL.z)= 1.0; |
---|
448 | |
---|
449 | "Liquid Volume" |
---|
450 | vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); |
---|
451 | "Vapour Volume" |
---|
452 | vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
453 | |
---|
454 | "Thermal Equilibrium" |
---|
455 | OutletV.T = OutletL.T; |
---|
456 | |
---|
457 | "Mechanical Equilibrium" |
---|
458 | OutletV.P = OutletL.P; |
---|
459 | |
---|
460 | "Level of clear liquid over the weir" |
---|
461 | Level = ML*vL/Ap; |
---|
462 | |
---|
463 | Vol = ML*vL; |
---|
464 | |
---|
465 | "Liquid Density" |
---|
466 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
467 | "Vapour Density" |
---|
468 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
469 | |
---|
470 | switch LiquidFlow |
---|
471 | case "on": |
---|
472 | "Francis Equation" |
---|
473 | OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw)+1e-6*'m')/(beta))^2; |
---|
474 | when Level < (beta * hw) switchto "off"; |
---|
475 | |
---|
476 | case "off": |
---|
477 | "Low level" |
---|
478 | OutletL.F = 0 * 'mol/h'; |
---|
479 | when Level > (beta * hw) + 1e-6*'m' switchto "on"; |
---|
480 | end |
---|
481 | |
---|
482 | switch VapourFlow |
---|
483 | case "on": |
---|
484 | #InletV.P = OutletV.P + Level*g*rhoL + rhoV*alfa*(InletV.F*vV/Ah)^2; |
---|
485 | InletV.F*vV = sqrt((InletV.P - OutletV.P - Level*g*rhoL + 1e-8 * 'atm')/(rhoV*alfa))*Ah; |
---|
486 | when InletV.P < OutletV.P + Level*g*rhoL switchto "off"; |
---|
487 | |
---|
488 | case "off": |
---|
489 | InletV.F = 0 * 'mol/s'; |
---|
490 | when InletV.P > OutletV.P + Level*g*rhoL + 3e-2 * 'atm' switchto "on"; |
---|
491 | #when InletV.P > OutletV.P + Level*beta*g*rhoL + 1e-2 * 'atm' switchto "on"; |
---|
492 | end |
---|
493 | |
---|
494 | "Chemical Equilibrium" |
---|
495 | PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = |
---|
496 | PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; |
---|
497 | |
---|
498 | OutletV.z = Emv * (yideal - InletV.z) + InletV.z; |
---|
499 | |
---|
500 | sum(OutletL.z)= sum(OutletV.z); |
---|
501 | |
---|
502 | "Geometry Constraint" |
---|
503 | V = ML* vL + MV*vV; |
---|
504 | end |
---|
505 | |
---|
506 | |
---|
507 | FlowSheet test |
---|
508 | PARAMETERS |
---|
509 | a as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); |
---|
510 | # N as Real (Brief="Number of elements per volume",Unit='1/m^3'); |
---|
511 | niL as Real (Brief="Liquid dynamic viscosity", Unit='kg/m/s'); |
---|
512 | niV as Real (Brief="Vapor dynamic viscosity", Unit='kg/m/s'); |
---|
513 | g as acceleration; |
---|
514 | rhoL as dens_mass; |
---|
515 | rhoV as dens_mass; |
---|
516 | e as Real (Brief="Void fraction of packing, m^3/m^3"); |
---|
517 | V as volume; |
---|
518 | Across as area; |
---|
519 | ds as length (Brief="Column diameter"); |
---|
520 | d as length (Brief="size of an element of packing"); |
---|
521 | h as length (Brief="Height of packing"); |
---|
522 | C as Real (Brief="Constant for resitance factor equation"); |
---|
523 | Cp as Real (Brief="Constant for resitance at loading point factor equation"); |
---|
524 | |
---|
525 | vL as volume_mol; |
---|
526 | vV as volume_mol; |
---|
527 | ML as mol; |
---|
528 | Mw as molweight; |
---|
529 | dP as pressure (DisplayUnit='atm'); |
---|
530 | |
---|
531 | VARIABLES |
---|
532 | hL as Real (Brief="Liquid holdup", Default = 0.424); |
---|
533 | VL as volume (Brief="Liquid volume", Default = 0.025); |
---|
534 | uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Default = 0.007); |
---|
535 | uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Default = 1.14); |
---|
536 | # n as Real; |
---|
537 | FV as flow_mol(Default = 149); |
---|
538 | FL as flow_mol(Default = 222); |
---|
539 | ksi as Real (Brief="Coefficient of Resistance", Default = 0.784); |
---|
540 | ksil as Real (Brief="Coefficient of Resistance", Default = 0.032); |
---|
541 | Rev as Real(Default = 0.966); |
---|
542 | hLs as Real(Default = 0.037); |
---|
543 | |
---|
544 | EQUATIONS |
---|
545 | VL = vL * ML; |
---|
546 | hL = VL/V; |
---|
547 | uL * Across = FL * vL; |
---|
548 | uV * Across = FV * vV; |
---|
549 | |
---|
550 | ksi * C^2 * (uL/uV * sqrt(rhoV/rhoL) * (niL/niV)^5.8)^3 = g/1*'s^2/m'; |
---|
551 | |
---|
552 | a^2 * niL * uL = hL^1 *(g*rhoL/3 - ksi*a*rhoV*uV^2/(4*hL*(e-hL)^2)); |
---|
553 | |
---|
554 | dP/h = ksil *(a/2 + 2/ds)*(uV^2*rhoV/(e-hL)^3); |
---|
555 | |
---|
556 | ksil = Cp * (exp(uL*rhoL/a/niL/200)*(hL/hLs)^0.3) * (64/Rev+(1.8/Rev)) * |
---|
557 | ((e-hL)/e);#1.5 |
---|
558 | |
---|
559 | Rev = uV * (d-2*hL/a) * rhoV/ niV; |
---|
560 | |
---|
561 | hLs = (12*a^2*niL*uL/g/rhoL)^0.333; |
---|
562 | |
---|
563 | SPECIFY |
---|
564 | # FV = 147.1 * 'kmol/h'; |
---|
565 | # FL = 229.5 * 'kmol/h'; |
---|
566 | # ksi = 0.809623; |
---|
567 | |
---|
568 | SET |
---|
569 | Mw = 75 * 'g/mol'; |
---|
570 | vL = 9.5e-5 * 'm^3/mol'; |
---|
571 | vV = 0.022 * 'm^3/mol'; |
---|
572 | niL = 0.00032 * 'kg/m/s'; |
---|
573 | niV = 8.2e-5 * 'kg/m/s'; |
---|
574 | rhoL = 809 * 'kg/m^3'; |
---|
575 | rhoV = 4.63 * 'kg/m^3'; |
---|
576 | ML = 0.268 * 'kmol'; |
---|
577 | dP = 0.1984 * 0.001 * 'atm';#0.1984 * 'atm'; |
---|
578 | |
---|
579 | V = 0.06 * 'm^3';#0.06 * 'm^3'; |
---|
580 | Across = 0.8 * 'm^2'; |
---|
581 | h = 0.075 * 'm'; |
---|
582 | ds = 1.009 * 'm'; |
---|
583 | d = 50 * 'mm'; |
---|
584 | |
---|
585 | # ksi = 0.8; |
---|
586 | C = 2.37; |
---|
587 | Cp = 0.662; |
---|
588 | e = 0.78; |
---|
589 | a = 120 * 'm^2/m^3'; |
---|
590 | # N = 6400 * '1/m^3'; |
---|
591 | |
---|
592 | OPTIONS |
---|
593 | GuessFile = "/home/paula/test.rlt"; |
---|
594 | |
---|
595 | end |
---|
596 | |
---|
597 | |
---|