source: branches/newlanguage/eml/stage_separators/tray.mso @ 115

Last change on this file since 115 was 103, checked in by Paula Bettio Staudt, 17 years ago

Updated tray model -> liquid flow correlation to avoid integration error

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