source: trunk/eml/stage_separators/tray.mso @ 262

Last change on this file since 262 was 262, checked in by Paula Bettio Staudt, 16 years ago

Updated ATTRIBUTES section

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.1 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 262 2007-06-15 22:21:14Z paula $
51*--------------------------------------------------------------------*#
52
53using "streams";
54
55Model trayBasic
56
57        PARAMETERS
58outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
59outer 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 liquid_stream;
69out     OutletV as vapour_stream;
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        "Level of clear liquid over the weir"
122        Level = ML*vL/Ap;
123end
124
125Model tray as trayBasic
126
127        PARAMETERS
128        Ah as area (Brief="Total holes area");
129        lw as length (Brief="Weir length");
130        g as acceleration (Default=9.81);
131        hw as length (Brief="Weir height");
132        beta as fraction (Brief="Aeration fraction");
133        alfa as fraction (Brief="Dry pressure drop coefficient");
134       
135        VARIABLES
136        rhoL as dens_mass;
137        rhoV as dens_mass;
138
139        EQUATIONS
140        "Liquid Density"
141        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
142        "Vapour Density"
143        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
144
145        if Level > (beta * hw) then
146                "Francis Equation"
147                OutletL.F = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2/vL;
148        else
149                "Low level"
150                OutletL.F = 0 * 'mol/h';
151        end
152
153end
154
155#*-------------------------------------------------------------------
156* Model of a tray with reaction
157*-------------------------------------------------------------------*#
158Model trayReact
159
160        PARAMETERS
161        outer PP as Plugin(Type="PP");
162        outer NComp as Integer;
163        V as volume(Brief="Total Volume of the tray");
164        Q as power (Brief="Rate of heat supply");
165        Ap as area (Brief="Plate area = Atray - Adowncomer");
166       
167        Ah as area (Brief="Total holes area");
168        lw as length (Brief="Weir length");
169        g as acceleration (Default=9.81);
170        hw as length (Brief="Weir height");
171        beta as fraction (Brief="Aeration fraction");
172        alfa as fraction (Brief="Dry pressure drop coefficient");
173
174        stoic(NComp) as Real(Brief="Stoichiometric matrix");
175        Hr as energy_mol;
176        Pstartup as pressure;
177       
178        VapourFlow as Switcher(Valid = ["on", "off"], Default = "off");
179        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "off");
180       
181        VARIABLES
182in      Inlet as stream;
183in      InletL as stream;
184in      InletV as stream;
185out     OutletL as liquid_stream;
186out     OutletV as vapour_stream;
187
188        yideal(NComp) as fraction;
189        Emv as Real (Brief = "Murphree efficiency");
190
191        M(NComp) as mol (Brief="Molar Holdup in the tray");
192        ML as mol (Brief="Molar liquid holdup");
193        MV as mol (Brief="Molar vapour holdup");
194        E as energy (Brief="Total Energy Holdup on tray");
195        vL as volume_mol (Brief="Liquid Molar Volume");
196        vV as volume_mol (Brief="Vapour Molar volume");
197        Level as length (Brief="Height of clear liquid on plate");
198        Vol as volume;
199       
200        rhoL as dens_mass;
201        rhoV as dens_mass;
202        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
203        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
204       
205        EQUATIONS
206        "Molar Concentration"
207        OutletL.z = vL * C;
208       
209        "Reaction"
210        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4))*'l/mol/s';
211       
212        "Component Molar Balance"
213        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
214                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
215       
216        "Energy Balance"
217        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
218                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r3 * vL*ML;
219       
220        "Molar Holdup"
221        M = ML*OutletL.z + MV*OutletV.z;
222       
223        "Energy Holdup"
224        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
225       
226        "Mol fraction normalisation"
227        sum(OutletL.z)= 1.0;
228       
229        "Liquid Volume"
230        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
231        "Vapour Volume"
232        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
233
234        "Thermal Equilibrium"
235        OutletV.T = OutletL.T;
236       
237        "Mechanical Equilibrium"
238        OutletV.P = OutletL.P;
239       
240        "Level of clear liquid over the weir"
241        Level = ML*vL/Ap;
242
243        Vol = ML*vL;
244       
245        "Liquid Density"
246        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
247        "Vapour Density"
248        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
249
250        switch LiquidFlow
251                case "on":
252                "Francis Equation"
253                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw)+1e-6*'m')/(beta))^2;
254                when Level < (beta * hw) switchto "off";
255               
256                case "off":
257                "Low level"
258                OutletL.F = 0 * 'mol/h';
259                when Level > (beta * hw) + 1e-6*'m' switchto "on";
260        end
261
262        switch VapourFlow
263                case "on":
264                #InletV.P = OutletV.P + Level*g*rhoL + rhoV*alfa*(InletV.F*vV/Ah)^2;
265                InletV.F*vV = sqrt((InletV.P - OutletV.P - Level*g*rhoL + 1e-8 * 'atm')/(rhoV*alfa))*Ah;
266                when InletV.P < OutletV.P + Level*g*rhoL switchto "off";
267               
268                case "off":
269                InletV.F = 0 * 'mol/s';
270                when InletV.P > OutletV.P + Level*g*rhoL + 3e-2 * 'atm' switchto "on";
271                #when InletV.P > OutletV.P + Level*beta*g*rhoL + 1e-2 * 'atm' switchto "on";
272        end
273
274        "Chemical Equilibrium"
275        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
276                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
277       
278        OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
279       
280        sum(OutletL.z)= sum(OutletV.z);
281       
282        "Geometry Constraint"
283        V = ML* vL + MV*vV;
284end
Note: See TracBrowser for help on using the repository browser.