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