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: reboiler.mso 555 2008-07-18 19:01:13Z rafael $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "streams"; |
---|
21 | |
---|
22 | Model reboilerSteady |
---|
23 | |
---|
24 | ATTRIBUTES |
---|
25 | Pallete = true; |
---|
26 | Icon = "icon/ReboilerSteady"; |
---|
27 | Brief = "Model of a Steady State reboiler with no thermodynamics equilibrium - thermosyphon."; |
---|
28 | Info = |
---|
29 | "== ASSUMPTIONS == |
---|
30 | * perfect mixing of both phases; |
---|
31 | * no thermodynamics equilibrium; |
---|
32 | |
---|
33 | == SET == |
---|
34 | * the pressure drop in the reboiler; |
---|
35 | |
---|
36 | == SPECIFY == |
---|
37 | * the InletLiquid stream; |
---|
38 | * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model) |
---|
39 | OR the outlet temperature (OutletVapour.T); |
---|
40 | |
---|
41 | == OPTIONAL == |
---|
42 | * the reboiler model has two control ports |
---|
43 | ** TI OutletVapour Temperature Indicator; |
---|
44 | ** PI OutletVapour Pressure Indicator; |
---|
45 | "; |
---|
46 | |
---|
47 | PARAMETERS |
---|
48 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
49 | outer NComp as Integer (Brief="Number of Components"); |
---|
50 | Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); |
---|
51 | FlowConstant as Real (Brief = "Flow Constant"); |
---|
52 | k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol^3/(kg*m^2)'); |
---|
53 | |
---|
54 | SET |
---|
55 | |
---|
56 | k = 1*'mol^3/(kg*m^2)'; |
---|
57 | |
---|
58 | VARIABLES |
---|
59 | in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); |
---|
60 | out OutletVapour as streamPH (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); |
---|
61 | in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); |
---|
62 | vV as volume_mol (Brief="Vapour Molar volume", Protected = true); |
---|
63 | rhoV as dens_mass (Brief="Vapour Density", Symbol = "\rho", Protected = true); |
---|
64 | |
---|
65 | out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=0.44, PosY=0); |
---|
66 | out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.35, PosY=0); |
---|
67 | |
---|
68 | EQUATIONS |
---|
69 | |
---|
70 | "Molar Flow Balance" |
---|
71 | InletLiquid.F = OutletVapour.F; |
---|
72 | |
---|
73 | "Molar Composition Balance" |
---|
74 | InletLiquid.z = OutletVapour.z; |
---|
75 | |
---|
76 | "Vapour Volume" |
---|
77 | vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
78 | |
---|
79 | "Vapour Density" |
---|
80 | rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
81 | |
---|
82 | "Energy Balance" |
---|
83 | InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; |
---|
84 | |
---|
85 | "Pressure Drop" |
---|
86 | OutletVapour.P = InletLiquid.P - Pdrop; |
---|
87 | |
---|
88 | "Temperature indicator" |
---|
89 | TI * 'K' = OutletVapour.T; |
---|
90 | |
---|
91 | "Pressure indicator" |
---|
92 | PI * 'atm' = OutletVapour.P; |
---|
93 | |
---|
94 | "Flow through the reboiler" |
---|
95 | OutletVapour.F^3 = FlowConstant*k*InletQ; |
---|
96 | |
---|
97 | end |
---|
98 | |
---|
99 | Model thermosyphon |
---|
100 | |
---|
101 | ATTRIBUTES |
---|
102 | Pallete = true; |
---|
103 | Icon = "icon/Thermosyphon"; |
---|
104 | Brief = "Model of a Steady State reboiler thermosyphon."; |
---|
105 | Info = |
---|
106 | "== ASSUMPTIONS == |
---|
107 | * perfect mixing of both phases; |
---|
108 | * no thermodynamics equilibrium; |
---|
109 | |
---|
110 | == SET == |
---|
111 | * the pressure drop in the reboiler; |
---|
112 | |
---|
113 | == SPECIFY == |
---|
114 | * the InletLiquid stream; |
---|
115 | * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model) |
---|
116 | OR the outlet temperature (OutletVapour.T); |
---|
117 | |
---|
118 | == OPTIONAL == |
---|
119 | * the reboiler model has two control ports |
---|
120 | ** TI OutletVapour Temperature Indicator; |
---|
121 | ** PI OutletVapour Pressure Indicator; |
---|
122 | "; |
---|
123 | |
---|
124 | PARAMETERS |
---|
125 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
126 | outer NComp as Integer (Brief="Number of Components"); |
---|
127 | Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); |
---|
128 | FlowConstant as Real (Brief = "Flow Constant"); |
---|
129 | k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol^3/(kg*m^2)'); |
---|
130 | |
---|
131 | SET |
---|
132 | |
---|
133 | k = 1*'mol^3/(kg*m^2)'; |
---|
134 | |
---|
135 | VARIABLES |
---|
136 | in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.44, PosY=1, Symbol="_{inL}"); |
---|
137 | out OutletVapour as streamPH (Brief="Vapour outlet stream", PosX=0, PosY=0.09, Symbol="_{outV}"); |
---|
138 | in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.77, Symbol="Q_{in}", Protected = true); |
---|
139 | |
---|
140 | out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=1, PosY=0.57); |
---|
141 | out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=1, PosY=0.35); |
---|
142 | |
---|
143 | EQUATIONS |
---|
144 | |
---|
145 | "Molar Flow Balance" |
---|
146 | InletLiquid.F = OutletVapour.F; |
---|
147 | |
---|
148 | "Molar Composition Balance" |
---|
149 | InletLiquid.z = OutletVapour.z; |
---|
150 | |
---|
151 | "Energy Balance" |
---|
152 | InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; |
---|
153 | |
---|
154 | "Pressure Drop" |
---|
155 | OutletVapour.P = InletLiquid.P - Pdrop; |
---|
156 | |
---|
157 | "Temperature indicator" |
---|
158 | TI * 'K' = OutletVapour.T; |
---|
159 | |
---|
160 | "Pressure indicator" |
---|
161 | PI * 'atm' = OutletVapour.P; |
---|
162 | |
---|
163 | "Flow through the thermosyphon reboiler" |
---|
164 | OutletVapour.F^3 = FlowConstant*k*InletQ; |
---|
165 | |
---|
166 | end |
---|
167 | |
---|
168 | Model reboilerSteady_fakeH |
---|
169 | |
---|
170 | ATTRIBUTES |
---|
171 | Pallete = true; |
---|
172 | Icon = "icon/ReboilerSteady"; |
---|
173 | Brief = "Model of a Steady State reboiler with fake calculation of outlet conditions."; |
---|
174 | Info = |
---|
175 | "Model of a Steady State reboiler with fake calculation of |
---|
176 | vaporisation fraction and output temperature, but with a real |
---|
177 | calculation of the output stream enthalpy. |
---|
178 | "; |
---|
179 | |
---|
180 | PARAMETERS |
---|
181 | outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); |
---|
182 | outer NComp as Integer; |
---|
183 | Pdrop as press_delta (Brief="Pressure Drop in the reboiler", Symbol = "\Delta P"); |
---|
184 | FlowConstant as Real (Brief = "Flow Constant"); |
---|
185 | k as Real (Brief = "Flow Constant", Hidden = true, Unit='mol^3/(kg*m^2)'); |
---|
186 | |
---|
187 | SET |
---|
188 | |
---|
189 | k = 1*'mol^3/(kg*m^2)'; |
---|
190 | |
---|
191 | VARIABLES |
---|
192 | in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.345, PosY=1, Symbol="_{inL}"); |
---|
193 | out OutletVapour as stream (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{outV}"); |
---|
194 | in InletQ as power (Brief="Heat Duty", PosX=1, PosY=0.08, Symbol="Q_{in}", Protected = true); |
---|
195 | |
---|
196 | out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=0.44, PosY=0); |
---|
197 | out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.35, PosY=0); |
---|
198 | |
---|
199 | EQUATIONS |
---|
200 | |
---|
201 | "Molar Balance" |
---|
202 | InletLiquid.F = OutletVapour.F; |
---|
203 | |
---|
204 | "Composition Balance" |
---|
205 | InletLiquid.z = OutletVapour.z; |
---|
206 | |
---|
207 | "Energy Balance" |
---|
208 | InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; |
---|
209 | |
---|
210 | "Pressure Drop" |
---|
211 | OutletVapour.P = InletLiquid.P - Pdrop ; |
---|
212 | |
---|
213 | #"Fake Vapourisation Fraction" |
---|
214 | # OutletVapour.v = 0.6; |
---|
215 | |
---|
216 | "Fake output temperature" |
---|
217 | OutletVapour.T = (58+273)*'K'; |
---|
218 | |
---|
219 | #OutletVapour.v = PP.VapourFraction(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
220 | #OutletVapour.h = OutletVapor.v * PP.VapourEnthalpy(OutletVapour.T, OutletVapour.P, OutletVapour.z) |
---|
221 | # + (1-OutletVapor.v) * PP.LiquidEnthalpy(OutletVapour.T, OutletVapour.P, OutletVapour.z) |
---|
222 | |
---|
223 | "Temperature indicator" |
---|
224 | TI * 'K' = OutletVapour.T; |
---|
225 | |
---|
226 | "Pressure indicator" |
---|
227 | PI * 'atm' = OutletVapour.P; |
---|
228 | |
---|
229 | "Flow through the reboiler" |
---|
230 | OutletVapour.F^3 = FlowConstant*k*InletQ; |
---|
231 | |
---|
232 | end |
---|
233 | |
---|
234 | Model reboilerReact |
---|
235 | ATTRIBUTES |
---|
236 | Pallete = false; |
---|
237 | Icon = "icon/Reboiler"; |
---|
238 | Brief = "Model of a dynamic reboiler with reaction."; |
---|
239 | Info = |
---|
240 | "== Assumptions == |
---|
241 | * perfect mixing of both phases; |
---|
242 | * thermodynamics equilibrium; |
---|
243 | * no liquid entrainment in the vapour stream; |
---|
244 | * the reaction takes place only in the liquid phase. |
---|
245 | |
---|
246 | == Specify == |
---|
247 | * the kinetics variables; |
---|
248 | * the inlet stream; |
---|
249 | * the liquid inlet stream; |
---|
250 | * the outlet flows: OutletVapour.F and OutletLiquid.F; |
---|
251 | * the heat supply. |
---|
252 | |
---|
253 | == Initial Conditions == |
---|
254 | * the reboiler temperature (OutletLiquid.T); |
---|
255 | * the reboiler liquid level (Level); |
---|
256 | * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. |
---|
257 | "; |
---|
258 | |
---|
259 | PARAMETERS |
---|
260 | outer PP as Plugin(Type="PP"); |
---|
261 | outer NComp as Integer; |
---|
262 | Across as area (Brief="Cross Section Area of reboiler"); |
---|
263 | V as volume (Brief="Total volume of reboiler"); |
---|
264 | |
---|
265 | stoic(NComp) as Real(Brief="Stoichiometric matrix"); |
---|
266 | Hr as energy_mol; |
---|
267 | |
---|
268 | Initial_Level as length (Brief="Initial Level of liquid phase"); |
---|
269 | Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); |
---|
270 | Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); |
---|
271 | |
---|
272 | VARIABLES |
---|
273 | in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}"); |
---|
274 | out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}"); |
---|
275 | out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}"); |
---|
276 | InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}"); |
---|
277 | |
---|
278 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
279 | ML as mol (Brief="Molar liquid holdup"); |
---|
280 | MV as mol (Brief="Molar vapour holdup"); |
---|
281 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
282 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
283 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
284 | Level as length (Brief="Level of liquid phase"); |
---|
285 | Vol as volume; |
---|
286 | rhoV as dens_mass; |
---|
287 | r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s'); |
---|
288 | C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); |
---|
289 | |
---|
290 | INITIAL |
---|
291 | |
---|
292 | Level = Initial_Level; |
---|
293 | OutletLiquid.T = Initial_Temperature; |
---|
294 | OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); |
---|
295 | |
---|
296 | EQUATIONS |
---|
297 | "Molar Concentration" |
---|
298 | OutletLiquid.z = vL * C; |
---|
299 | |
---|
300 | "Reaction" |
---|
301 | r3 = exp(-7150*'K'/OutletLiquid.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s'; |
---|
302 | |
---|
303 | "Component Molar Balance" |
---|
304 | diff(M)= InletLiquid.F*InletLiquid.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z + stoic*r3*ML*vL; |
---|
305 | |
---|
306 | "Energy Balance" |
---|
307 | diff(E) = InletLiquid.F*InletLiquid.h- OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ + Hr * r3 * vL*ML; |
---|
308 | |
---|
309 | "Molar Holdup" |
---|
310 | M = ML*OutletLiquid.z + MV*OutletVapour.z; |
---|
311 | |
---|
312 | "Energy Holdup" |
---|
313 | E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; |
---|
314 | |
---|
315 | "Mol fraction normalisation" |
---|
316 | sum(OutletLiquid.z)=1.0; |
---|
317 | |
---|
318 | "Liquid Volume" |
---|
319 | vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); |
---|
320 | |
---|
321 | "Vapour Volume" |
---|
322 | vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
323 | |
---|
324 | "Vapour Density" |
---|
325 | rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
326 | |
---|
327 | "Level of liquid phase" |
---|
328 | Level = ML*vL/Across; |
---|
329 | |
---|
330 | Vol = ML*vL; |
---|
331 | |
---|
332 | "Mechanical Equilibrium" |
---|
333 | OutletLiquid.P = OutletVapour.P; |
---|
334 | |
---|
335 | "Thermal Equilibrium" |
---|
336 | OutletLiquid.T = OutletVapour.T; |
---|
337 | |
---|
338 | "Geometry Constraint" |
---|
339 | V = ML*vL + MV*vV; |
---|
340 | |
---|
341 | "Chemical Equilibrium" |
---|
342 | PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = |
---|
343 | PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; |
---|
344 | |
---|
345 | sum(OutletLiquid.z)=sum(OutletVapour.z); |
---|
346 | |
---|
347 | end |
---|
348 | |
---|
349 | Model reboiler |
---|
350 | |
---|
351 | ATTRIBUTES |
---|
352 | Pallete = true; |
---|
353 | Icon = "icon/Reboiler"; |
---|
354 | Brief = "Model of a dynamic reboiler - kettle with control."; |
---|
355 | Info = |
---|
356 | "== ASSUMPTIONS == |
---|
357 | |
---|
358 | * perfect mixing of both phases; |
---|
359 | * thermodynamics equilibrium; |
---|
360 | * no liquid entrainment in the vapour stream. |
---|
361 | |
---|
362 | == SPECIFY == |
---|
363 | |
---|
364 | * the InletLiquid stream; |
---|
365 | * the outlet flows: OutletVapour.F and OutletLiquid.F; |
---|
366 | * the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model). |
---|
367 | |
---|
368 | == OPTIONAL == |
---|
369 | * the reboiler model has three control ports |
---|
370 | ** TI OutletLiquid Temperature Indicator; |
---|
371 | ** PI OutletLiquid Pressure Indicator; |
---|
372 | ** LI Level Indicator of Reboiler; |
---|
373 | |
---|
374 | == INITIAL CONDITIONS == |
---|
375 | |
---|
376 | * Initial_Temperature : the reboiler temperature (OutletLiquid.T); |
---|
377 | * Initial_Level : the reboiler liquid level (Level); |
---|
378 | * Initial_Composition : (NoComps) OutletLiquid compositions. |
---|
379 | "; |
---|
380 | |
---|
381 | PARAMETERS |
---|
382 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
383 | outer NComp as Integer (Brief="Number of Components"); |
---|
384 | Across as area (Brief="Cross Section Area of reboiler"); |
---|
385 | V as volume (Brief="Total volume of reboiler"); |
---|
386 | |
---|
387 | Initial_Level as length (Brief="Initial Level of liquid phase"); |
---|
388 | Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); |
---|
389 | Initial_Composition(NComp) as positive (Brief="Initial Liquid Composition",Lower=1E-6); |
---|
390 | |
---|
391 | VARIABLES |
---|
392 | |
---|
393 | in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.17, PosY=1, Symbol="_{in}^{Liquid}"); |
---|
394 | out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.53, PosY=1, Symbol="_{out}^{Liquid}"); |
---|
395 | out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.17, PosY=0, Symbol="_{out}^{Vapour}"); |
---|
396 | in InletQ as power (Brief="Heat supplied", Protected = true, PosX=1, PosY=0.08, Symbol="Q_{in}"); |
---|
397 | |
---|
398 | out TI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=0.44, PosY=0); |
---|
399 | out LI as control_signal (Brief="Level Indicator of Reboiler", Protected = true, PosX=0.53, PosY=0); |
---|
400 | out PI as control_signal (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.35, PosY=0); |
---|
401 | |
---|
402 | M(NComp) as mol (Brief="Molar Holdup in the tray", Protected = true); |
---|
403 | ML as mol (Brief="Molar liquid holdup", Protected = true); |
---|
404 | MV as mol (Brief="Molar vapour holdup", Protected = true); |
---|
405 | E as energy (Brief="Total Energy Holdup on tray", Protected = true); |
---|
406 | vL as volume_mol (Brief="Liquid Molar Volume", Protected = true); |
---|
407 | vV as volume_mol (Brief="Vapour Molar volume", Protected = true); |
---|
408 | rhoV as dens_mass (Brief="Vapour Density", Protected = true, Symbol="\rho"); |
---|
409 | Level as length (Brief="Level of liquid phase", Protected = true); |
---|
410 | Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true); |
---|
411 | |
---|
412 | INITIAL |
---|
413 | |
---|
414 | "Initial Level" |
---|
415 | Level = Initial_Level; |
---|
416 | |
---|
417 | "Initial Temperature" |
---|
418 | OutletLiquid.T = Initial_Temperature; |
---|
419 | |
---|
420 | "Initial Composition" |
---|
421 | OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); |
---|
422 | |
---|
423 | EQUATIONS |
---|
424 | |
---|
425 | "Component Molar Balance" |
---|
426 | diff(M)= InletLiquid.F*InletLiquid.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; |
---|
427 | |
---|
428 | "Energy Balance" |
---|
429 | diff(E) = InletLiquid.F*InletLiquid.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ; |
---|
430 | |
---|
431 | "Molar Holdup" |
---|
432 | M = ML*OutletLiquid.z + MV*OutletVapour.z; |
---|
433 | |
---|
434 | "Energy Holdup" |
---|
435 | E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; |
---|
436 | |
---|
437 | "Mol Fraction Normalisation" |
---|
438 | sum(OutletLiquid.z)=1.0; |
---|
439 | |
---|
440 | "Mol fraction Constraint" |
---|
441 | sum(OutletLiquid.z)=sum(OutletVapour.z); |
---|
442 | |
---|
443 | "Vapour Density" |
---|
444 | rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
445 | |
---|
446 | "Liquid Volume" |
---|
447 | vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); |
---|
448 | |
---|
449 | "Vapour Volume" |
---|
450 | vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); |
---|
451 | |
---|
452 | "Chemical Equilibrium" |
---|
453 | PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; |
---|
454 | |
---|
455 | "Mechanical Equilibrium" |
---|
456 | OutletLiquid.P = OutletVapour.P; |
---|
457 | |
---|
458 | "Thermal Equilibrium" |
---|
459 | OutletLiquid.T = OutletVapour.T; |
---|
460 | |
---|
461 | "Pressure Drop" |
---|
462 | OutletLiquid.P = InletLiquid.P - Pdrop; |
---|
463 | |
---|
464 | "Geometry Constraint" |
---|
465 | V = ML*vL + MV*vV; |
---|
466 | |
---|
467 | "Level of liquid phase" |
---|
468 | Level = ML*vL/Across; |
---|
469 | |
---|
470 | "Temperature Indicator" |
---|
471 | TI * 'K' = OutletLiquid.T; |
---|
472 | |
---|
473 | "Pressure Indicator" |
---|
474 | PI * 'atm' = OutletLiquid.P; |
---|
475 | |
---|
476 | "Level indicator" |
---|
477 | LI*V = Level*Across; |
---|
478 | |
---|
479 | end |
---|