source: mso/eml/stage_separators/column.mso @ 1

Last change on this file since 1 was 1, checked in by Rafael de Pelegrini Soares, 16 years ago

Initial import of the library

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 23.8 KB
Line 
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 1 2006-06-20 17:33:53Z rafael $
17*---------------------------------------------------------------------*#
18
19using "tray";
20using "reboiler";
21using "condenser";
22using "mixers_splitters/splitter";
23using "tank";
24using "pressure_changers/pump";
25
26#*----------------------------------------------------------------------
27* Model of a  column section with:
28*       - NTrays=number of trays trays.
29*
30*---------------------------------------------------------------------*#
31Model Section_Column
32        PARAMETERS
33ext PP as CalcObject;
34ext NComp as Integer;
35        NTrays as Integer(Brief="Number of trays", Default=2);
36       
37        VARIABLES
38        trays(NTrays) as tray;
39
40        EQUATIONS
41        "Pressure Drop through the tray"
42        trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 *
43                trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P -
44                trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV));
45       
46        CONNECTIONS
47        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
48        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
49end
50
51
52#*----------------------------------------------------------------------
53* Model of a  distillation column containing:
54*       - NTrays like tray;
55*       - a kettle reboiler;
56*       - dymamic condenser;
57*       - a splitter which separate reflux and distillate;
58*       - a pump in reflux stream;
59*---------------------------------------------------------------------*#
60Model Distillation_kettle_cond
61        PARAMETERS
62ext PP as CalcObject;
63ext NComp as Integer;
64        NTrays as Integer(Brief="Number of trays", Default=2);
65       
66        VARIABLES
67        trays(NTrays) as tray;
68        cond as condenser;
69        reb as reboiler;
70        sp as splitter;
71        pump1 as pump;
72
73        EQUATIONS
74        if (reb.OutletV.P > reb.InletL.P) then
75                "Pressure Drop through the tray"
76                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
77                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
78        else
79                "Prato selado"
80                reb.OutletV.F = 0.0 * "mol/s";
81        end
82
83        "Pressure Drop through the tray"
84        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *
85                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
86                cond.OutletL.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
87               
88        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
89                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
90                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
91       
92        CONNECTIONS
93        #vapor
94        reb.OutletV to trays([NTrays]).InletV;
95        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
96        trays(1).OutletV to cond.InletV;
97
98        #liquid
99        cond.OutletL to sp.Inlet;       
100        sp.Outlet2 to pump1.Inlet;
101        pump1.Outlet to trays(1).InletL;
102        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
103        trays(NTrays).OutletL to reb.InletL;
104end
105
106
107#* -------------------------------------------------------------------
108* Distillation Column model with:
109*
110*       - NTrays like tray;
111*       - a vessel in the bottom of column;
112*       - a splitter who separate the bottom product and the stream to reboiler;
113*       - steady state reboiler (thermosyphon);
114*       - a steady state condenser with subcooling;
115*       - a vessel drum (layed cilinder);
116*       - a splitter which separate reflux and distillate;
117*       - a pump in reflux stream.
118*
119* ------------------------------------------------------------------*#
120Model Distillation_thermosyphon_subcooling
121        PARAMETERS
122ext PP as CalcObject;
123ext NComp as Integer;
124        NTrays as Integer(Brief="Number of trays", Default=2);
125       
126        VARIABLES
127        trays(NTrays) as tray;
128        cond as condenserSteady;
129        reb as reboilerSteady;
130        tbottom as tank;
131        ttop as tank_cylindrical;
132        spbottom as splitter;
133        sptop as splitter;
134        pump1 as pump;
135
136        EQUATIONS
137        if (reb.OutletV.P > reb.InletL.P) then
138                "Pressure Drop through the tray"
139                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
140                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
141        else
142                "Prato selado"
143                reb.OutletV.F = 0.0 * "mol/s";
144        end
145
146        "Pressure Drop through the tray"
147        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *
148                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
149                ttop.Outlet.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
150               
151        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
152                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
153                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
154       
155        CONNECTIONS
156        #vapor
157        reb.OutletV to trays(NTrays).InletV;
158        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
159        trays(1).OutletV to cond.InletV;
160       
161        #liquid
162        cond.OutletL to ttop.Inlet;
163        ttop.Outlet to sptop.Inlet;     
164        sptop.Outlet2 to pump1.Inlet;
165        pump1.Outlet to trays(1).InletL;
166        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
167        trays(NTrays).OutletL to tbottom.Inlet;
168        tbottom.Outlet to spbottom.Inlet;
169        spbottom.Outlet2 to reb.InletL;
170end
171
172
173#* -------------------------------------------------------------------
174* Distillation Column model with:
175*
176*       - NTrays like tray;
177*       - a vessel in the bottom of column;
178*       - a splitter who separate the bottom product and the stream to reboiler;
179*       - steady state reboiler (thermosyphon);
180*       - a dynamic condenser without subcooling;
181*       - a splitter which separate reflux and distillate;
182*       - a pump in reflux stream.
183*
184* ------------------------------------------------------------------*#
185Model Distillation_thermosyphon_cond
186        PARAMETERS
187ext PP as CalcObject;
188ext NComp as Integer;
189        NTrays as Integer(Brief="Number of trays", Default=2);
190       
191        VARIABLES
192        trays(NTrays) as tray;
193        cond as condenser;
194        reb as reboilerSteady;
195        tbottom as tank;
196        spbottom as splitter;
197        sptop as splitter;
198        pump1 as pump;
199
200        EQUATIONS
201        if (reb.OutletV.P > reb.InletL.P) then
202                "Pressure Drop through the tray"
203                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
204                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
205        else
206                "Prato selado"
207                reb.OutletV.F = 0.0 * "mol/s";
208        end
209
210        "Pressure Drop through the tray"
211        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *
212                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
213                cond.OutletL.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
214               
215        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
216                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
217                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
218                       
219        CONNECTIONS
220        #vapor
221        reb.OutletV to trays(NTrays).InletV;
222        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
223        trays(1).OutletV to cond.InletV;
224       
225        #liquid
226        cond.OutletL to sptop.Inlet;   
227        sptop.Outlet2 to pump1.Inlet;
228        pump1.Outlet to trays(1).InletL;
229        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
230        trays(NTrays).OutletL to tbottom.Inlet;
231        tbottom.Outlet to spbottom.Inlet;
232        spbottom.Outlet2 to reb.InletL;
233end
234
235
236#* -------------------------------------------------------------------
237* Distillation Column model with:
238*
239*       - NTrays like tray;
240*       - a kettle reboiler;
241*       - a steady state condenser with subcooling;
242*       - a vessel drum (layed cilinder);
243*       - a splitter which separate reflux and distillate;
244*       - a pump in reflux stream.
245*
246* ------------------------------------------------------------------*#
247Model Distillation_kettle_subcooling
248        PARAMETERS
249ext PP as CalcObject;
250ext NComp as Integer;
251        NTrays as Integer(Brief="Number of trays", Default=2);
252       
253        VARIABLES
254        trays(NTrays) as tray;
255        cond as condenserSteady;
256        reb as reboiler;
257        ttop as tank_cylindrical;
258        sptop as splitter;
259        pump1 as pump;
260
261        EQUATIONS
262        if (reb.OutletV.P > reb.InletL.P) then
263                "Pressure Drop through the tray"
264                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
265                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
266        else
267                "Prato selado"
268                reb.OutletV.F = 0.0 * "mol/s";
269        end
270
271        "Pressure Drop through the tray"
272        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *
273                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
274                ttop.Outlet.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
275               
276        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
277                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
278                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
279       
280        CONNECTIONS
281        #vapor
282        reb.OutletV to trays(NTrays).InletV;
283        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
284        trays(1).OutletV to cond.InletV;
285       
286        #liquid
287        cond.OutletL to ttop.Inlet;
288        ttop.Outlet to sptop.Inlet;     
289        sptop.Outlet2 to pump1.Inlet;
290        pump1.Outlet to trays(1).InletL;
291        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
292        trays(NTrays).OutletL to reb.InletL;
293end
294
295
296#*----------------------------------------------------------------------
297* Model of a  rectifier containing:
298*       - NTrays like tray;
299*       - dymamic condenser without subcooling;
300*       - a splitter which separate reflux and distillate;
301*       - a pump in reflux stream;
302*---------------------------------------------------------------------*#
303Model Rectifier
304        PARAMETERS
305ext PP as CalcObject;
306ext NComp as Integer;
307        NTrays as Integer(Brief="Number of trays", Default=2);
308       
309        VARIABLES
310        trays(NTrays) as tray;
311        cond as condenser;
312        sp as splitter;
313        pump1 as pump;
314
315        EQUATIONS
316        "Pressure Drop through the tray"
317        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *
318                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
319                cond.OutletL.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
320               
321        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
322                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
323                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
324       
325        CONNECTIONS
326        #vapor
327        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
328        trays(1).OutletV to cond.InletV;
329
330        #liquid
331        cond.OutletL to sp.Inlet;       
332        sp.Outlet2 to pump1.Inlet;
333        pump1.Outlet to trays(1).InletL;
334        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
335end
336
337
338#* -------------------------------------------------------------------
339* Rectifier Column with:
340*
341*       - NTrays like tray;
342*       - a steady state condenser with subcooling;
343*       - a vessel drum (layed cilinder);
344*       - a splitter which separate reflux and distillate;
345*       - a pump in reflux stream.
346*
347* ------------------------------------------------------------------*#
348Model Rectifier_subcooling
349        PARAMETERS
350ext PP as CalcObject;
351ext NComp as Integer;
352        NTrays as Integer(Brief="Number of trays", Default=2);
353       
354        VARIABLES
355        trays(NTrays) as tray;
356        cond as condenserSteady;
357        ttop as tank_cylindrical;
358        sptop as splitter;
359        pump1 as pump;
360
361        EQUATIONS
362        "Pressure Drop through the tray"
363        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *
364                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
365                ttop.Outlet.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
366               
367        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
368                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
369                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
370       
371        CONNECTIONS
372        #vapor
373        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
374        trays(1).OutletV to cond.InletV;
375       
376        #liquid
377        cond.OutletL to ttop.Inlet;
378        ttop.Outlet to sptop.Inlet;     
379        sptop.Outlet2 to pump1.Inlet;
380        pump1.Outlet to trays(1).InletL;
381        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
382end
383
384
385#*----------------------------------------------------------------------
386* Model of a  Refluxed Stripping column containing:
387*       - NTrays like tray;
388*       - dymamic condenser without subcooling;
389*       - a splitter which separate reflux and distillate;
390*       - a pump in reflux stream;
391*---------------------------------------------------------------------*#
392Model Refluxed_Stripping
393        PARAMETERS
394ext PP as CalcObject;
395ext NComp as Integer;
396        NTrays as Integer(Brief="Number of trays", Default=2);
397       
398        VARIABLES
399        trays(NTrays) as tray;
400        cond as condenser;
401        sp as splitter;
402        pump1 as pump;
403
404        EQUATIONS
405        "Pressure Drop through the tray"
406        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *
407                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
408                cond.OutletL.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
409               
410        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
411                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
412                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
413       
414        CONNECTIONS
415        #vapor
416        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
417        trays(1).OutletV to cond.InletV;
418
419        #liquid
420        cond.OutletL to sp.Inlet;       
421        sp.Outlet2 to pump1.Inlet;
422        pump1.Outlet to trays(1).InletL;
423        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
424end
425
426
427#* -------------------------------------------------------------------
428* Refluxed Stripping Column with:
429*
430*       - NTrays like tray;
431*       - a steady state condenser (with subcooling);
432*       - a vessel drum (layed cilinder);
433*       - a splitter which separate reflux and distillate;
434*       - a pump in reflux stream.
435*
436* ------------------------------------------------------------------*#
437Model Refluxed_Stripping_subcooling
438        PARAMETERS
439ext PP as CalcObject;
440ext NComp as Integer;
441        NTrays as Integer(Brief="Number of trays", Default=2);
442       
443        VARIABLES
444        trays(NTrays) as tray;
445        cond as condenserSteady;
446        ttop as tank_cylindrical;
447        sptop as splitter;
448        pump1 as pump;
449
450        EQUATIONS
451        "Pressure Drop through the tray"
452        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *
453                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
454                ttop.Outlet.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
455               
456        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
457                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
458                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
459       
460        CONNECTIONS
461        #vapor
462        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
463        trays(1).OutletV to cond.InletV;
464       
465        #liquid
466        cond.OutletL to ttop.Inlet;
467        ttop.Outlet to sptop.Inlet;     
468        sptop.Outlet2 to pump1.Inlet;
469        pump1.Outlet to trays(1).InletL;
470        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
471end
472
473
474#*----------------------------------------------------------------------
475* Model of a  Refluxed Absorption column containing:
476*       - NTrays like tray;
477*       - dymamic condenser without subcooling;
478*       - a splitter which separate reflux and distillate;
479*       - a pump in reflux stream;
480*---------------------------------------------------------------------*#
481Model Refluxed_Absorption
482        PARAMETERS
483ext PP as CalcObject;
484ext NComp as Integer;
485        NTrays as Integer(Brief="Number of trays", Default=2);
486       
487        VARIABLES
488        trays(NTrays) as tray;
489        cond as condenser;
490        sp as splitter;
491        pump1 as pump;
492
493        EQUATIONS
494        "Pressure Drop through the tray"
495        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *
496                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
497                cond.OutletL.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
498               
499        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
500                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
501                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
502       
503        CONNECTIONS
504        #vapor
505        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
506        trays(1).OutletV to cond.InletV;
507
508        #liquid
509        cond.OutletL to sp.Inlet;       
510        sp.Outlet2 to pump1.Inlet;
511        pump1.Outlet to trays(1).InletL;
512        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
513end
514
515
516#* -------------------------------------------------------------------
517* Refluxed Absorption Column with:
518*
519*       - NTrays like tray;
520*       - a steady state condenser (with subcooling);
521*       - a vessel drum (layed cilinder);
522*       - a splitter which separate reflux and distillate;
523*       - a pump in reflux stream.
524*
525* ------------------------------------------------------------------*#
526Model Refluxed_Absorption_subcooling
527        PARAMETERS
528ext PP as CalcObject;
529ext NComp as Integer;
530        NTrays as Integer(Brief="Number of trays", Default=2);
531       
532        VARIABLES
533        trays(NTrays) as tray;
534        cond as condenserSteady;
535        ttop as tank_cylindrical;
536        sptop as splitter;
537        pump1 as pump;
538
539        EQUATIONS
540        "Pressure Drop through the tray"
541        trays(1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *
542                trays(1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -
543                ttop.Outlet.P + 1e-8 * "atm") / (trays(1).alfa*trays(1).rhoV));
544               
545        trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 *
546                trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P -
547                trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV));
548       
549        CONNECTIONS
550        #vapor
551        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
552        trays(1).OutletV to cond.InletV;
553       
554        #liquid
555        cond.OutletL to ttop.Inlet;
556        ttop.Outlet to sptop.Inlet;     
557        sptop.Outlet2 to pump1.Inlet;
558        pump1.Outlet to trays(1).InletL;
559        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
560end
561
562
563#* -------------------------------------------------------------------
564* Reboiled Stripping Column model with:
565*
566*       - NTrays like tray;
567*       - a kettle reboiler;
568*
569* ------------------------------------------------------------------*#
570Model Reboiled_Stripping_kettle
571        PARAMETERS
572ext PP as CalcObject;
573ext NComp as Integer;
574        NTrays as Integer(Brief="Number of trays", Default=2);
575       
576        VARIABLES
577        trays(NTrays) as tray;
578        reb as reboiler;
579
580        EQUATIONS
581        if (reb.OutletV.P > reb.InletL.P) then
582                "Pressure Drop through the tray"
583                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
584                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
585        else
586                "Prato selado"
587                reb.OutletV.F = 0.0 * "mol/s";
588        end
589
590        "Pressure Drop through the tray"
591        trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 *
592                trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P -
593                trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV));
594       
595        CONNECTIONS
596        #vapor
597        reb.OutletV to trays(NTrays).InletV;
598        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
599       
600        #liquid
601        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
602        trays(NTrays).OutletL to reb.InletL;
603end
604
605
606#* -------------------------------------------------------------------
607* Reboiled Stripping Column model with:
608*
609*       - NTrays like tray;
610*       - a vessel in the bottom of column;
611*       - a splitter which separate the bottom product and the stream to reboiler;
612*       - steady state reboiler (thermosyphon);
613*
614* ------------------------------------------------------------------*#
615Model Reboiled_Stripping_thermosyphon
616        PARAMETERS
617ext PP as CalcObject;
618ext NComp as Integer;
619        NTrays as Integer(Brief="Number of trays", Default=2);
620       
621        VARIABLES
622        trays(NTrays) as tray;
623        reb as reboilerSteady;
624        spbottom as splitter;
625        tbottom as tank;
626
627        EQUATIONS
628        if (reb.OutletV.P > reb.InletL.P) then
629                "Pressure Drop through the tray"
630                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
631                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
632        else
633                "Prato selado"
634                reb.OutletV.F = 0.0 * "mol/s";
635        end
636
637        "Pressure Drop through the tray"
638        trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 *
639                trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P -
640                trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV));
641       
642        CONNECTIONS
643        #vapor
644        reb.OutletV to trays(NTrays).InletV;
645        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
646       
647        #liquid
648        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
649        trays(NTrays).OutletL to tbottom.Inlet;
650        tbottom.Outlet to spbottom.Inlet;
651        spbottom.Outlet2 to reb.InletL;
652end
653
654
655#* -------------------------------------------------------------------
656* Reboiled Absorption Column model with:
657*
658*       - NTrays like tray;
659*       - a kettle reboiler;
660*
661* ------------------------------------------------------------------*#
662Model Reboiled_Absorption_kettle
663        PARAMETERS
664ext PP as CalcObject;
665ext NComp as Integer;
666        NTrays as Integer(Brief="Number of trays", Default=2);
667       
668        VARIABLES
669        trays(NTrays) as tray;
670        reb as reboiler;
671
672        EQUATIONS
673        if (reb.OutletV.P > reb.InletL.P) then
674                "Pressure Drop through the tray"
675                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
676                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
677        else
678                "Prato selado"
679                reb.OutletV.F = 0.0 * "mol/s";
680        end
681
682        "Pressure Drop through the tray"
683        trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 *
684                trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P -
685                trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV));
686       
687        CONNECTIONS
688        #vapor
689        reb.OutletV to trays(NTrays).InletV;
690        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
691       
692        #liquid
693        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
694        trays(NTrays).OutletL to reb.InletL;
695end
696
697
698#* -------------------------------------------------------------------
699* Reboiled Absorption Column model with:
700*
701*       - NTrays like tray;
702*       - a vessel in the bottom of column;
703*       - a splitter which separate the bottom product and the stream to reboiler;
704*       - steady state reboiler (thermosyphon);
705*
706* ------------------------------------------------------------------*#
707Model Reboiled_Absorption_thermosyphon
708        PARAMETERS
709ext PP as CalcObject;
710ext NComp as Integer;
711        NTrays as Integer(Brief="Number of trays", Default=2);
712       
713        VARIABLES
714        trays(NTrays) as tray;
715        reb as reboilerSteady;
716        spbottom as splitter;
717        tbottom as tank;
718
719        EQUATIONS
720        if (reb.OutletV.P > reb.InletL.P) then
721                "Pressure Drop through the tray"
722                reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)
723                                / (1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3
724        else
725                "Prato selado"
726                reb.OutletV.F = 0.0 * "mol/s";
727        end
728
729        "Pressure Drop through the tray"
730        trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 *
731                trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P -
732                trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV));
733       
734        CONNECTIONS
735        #vapor
736        reb.OutletV to trays(NTrays).InletV;
737        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
738       
739        #liquid
740        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
741        trays(NTrays).OutletL to tbottom.Inlet;
742        tbottom.Outlet to spbottom.Inlet;
743        spbottom.Outlet2 to reb.InletL;
744end
Note: See TracBrowser for help on using the repository browser.