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