1 | #*---------------------------------------------------------------------- |
---|
2 | * File containg models of columns: distillation, stripping, absorbers |
---|
3 | * rectifier, .... |
---|
4 | * |
---|
5 | * The default nomenclature is: |
---|
6 | * Type_Column_reboilertype_condensertyper |
---|
7 | * |
---|
8 | * where: |
---|
9 | * Type = refluxed or reboiled or section |
---|
10 | * Column = Stripping, Absorption, Rectifier, Distillation |
---|
11 | * Reboiler type (if exists) = kettle or thermosyphon |
---|
12 | * Condenser type (if exists) = with subccoling or without subcooling |
---|
13 | * |
---|
14 | *----------------------------------------------------------------------- |
---|
15 | * Author: Paula B. Staudt |
---|
16 | * $Id: column.mso 6 2006-06-29 20:28:01Z paula $ |
---|
17 | *---------------------------------------------------------------------*# |
---|
18 | |
---|
19 | using "tray"; |
---|
20 | using "reboiler"; |
---|
21 | using "condenser"; |
---|
22 | using "mixers_splitters/splitter"; |
---|
23 | using "mixers_splitters/mixer"; |
---|
24 | using "tank"; |
---|
25 | using "pressure_changers/pump"; |
---|
26 | |
---|
27 | #*---------------------------------------------------------------------- |
---|
28 | * Model of a column section with: |
---|
29 | * - NTrays=number of trays trays. |
---|
30 | * |
---|
31 | *---------------------------------------------------------------------*# |
---|
32 | Model Section_Column |
---|
33 | PARAMETERS |
---|
34 | ext PP as CalcObject; |
---|
35 | ext NComp as Integer; |
---|
36 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
37 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
38 | top as Integer(Brief="Number of top tray"); |
---|
39 | bot as Integer(Brief="Number of bottom tray"); |
---|
40 | |
---|
41 | SET |
---|
42 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
43 | bot = NTrays/top; |
---|
44 | |
---|
45 | VARIABLES |
---|
46 | trays(NTrays) as tray; |
---|
47 | |
---|
48 | EQUATIONS |
---|
49 | "Pressure Drop through the tray" |
---|
50 | trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
51 | (trays([top:topdown:bot]).OutletV.P - |
---|
52 | trays([top:topdown:bot]).InletL.P)))/2 * |
---|
53 | trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * |
---|
54 | sqrt(2*(trays([top:topdown:bot]).OutletV.P - |
---|
55 | trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
56 | (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); |
---|
57 | |
---|
58 | CONNECTIONS |
---|
59 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
60 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
61 | end |
---|
62 | |
---|
63 | |
---|
64 | #*---------------------------------------------------------------------- |
---|
65 | * Model of a distillation column containing: |
---|
66 | * - NTrays like tray; |
---|
67 | * - a kettle reboiler; |
---|
68 | * - dymamic condenser; |
---|
69 | * - a splitter which separate reflux and distillate; |
---|
70 | * - a pump in reflux stream; |
---|
71 | *---------------------------------------------------------------------*# |
---|
72 | Model Distillation_kettle_cond |
---|
73 | PARAMETERS |
---|
74 | ext PP as CalcObject; |
---|
75 | ext NComp as Integer; |
---|
76 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
77 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
78 | top as Integer(Brief="Number of top tray"); |
---|
79 | bot as Integer(Brief="Number of bottom tray"); |
---|
80 | |
---|
81 | SET |
---|
82 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
83 | bot = NTrays/top; |
---|
84 | |
---|
85 | VARIABLES |
---|
86 | trays(NTrays) as tray; |
---|
87 | cond as condenser; |
---|
88 | reb as reboiler; |
---|
89 | sptop as splitter; |
---|
90 | pump1 as pump; |
---|
91 | |
---|
92 | EQUATIONS |
---|
93 | if (reb.OutletV.P > reb.InletL.P) then |
---|
94 | "Pressure Drop through the reboiler" |
---|
95 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
96 | / (trays(bot).beta*reb.rhoV) ); |
---|
97 | else |
---|
98 | "No flow in reboiler" |
---|
99 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
100 | end |
---|
101 | |
---|
102 | "Pressure Drop through the tray" |
---|
103 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
104 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
105 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
106 | |
---|
107 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
108 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
109 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
110 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
111 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
112 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
113 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
114 | |
---|
115 | CONNECTIONS |
---|
116 | #vapor |
---|
117 | reb.OutletV to trays(bot).InletV; |
---|
118 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
119 | trays(top).OutletV to cond.InletV; |
---|
120 | |
---|
121 | #liquid |
---|
122 | cond.OutletL to sptop.Inlet; |
---|
123 | sptop.Outlet2 to pump1.Inlet; |
---|
124 | pump1.Outlet to trays(top).InletL; |
---|
125 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
126 | trays(bot).OutletL to reb.InletL; |
---|
127 | end |
---|
128 | |
---|
129 | |
---|
130 | #* ------------------------------------------------------------------- |
---|
131 | * Distillation Column model with: |
---|
132 | * |
---|
133 | * - NTrays like tray; |
---|
134 | * - a vessel in the bottom of column; |
---|
135 | * - a splitter who separate the bottom product and the stream to reboiler; |
---|
136 | * - steady state reboiler (thermosyphon); |
---|
137 | * - a steady state condenser with subcooling; |
---|
138 | * - a vessel drum (layed cilinder); |
---|
139 | * - a splitter which separate reflux and distillate; |
---|
140 | * - a pump in reflux stream. |
---|
141 | * |
---|
142 | * ------------------------------------------------------------------*# |
---|
143 | Model Distillation_thermosyphon_subcooling |
---|
144 | PARAMETERS |
---|
145 | ext PP as CalcObject; |
---|
146 | ext NComp as Integer; |
---|
147 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
148 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
149 | top as Integer(Brief="Number of top tray"); |
---|
150 | bot as Integer(Brief="Number of bottom tray"); |
---|
151 | |
---|
152 | SET |
---|
153 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
154 | bot = NTrays/top; |
---|
155 | |
---|
156 | VARIABLES |
---|
157 | trays(NTrays) as tray; |
---|
158 | cond as condenserSteady; |
---|
159 | reb as reboilerSteady; |
---|
160 | tbottom as tank; |
---|
161 | ttop as tank_cylindrical; |
---|
162 | spbottom as splitter; |
---|
163 | sptop as splitter; |
---|
164 | pump1 as pump; |
---|
165 | |
---|
166 | EQUATIONS |
---|
167 | if (reb.OutletV.P > reb.InletL.P) then |
---|
168 | "Pressure Drop through the reboiler" |
---|
169 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
170 | / (trays(bot).beta*reb.rhoV) ); |
---|
171 | else |
---|
172 | "No flow in reboiler" |
---|
173 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
174 | end |
---|
175 | |
---|
176 | "Pressure Drop through the tray" |
---|
177 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * |
---|
178 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
179 | ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
180 | |
---|
181 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
182 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
183 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
184 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
185 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
186 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
187 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
188 | |
---|
189 | CONNECTIONS |
---|
190 | #vapor |
---|
191 | reb.OutletV to trays(bot).InletV; |
---|
192 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
193 | trays(top).OutletV to cond.InletV; |
---|
194 | |
---|
195 | #liquid |
---|
196 | cond.OutletL to ttop.Inlet; |
---|
197 | ttop.Outlet to sptop.Inlet; |
---|
198 | sptop.Outlet2 to pump1.Inlet; |
---|
199 | pump1.Outlet to trays(top).InletL; |
---|
200 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
201 | trays(bot).OutletL to tbottom.Inlet; |
---|
202 | tbottom.Outlet to spbottom.Inlet; |
---|
203 | spbottom.Outlet2 to reb.InletL; |
---|
204 | end |
---|
205 | |
---|
206 | |
---|
207 | #* ------------------------------------------------------------------- |
---|
208 | * Distillation Column model with: |
---|
209 | * |
---|
210 | * - NTrays like tray; |
---|
211 | * - a vessel in the bottom of column; |
---|
212 | * - a splitter who separate the bottom product and the stream to reboiler; |
---|
213 | * - steady state reboiler (thermosyphon); |
---|
214 | * - a dynamic condenser without subcooling; |
---|
215 | * - a splitter which separate reflux and distillate; |
---|
216 | * - a pump in reflux stream. |
---|
217 | * |
---|
218 | * ------------------------------------------------------------------*# |
---|
219 | Model Distillation_thermosyphon_cond |
---|
220 | PARAMETERS |
---|
221 | ext PP as CalcObject; |
---|
222 | ext NComp as Integer; |
---|
223 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
224 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
225 | top as Integer(Brief="Number of top tray"); |
---|
226 | bot as Integer(Brief="Number of bottom tray"); |
---|
227 | |
---|
228 | SET |
---|
229 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
230 | bot = NTrays/top; |
---|
231 | |
---|
232 | VARIABLES |
---|
233 | trays(NTrays) as tray; |
---|
234 | cond as condenser; |
---|
235 | reb as reboilerSteady; |
---|
236 | tbottom as tank; |
---|
237 | spbottom as splitter; |
---|
238 | sptop as splitter; |
---|
239 | pump1 as pump; |
---|
240 | |
---|
241 | EQUATIONS |
---|
242 | if (reb.OutletV.P > reb.InletL.P) then |
---|
243 | "Pressure Drop through the reboiler" |
---|
244 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
245 | / (trays(bot).beta*reb.rhoV) ); |
---|
246 | else |
---|
247 | "No flow in reboiler" |
---|
248 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
249 | end |
---|
250 | |
---|
251 | "Pressure Drop through the tray" |
---|
252 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
253 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
254 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
255 | |
---|
256 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
257 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
258 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
259 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
260 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
261 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
262 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
263 | |
---|
264 | CONNECTIONS |
---|
265 | #vapor |
---|
266 | reb.OutletV to trays(bot).InletV; |
---|
267 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
268 | trays(top).OutletV to cond.InletV; |
---|
269 | |
---|
270 | #liquid |
---|
271 | cond.OutletL to sptop.Inlet; |
---|
272 | sptop.Outlet2 to pump1.Inlet; |
---|
273 | pump1.Outlet to trays(top).InletL; |
---|
274 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
275 | trays(bot).OutletL to tbottom.Inlet; |
---|
276 | tbottom.Outlet to spbottom.Inlet; |
---|
277 | spbottom.Outlet2 to reb.InletL; |
---|
278 | end |
---|
279 | |
---|
280 | |
---|
281 | #* ------------------------------------------------------------------- |
---|
282 | * Distillation Column model with: |
---|
283 | * |
---|
284 | * - NTrays like tray; |
---|
285 | * - a vessel in the bottom of column; |
---|
286 | * - a splitter who separate the bottom product and the stream to reboiler; |
---|
287 | * - steady state reboiler (thermosyphon) with partial vaporization; |
---|
288 | * - a dynamic condenser without subcooling; |
---|
289 | * - a splitter which separate reflux and distillate; |
---|
290 | * - a pump in reflux stream. |
---|
291 | * |
---|
292 | * ------------------------------------------------------------------*# |
---|
293 | Model Distillation_thermosyphon_partial_cond |
---|
294 | PARAMETERS |
---|
295 | ext PP as CalcObject; |
---|
296 | ext NComp as Integer; |
---|
297 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
298 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
299 | top as Integer(Brief="Number of top tray"); |
---|
300 | bot as Integer(Brief="Number of bottom tray"); |
---|
301 | |
---|
302 | SET |
---|
303 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
304 | bot = NTrays/top; |
---|
305 | |
---|
306 | VARIABLES |
---|
307 | trays(NTrays) as tray; |
---|
308 | cond as condenser; |
---|
309 | reb as reboilerSteady_partial; |
---|
310 | mix as mixer_phase; |
---|
311 | tbottom as tank; |
---|
312 | spbottom as splitter; |
---|
313 | sptop as splitter; |
---|
314 | pump1 as pump; |
---|
315 | |
---|
316 | SET |
---|
317 | mix.Npres = 1; |
---|
318 | |
---|
319 | EQUATIONS |
---|
320 | |
---|
321 | if (reb.OutletV.P > reb.InletL.P) then |
---|
322 | "Pressure Drop through the reboiler" |
---|
323 | reb.InletL.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
324 | / (trays(bot).beta*reb.rho) ); |
---|
325 | else |
---|
326 | "No flow in reboiler" |
---|
327 | reb.InletL.F = 0.0 * "mol/s"; |
---|
328 | end |
---|
329 | |
---|
330 | if trays(1).vV > 0 then |
---|
331 | "Pressure Drop through the tray" |
---|
332 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
333 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
334 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
335 | else |
---|
336 | "Pressure Drop through the tray" |
---|
337 | trays(top).OutletV.F = 0; |
---|
338 | end |
---|
339 | |
---|
340 | for i in [top+topdown:topdown:bot] |
---|
341 | if trays(i).vV > 0 then |
---|
342 | trays(i).OutletV.F = (1 + tanh(1 * (trays(i).OutletV.P - trays(i).InletL.P)))/2 * |
---|
343 | trays(i).Ah/trays(i).vV * sqrt(2*(trays(i).OutletV.P - |
---|
344 | trays(i).InletL.P + 1e-8 * "atm") / (trays(i).alfa*trays(i).rhoV)); |
---|
345 | else |
---|
346 | trays(i).OutletV.F = 0; |
---|
347 | end |
---|
348 | end |
---|
349 | |
---|
350 | CONNECTIONS |
---|
351 | #vapor |
---|
352 | reb.OutletV to trays(bot).InletV; |
---|
353 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
354 | trays(top).OutletV to cond.InletV; |
---|
355 | |
---|
356 | #liquid |
---|
357 | cond.OutletL to sptop.Inlet; |
---|
358 | sptop.Outlet2 to pump1.Inlet; |
---|
359 | pump1.Outlet to trays(top).InletL; |
---|
360 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
361 | # trays(bot).OutletL to tbottom.Inlet; |
---|
362 | trays(bot).OutletL to mix.Inlet_mixer(1); |
---|
363 | reb.OutletL to mix.Inlet_mixer(2); |
---|
364 | mix.Outlet to tbottom.Inlet; |
---|
365 | tbottom.Outlet to spbottom.Inlet; |
---|
366 | spbottom.Outlet2 to reb.InletL; |
---|
367 | end |
---|
368 | |
---|
369 | |
---|
370 | #* ------------------------------------------------------------------- |
---|
371 | * Distillation Column model with: |
---|
372 | * |
---|
373 | * - NTrays like tray; |
---|
374 | * - a kettle reboiler; |
---|
375 | * - a steady state condenser with subcooling; |
---|
376 | * - a vessel drum (layed cilinder); |
---|
377 | * - a splitter which separate reflux and distillate; |
---|
378 | * - a pump in reflux stream. |
---|
379 | * |
---|
380 | * ------------------------------------------------------------------*# |
---|
381 | Model Distillation_kettle_subcooling |
---|
382 | PARAMETERS |
---|
383 | ext PP as CalcObject; |
---|
384 | ext NComp as Integer; |
---|
385 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
386 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
387 | top as Integer(Brief="Number of top tray"); |
---|
388 | bot as Integer(Brief="Number of bottom tray"); |
---|
389 | |
---|
390 | SET |
---|
391 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
392 | bot = NTrays/top; |
---|
393 | |
---|
394 | VARIABLES |
---|
395 | trays(NTrays) as tray; |
---|
396 | cond as condenserSteady; |
---|
397 | reb as reboiler; |
---|
398 | ttop as tank_cylindrical; |
---|
399 | sptop as splitter; |
---|
400 | pump1 as pump; |
---|
401 | |
---|
402 | EQUATIONS |
---|
403 | if (reb.OutletV.P > reb.InletL.P) then |
---|
404 | "Pressure Drop through the reboiler" |
---|
405 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
406 | / (trays(bot).beta*reb.rhoV) ); |
---|
407 | else |
---|
408 | "No flow in reboiler" |
---|
409 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
410 | end |
---|
411 | |
---|
412 | "Pressure Drop through the tray" |
---|
413 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * |
---|
414 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
415 | ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
416 | |
---|
417 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
418 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
419 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
420 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
421 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
422 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
423 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
424 | |
---|
425 | CONNECTIONS |
---|
426 | #vapor |
---|
427 | reb.OutletV to trays(bot).InletV; |
---|
428 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
429 | trays(top).OutletV to cond.InletV; |
---|
430 | |
---|
431 | #liquid |
---|
432 | cond.OutletL to ttop.Inlet; |
---|
433 | ttop.Outlet to sptop.Inlet; |
---|
434 | sptop.Outlet2 to pump1.Inlet; |
---|
435 | pump1.Outlet to trays(top).InletL; |
---|
436 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
437 | trays(bot).OutletL to reb.InletL; |
---|
438 | end |
---|
439 | |
---|
440 | |
---|
441 | #*---------------------------------------------------------------------- |
---|
442 | * Model of a rectifier containing: |
---|
443 | * - NTrays like tray; |
---|
444 | * - dymamic condenser without subcooling; |
---|
445 | * - a splitter which separate reflux and distillate; |
---|
446 | * - a pump in reflux stream; |
---|
447 | *---------------------------------------------------------------------*# |
---|
448 | Model Rectifier |
---|
449 | PARAMETERS |
---|
450 | ext PP as CalcObject; |
---|
451 | ext NComp as Integer; |
---|
452 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
453 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
454 | top as Integer(Brief="Number of top tray"); |
---|
455 | bot as Integer(Brief="Number of bottom tray"); |
---|
456 | |
---|
457 | SET |
---|
458 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
459 | bot = NTrays/top; |
---|
460 | |
---|
461 | VARIABLES |
---|
462 | trays(NTrays) as tray; |
---|
463 | cond as condenser; |
---|
464 | sptop as splitter; |
---|
465 | pump1 as pump; |
---|
466 | |
---|
467 | EQUATIONS |
---|
468 | "Pressure Drop through the tray" |
---|
469 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
470 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
471 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
472 | |
---|
473 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
474 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
475 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
476 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
477 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
478 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
479 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
480 | |
---|
481 | CONNECTIONS |
---|
482 | #vapor |
---|
483 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
484 | trays(top).OutletV to cond.InletV; |
---|
485 | |
---|
486 | #liquid |
---|
487 | cond.OutletL to sptop.Inlet; |
---|
488 | sptop.Outlet2 to pump1.Inlet; |
---|
489 | pump1.Outlet to trays(top).InletL; |
---|
490 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
491 | end |
---|
492 | |
---|
493 | |
---|
494 | #* ------------------------------------------------------------------- |
---|
495 | * Rectifier Column with: |
---|
496 | * |
---|
497 | * - NTrays like tray; |
---|
498 | * - a steady state condenser with subcooling; |
---|
499 | * - a vessel drum (layed cilinder); |
---|
500 | * - a splitter which separate reflux and distillate; |
---|
501 | * - a pump in reflux stream. |
---|
502 | * |
---|
503 | * ------------------------------------------------------------------*# |
---|
504 | Model Rectifier_subcooling |
---|
505 | PARAMETERS |
---|
506 | ext PP as CalcObject; |
---|
507 | ext NComp as Integer; |
---|
508 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
509 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
510 | top as Integer(Brief="Number of top tray"); |
---|
511 | bot as Integer(Brief="Number of bottom tray"); |
---|
512 | |
---|
513 | SET |
---|
514 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
515 | bot = NTrays/top; |
---|
516 | |
---|
517 | VARIABLES |
---|
518 | trays(NTrays) as tray; |
---|
519 | cond as condenserSteady; |
---|
520 | ttop as tank_cylindrical; |
---|
521 | sptop as splitter; |
---|
522 | pump1 as pump; |
---|
523 | |
---|
524 | EQUATIONS |
---|
525 | "Pressure Drop through the tray" |
---|
526 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * |
---|
527 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
528 | ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
529 | |
---|
530 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
531 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
532 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
533 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
534 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
535 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
536 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
537 | |
---|
538 | CONNECTIONS |
---|
539 | #vapor |
---|
540 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
541 | trays(top).OutletV to cond.InletV; |
---|
542 | |
---|
543 | #liquid |
---|
544 | cond.OutletL to ttop.Inlet; |
---|
545 | ttop.Outlet to sptop.Inlet; |
---|
546 | sptop.Outlet2 to pump1.Inlet; |
---|
547 | pump1.Outlet to trays(top).InletL; |
---|
548 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
549 | end |
---|
550 | |
---|
551 | |
---|
552 | #*---------------------------------------------------------------------- |
---|
553 | * Model of a Refluxed Stripping column containing: |
---|
554 | * - NTrays like tray; |
---|
555 | * - dymamic condenser without subcooling; |
---|
556 | * - a splitter which separate reflux and distillate; |
---|
557 | * - a pump in reflux stream; |
---|
558 | *---------------------------------------------------------------------*# |
---|
559 | Model Refluxed_Stripping |
---|
560 | PARAMETERS |
---|
561 | ext PP as CalcObject; |
---|
562 | ext NComp as Integer; |
---|
563 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
564 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
565 | top as Integer(Brief="Number of top tray"); |
---|
566 | bot as Integer(Brief="Number of bottom tray"); |
---|
567 | |
---|
568 | SET |
---|
569 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
570 | bot = NTrays/top; |
---|
571 | |
---|
572 | VARIABLES |
---|
573 | trays(NTrays) as tray; |
---|
574 | cond as condenser; |
---|
575 | sptop as splitter; |
---|
576 | pump1 as pump; |
---|
577 | |
---|
578 | EQUATIONS |
---|
579 | "Pressure Drop through the tray" |
---|
580 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
581 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
582 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
583 | |
---|
584 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
585 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
586 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
587 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
588 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
589 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
590 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
591 | |
---|
592 | CONNECTIONS |
---|
593 | #vapor |
---|
594 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
595 | trays(top).OutletV to cond.InletV; |
---|
596 | |
---|
597 | #liquid |
---|
598 | cond.OutletL to sptop.Inlet; |
---|
599 | sptop.Outlet2 to pump1.Inlet; |
---|
600 | pump1.Outlet to trays(top).InletL; |
---|
601 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
602 | end |
---|
603 | |
---|
604 | |
---|
605 | #* ------------------------------------------------------------------- |
---|
606 | * Refluxed Stripping Column with: |
---|
607 | * |
---|
608 | * - NTrays like tray; |
---|
609 | * - a steady state condenser (with subcooling); |
---|
610 | * - a vessel drum (layed cilinder); |
---|
611 | * - a splitter which separate reflux and distillate; |
---|
612 | * - a pump in reflux stream. |
---|
613 | * |
---|
614 | * ------------------------------------------------------------------*# |
---|
615 | Model Refluxed_Stripping_subcooling |
---|
616 | PARAMETERS |
---|
617 | ext PP as CalcObject; |
---|
618 | ext NComp as Integer; |
---|
619 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
620 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
621 | top as Integer(Brief="Number of top tray"); |
---|
622 | bot as Integer(Brief="Number of bottom tray"); |
---|
623 | |
---|
624 | SET |
---|
625 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
626 | bot = NTrays/top; |
---|
627 | |
---|
628 | VARIABLES |
---|
629 | trays(NTrays) as tray; |
---|
630 | cond as condenserSteady; |
---|
631 | ttop as tank_cylindrical; |
---|
632 | sptop as splitter; |
---|
633 | pump1 as pump; |
---|
634 | |
---|
635 | EQUATIONS |
---|
636 | "Pressure Drop through the tray" |
---|
637 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * |
---|
638 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
639 | ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
640 | |
---|
641 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
642 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
643 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
644 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
645 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
646 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
647 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
648 | |
---|
649 | CONNECTIONS |
---|
650 | #vapor |
---|
651 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
652 | trays(top).OutletV to cond.InletV; |
---|
653 | |
---|
654 | #liquid |
---|
655 | cond.OutletL to ttop.Inlet; |
---|
656 | ttop.Outlet to sptop.Inlet; |
---|
657 | sptop.Outlet2 to pump1.Inlet; |
---|
658 | pump1.Outlet to trays(top).InletL; |
---|
659 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
660 | end |
---|
661 | |
---|
662 | |
---|
663 | #*---------------------------------------------------------------------- |
---|
664 | * Model of a Refluxed Absorption column containing: |
---|
665 | * - NTrays like tray; |
---|
666 | * - dymamic condenser without subcooling; |
---|
667 | * - a splitter which separate reflux and distillate; |
---|
668 | * - a pump in reflux stream; |
---|
669 | *---------------------------------------------------------------------*# |
---|
670 | Model Refluxed_Absorption |
---|
671 | PARAMETERS |
---|
672 | ext PP as CalcObject; |
---|
673 | ext NComp as Integer; |
---|
674 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
675 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
676 | top as Integer(Brief="Number of top tray"); |
---|
677 | bot as Integer(Brief="Number of bottom tray"); |
---|
678 | |
---|
679 | SET |
---|
680 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
681 | bot = NTrays/top; |
---|
682 | |
---|
683 | VARIABLES |
---|
684 | trays(NTrays) as tray; |
---|
685 | cond as condenser; |
---|
686 | sptop as splitter; |
---|
687 | pump1 as pump; |
---|
688 | |
---|
689 | EQUATIONS |
---|
690 | "Pressure Drop through the tray" |
---|
691 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * |
---|
692 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
693 | cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
694 | |
---|
695 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
696 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
697 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
698 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
699 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
700 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
701 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
702 | |
---|
703 | CONNECTIONS |
---|
704 | #vapor |
---|
705 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
706 | trays(top).OutletV to cond.InletV; |
---|
707 | |
---|
708 | #liquid |
---|
709 | cond.OutletL to cond.InletV; |
---|
710 | cond.OutletL to sptop.Inlet; |
---|
711 | sptop.Outlet2 to pump1.Inlet; |
---|
712 | pump1.Outlet to trays(top).InletL; |
---|
713 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
714 | end |
---|
715 | |
---|
716 | |
---|
717 | #* ------------------------------------------------------------------- |
---|
718 | * Refluxed Absorption Column with: |
---|
719 | * |
---|
720 | * - NTrays like tray; |
---|
721 | * - a steady state condenser (with subcooling); |
---|
722 | * - a vessel drum (layed cilinder); |
---|
723 | * - a splitter which separate reflux and distillate; |
---|
724 | * - a pump in reflux stream. |
---|
725 | * |
---|
726 | * ------------------------------------------------------------------*# |
---|
727 | Model Refluxed_Absorption_subcooling |
---|
728 | PARAMETERS |
---|
729 | ext PP as CalcObject; |
---|
730 | ext NComp as Integer; |
---|
731 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
732 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
733 | top as Integer(Brief="Number of top tray"); |
---|
734 | bot as Integer(Brief="Number of bottom tray"); |
---|
735 | |
---|
736 | SET |
---|
737 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
738 | bot = NTrays/top; |
---|
739 | |
---|
740 | VARIABLES |
---|
741 | trays(NTrays) as tray; |
---|
742 | cond as condenserSteady; |
---|
743 | ttop as tank_cylindrical; |
---|
744 | sptop as splitter; |
---|
745 | pump1 as pump; |
---|
746 | |
---|
747 | EQUATIONS |
---|
748 | "Pressure Drop through the tray" |
---|
749 | trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * |
---|
750 | trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - |
---|
751 | ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); |
---|
752 | |
---|
753 | trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
754 | (trays([top+topdown:topdown:bot]).OutletV.P - |
---|
755 | trays([top+topdown:topdown:bot]).InletL.P)))/2 * |
---|
756 | trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * |
---|
757 | sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - |
---|
758 | trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
759 | (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); |
---|
760 | |
---|
761 | CONNECTIONS |
---|
762 | #vapor |
---|
763 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
764 | trays(top).OutletV to cond.InletV; |
---|
765 | |
---|
766 | #liquid |
---|
767 | cond.OutletL to ttop.Inlet; |
---|
768 | ttop.Outlet to sptop.Inlet; |
---|
769 | sptop.Outlet2 to pump1.Inlet; |
---|
770 | pump1.Outlet to trays(top).InletL; |
---|
771 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
772 | end |
---|
773 | |
---|
774 | |
---|
775 | #* ------------------------------------------------------------------- |
---|
776 | * Reboiled Stripping Column model with: |
---|
777 | * |
---|
778 | * - NTrays like tray; |
---|
779 | * - a kettle reboiler; |
---|
780 | * |
---|
781 | * ------------------------------------------------------------------*# |
---|
782 | Model Reboiled_Stripping_kettle |
---|
783 | PARAMETERS |
---|
784 | ext PP as CalcObject; |
---|
785 | ext NComp as Integer; |
---|
786 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
787 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
788 | top as Integer(Brief="Number of top tray"); |
---|
789 | bot as Integer(Brief="Number of bottom tray"); |
---|
790 | |
---|
791 | SET |
---|
792 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
793 | bot = NTrays/top; |
---|
794 | |
---|
795 | VARIABLES |
---|
796 | trays(NTrays) as tray; |
---|
797 | reb as reboiler; |
---|
798 | |
---|
799 | EQUATIONS |
---|
800 | if (reb.OutletV.P > reb.InletL.P) then |
---|
801 | "Pressure Drop through the tray" |
---|
802 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
803 | / (trays(bot).beta*reb.rhoV) ); |
---|
804 | else |
---|
805 | "Prato selado" |
---|
806 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
807 | end |
---|
808 | |
---|
809 | "Pressure Drop through the tray" |
---|
810 | trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
811 | (trays([top:topdown:bot]).OutletV.P - |
---|
812 | trays([top:topdown:bot]).InletL.P)))/2 * |
---|
813 | trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * |
---|
814 | sqrt(2*(trays([top:topdown:bot]).OutletV.P - |
---|
815 | trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
816 | (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); |
---|
817 | |
---|
818 | CONNECTIONS |
---|
819 | #vapor |
---|
820 | reb.OutletV to trays(bot).InletV; |
---|
821 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
822 | |
---|
823 | #liquid |
---|
824 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
825 | trays(bot).OutletL to reb.InletL; |
---|
826 | end |
---|
827 | |
---|
828 | |
---|
829 | #* ------------------------------------------------------------------- |
---|
830 | * Reboiled Stripping Column model with: |
---|
831 | * |
---|
832 | * - NTrays like tray; |
---|
833 | * - a vessel in the bottom of column; |
---|
834 | * - a splitter which separate the bottom product and the stream to reboiler; |
---|
835 | * - steady state reboiler (thermosyphon); |
---|
836 | * |
---|
837 | * ------------------------------------------------------------------*# |
---|
838 | Model Reboiled_Stripping_thermosyphon |
---|
839 | PARAMETERS |
---|
840 | ext PP as CalcObject; |
---|
841 | ext NComp as Integer; |
---|
842 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
843 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
844 | top as Integer(Brief="Number of top tray"); |
---|
845 | bot as Integer(Brief="Number of bottom tray"); |
---|
846 | |
---|
847 | SET |
---|
848 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
849 | bot = NTrays/top; |
---|
850 | |
---|
851 | VARIABLES |
---|
852 | trays(NTrays) as tray; |
---|
853 | reb as reboilerSteady; |
---|
854 | spbottom as splitter; |
---|
855 | tbottom as tank; |
---|
856 | |
---|
857 | EQUATIONS |
---|
858 | if (reb.OutletV.P > reb.InletL.P) then |
---|
859 | "Pressure Drop through the tray" |
---|
860 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
861 | / (trays(bot).beta*reb.rhoV) ); |
---|
862 | else |
---|
863 | "Prato selado" |
---|
864 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
865 | end |
---|
866 | |
---|
867 | "Pressure Drop through the tray" |
---|
868 | trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
869 | (trays([top:topdown:bot]).OutletV.P - |
---|
870 | trays([top:topdown:bot]).InletL.P)))/2 * |
---|
871 | trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * |
---|
872 | sqrt(2*(trays([top:topdown:bot]).OutletV.P - |
---|
873 | trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
874 | (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); |
---|
875 | |
---|
876 | CONNECTIONS |
---|
877 | #vapor |
---|
878 | reb.OutletV to trays(bot).InletV; |
---|
879 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
880 | |
---|
881 | #liquid |
---|
882 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
883 | trays(bot).OutletL to tbottom.Inlet; |
---|
884 | tbottom.Outlet to spbottom.Inlet; |
---|
885 | spbottom.Outlet2 to reb.InletL; |
---|
886 | end |
---|
887 | |
---|
888 | |
---|
889 | #* ------------------------------------------------------------------- |
---|
890 | * Reboiled Absorption Column model with: |
---|
891 | * |
---|
892 | * - NTrays like tray; |
---|
893 | * - a kettle reboiler; |
---|
894 | * |
---|
895 | * ------------------------------------------------------------------*# |
---|
896 | Model Reboiled_Absorption_kettle |
---|
897 | PARAMETERS |
---|
898 | ext PP as CalcObject; |
---|
899 | ext NComp as Integer; |
---|
900 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
901 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
902 | top as Integer(Brief="Number of top tray"); |
---|
903 | bot as Integer(Brief="Number of bottom tray"); |
---|
904 | |
---|
905 | SET |
---|
906 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
907 | bot = NTrays/top; |
---|
908 | |
---|
909 | VARIABLES |
---|
910 | trays(NTrays) as tray; |
---|
911 | reb as reboiler; |
---|
912 | |
---|
913 | EQUATIONS |
---|
914 | if (reb.OutletV.P > reb.InletL.P) then |
---|
915 | "Pressure Drop through the tray" |
---|
916 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
917 | / (trays(bot).beta*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3 |
---|
918 | else |
---|
919 | "Prato selado" |
---|
920 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
921 | end |
---|
922 | |
---|
923 | "Pressure Drop through the tray" |
---|
924 | trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
925 | (trays([top:topdown:bot]).OutletV.P - |
---|
926 | trays([top:topdown:bot]).InletL.P)))/2 * |
---|
927 | trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * |
---|
928 | sqrt(2*(trays([top:topdown:bot]).OutletV.P - |
---|
929 | trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
930 | (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); |
---|
931 | |
---|
932 | CONNECTIONS |
---|
933 | #vapor |
---|
934 | reb.OutletV to trays(bot).InletV; |
---|
935 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
936 | |
---|
937 | #liquid |
---|
938 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
939 | trays(bot).OutletL to reb.InletL; |
---|
940 | end |
---|
941 | |
---|
942 | |
---|
943 | #* ------------------------------------------------------------------- |
---|
944 | * Reboiled Absorption Column model with: |
---|
945 | * |
---|
946 | * - NTrays like tray; |
---|
947 | * - a vessel in the bottom of column; |
---|
948 | * - a splitter which separate the bottom product and the stream to reboiler; |
---|
949 | * - steady state reboiler (thermosyphon); |
---|
950 | * |
---|
951 | * ------------------------------------------------------------------*# |
---|
952 | Model Reboiled_Absorption_thermosyphon |
---|
953 | PARAMETERS |
---|
954 | ext PP as CalcObject; |
---|
955 | ext NComp as Integer; |
---|
956 | NTrays as Integer(Brief="Number of trays", Default=2); |
---|
957 | topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); |
---|
958 | top as Integer(Brief="Number of top tray"); |
---|
959 | bot as Integer(Brief="Number of bottom tray"); |
---|
960 | |
---|
961 | SET |
---|
962 | top = (NTrays-1)*(1-topdown)/2+1; |
---|
963 | bot = NTrays/top; |
---|
964 | |
---|
965 | VARIABLES |
---|
966 | trays(NTrays) as tray; |
---|
967 | reb as reboilerSteady; |
---|
968 | spbottom as splitter; |
---|
969 | tbottom as tank; |
---|
970 | |
---|
971 | EQUATIONS |
---|
972 | if (reb.OutletV.P > reb.InletL.P) then |
---|
973 | "Pressure Drop through the tray" |
---|
974 | reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) |
---|
975 | / (trays(bot).beta*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3 |
---|
976 | else |
---|
977 | "Prato selado" |
---|
978 | reb.OutletV.F = 0.0 * "mol/s"; |
---|
979 | end |
---|
980 | |
---|
981 | "Pressure Drop through the tray" |
---|
982 | trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * |
---|
983 | (trays([top:topdown:bot]).OutletV.P - |
---|
984 | trays([top:topdown:bot]).InletL.P)))/2 * |
---|
985 | trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * |
---|
986 | sqrt(2*(trays([top:topdown:bot]).OutletV.P - |
---|
987 | trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / |
---|
988 | (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); |
---|
989 | |
---|
990 | CONNECTIONS |
---|
991 | #vapor |
---|
992 | reb.OutletV to trays(bot).InletV; |
---|
993 | trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; |
---|
994 | |
---|
995 | #liquid |
---|
996 | trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; |
---|
997 | trays(bot).OutletL to tbottom.Inlet; |
---|
998 | tbottom.Outlet to spbottom.Inlet; |
---|
999 | spbottom.Outlet2 to reb.InletL; |
---|
1000 | end |
---|