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

Last change on this file since 351 was 351, checked in by Argimiro Resende Secchi, 16 years ago

Adding some symbols for latex.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.2 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* Author: Paula B. Staudt
17* $Id: tray.mso 351 2007-08-30 01:00:58Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model trayBasic
23        ATTRIBUTES
24        Pallete         = false;
25        Icon            = "icon/Tray";
26        Brief           = "Basic equations of a tray column model.";
27        Info            =
28        "This model contains only the main equations of a column tray equilibrium model without
29        the hidraulic equations.
30       
31        Assumptions
32         * both phases (liquid and vapour) exists all the time;
33         * thermodymanic equilibrium with Murphree plate efficiency;
34         * no entrainment of liquid or vapour phase;
35         * no weeping;
36         * the dymanics in the downcomer are neglected.
37        ";
38       
39        PARAMETERS
40outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
41outer NComp as Integer;
42        V as volume(Brief="Total Volume of the tray");
43        Q as heat_rate (Brief="Rate of heat supply");
44        Ap as area (Brief="Plate area = Atray - Adowncomer");
45       
46        VARIABLES
47in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
48in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
49in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
50out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
51out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
52
53        M(NComp) as mol (Brief="Molar Holdup in the tray");
54        ML as mol (Brief="Molar liquid holdup");
55        MV as mol (Brief="Molar vapour holdup");
56        E as energy (Brief="Total Energy Holdup on tray");
57        vL as volume_mol (Brief="Liquid Molar Volume");
58        vV as volume_mol (Brief="Vapour Molar volume");
59        Level as length (Brief="Height of clear liquid on plate");
60        yideal(NComp) as fraction;
61        Emv as Real (Brief = "Murphree efficiency");
62       
63        EQUATIONS
64        "Component Molar Balance"
65        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
66                - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
67       
68        "Energy Balance"
69        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
70                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q );
71       
72        "Molar Holdup"
73        M = ML*OutletL.z + MV*OutletV.z;
74       
75        "Energy Holdup"
76        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
77       
78        "Mol fraction normalisation"
79        sum(OutletL.z)= 1.0;
80        sum(OutletL.z)= sum(OutletV.z);
81       
82        "Liquid Volume"
83        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
84        "Vapour Volume"
85        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
86       
87        "Chemical Equilibrium"
88        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
89                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
90
91        "Murphree Efficiency"
92        OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
93       
94        "Thermal Equilibrium"
95        OutletV.T = OutletL.T;
96       
97        "Mechanical Equilibrium"
98        OutletV.P = OutletL.P;
99       
100        "Geometry Constraint"
101        V = ML* vL + MV*vV;
102       
103        "Level of clear liquid over the weir"
104        Level = ML*vL/Ap;
105end
106
107Model tray as trayBasic
108        ATTRIBUTES
109        Pallete         = false;
110        Icon            = "icon/Tray";
111        Brief           = "Complete model of a column tray.";
112        Info            =
113        "Specify:
114         * the Feed stream
115         * the Liquid inlet stream
116         * the Vapour inlet stream
117         * the Vapour outlet flow (OutletV.F)
118       
119        Initial:
120         * the plate temperature (OutletL.T)
121         * the liquid height (Level) OR the liquid flow OutletL.F
122         * (NoComps - 1) OutletL compositions
123        ";     
124
125        PARAMETERS
126        Ah as area (Brief="Total holes area");
127        lw as length (Brief="Weir length");
128        g as acceleration (Default=9.81);
129        hw as length (Brief="Weir height");
130        beta as fraction (Brief="Aeration fraction");
131        alfa as fraction (Brief="Dry pressure drop coefficient");
132       
133        VARIABLES
134        rhoL as dens_mass;
135        rhoV as dens_mass;
136
137        EQUATIONS
138        "Liquid Density"
139        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
140        "Vapour Density"
141        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
142
143        if Level > (beta * hw) then
144                "Francis Equation"
145                OutletL.F = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2/vL;
146        else
147                "Low level"
148                OutletL.F = 0 * 'mol/h';
149        end
150
151end
152
153#*-------------------------------------------------------------------
154* Model of a tray with reaction
155*-------------------------------------------------------------------*#
156Model trayReact
157        ATTRIBUTES
158        Pallete         = false;
159        Icon            = "icon/Tray";
160        Brief           = "Model of a tray with reaction.";
161        Info            =
162        "Assumptions
163         * both phases (liquid and vapour) exists all the time;
164         * thermodymanic equilibrium with Murphree plate efficiency;
165         * no entrainment of liquid or vapour phase;
166         * no weeping;
167         * the dymanics in the downcomer are neglected.
168       
169        Specify:
170         * the Feed stream;
171         * the Liquid inlet stream;
172         * the Vapour inlet stream;
173         * the Vapour outlet flow (OutletV.F);
174         * the reaction related variables.
175       
176        Initial:
177         * the plate temperature (OutletL.T)
178         * the liquid height (Level) OR the liquid flow OutletL.F
179         * (NoComps - 1) OutletL compositions
180        ";
181
182        PARAMETERS
183        outer PP as Plugin(Type="PP");
184        outer NComp as Integer;
185        V as volume(Brief="Total Volume of the tray");
186        Q as power (Brief="Rate of heat supply");
187        Ap as area (Brief="Plate area = Atray - Adowncomer");
188       
189        Ah as area (Brief="Total holes area");
190        lw as length (Brief="Weir length");
191        g as acceleration (Default=9.81);
192        hw as length (Brief="Weir height");
193        beta as fraction (Brief="Aeration fraction");
194        alfa as fraction (Brief="Dry pressure drop coefficient");
195
196        stoic(NComp) as Real(Brief="Stoichiometric matrix");
197        Hr as energy_mol;
198        Pstartup as pressure;
199       
200        VapourFlow as Switcher(Valid = ["on", "off"], Default = "off");
201        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "off");
202       
203        VARIABLES
204in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
205in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
206in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
207out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
208out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
209
210        yideal(NComp) as fraction;
211        Emv as Real (Brief = "Murphree efficiency");
212
213        M(NComp) as mol (Brief="Molar Holdup in the tray");
214        ML as mol (Brief="Molar liquid holdup");
215        MV as mol (Brief="Molar vapour holdup");
216        E as energy (Brief="Total Energy Holdup on tray");
217        vL as volume_mol (Brief="Liquid Molar Volume");
218        vV as volume_mol (Brief="Vapour Molar volume");
219        Level as length (Brief="Height of clear liquid on plate");
220        Vol as volume;
221       
222        rhoL as dens_mass;
223        rhoV as dens_mass;
224        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
225        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
226       
227        EQUATIONS
228        "Molar Concentration"
229        OutletL.z = vL * C;
230       
231        "Reaction"
232        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4))*'l/mol/s';
233       
234        "Component Molar Balance"
235        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
236                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
237       
238        "Energy Balance"
239        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
240                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r3 * vL*ML;
241       
242        "Molar Holdup"
243        M = ML*OutletL.z + MV*OutletV.z;
244       
245        "Energy Holdup"
246        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
247       
248        "Mol fraction normalisation"
249        sum(OutletL.z)= 1.0;
250       
251        "Liquid Volume"
252        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
253        "Vapour Volume"
254        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
255
256        "Thermal Equilibrium"
257        OutletV.T = OutletL.T;
258       
259        "Mechanical Equilibrium"
260        OutletV.P = OutletL.P;
261       
262        "Level of clear liquid over the weir"
263        Level = ML*vL/Ap;
264
265        Vol = ML*vL;
266       
267        "Liquid Density"
268        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
269        "Vapour Density"
270        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
271
272        switch LiquidFlow
273                case "on":
274                "Francis Equation"
275                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw)+1e-6*'m')/(beta))^2;
276                when Level < (beta * hw) switchto "off";
277               
278                case "off":
279                "Low level"
280                OutletL.F = 0 * 'mol/h';
281                when Level > (beta * hw) + 1e-6*'m' switchto "on";
282        end
283
284        switch VapourFlow
285                case "on":
286                #InletV.P = OutletV.P + Level*g*rhoL + rhoV*alfa*(InletV.F*vV/Ah)^2;
287                InletV.F*vV = sqrt((InletV.P - OutletV.P - Level*g*rhoL + 1e-8 * 'atm')/(rhoV*alfa))*Ah;
288                when InletV.P < OutletV.P + Level*g*rhoL switchto "off";
289               
290                case "off":
291                InletV.F = 0 * 'mol/s';
292                when InletV.P > OutletV.P + Level*g*rhoL + 3e-2 * 'atm' switchto "on";
293                #when InletV.P > OutletV.P + Level*beta*g*rhoL + 1e-2 * 'atm' switchto "on";
294        end
295
296        "Chemical Equilibrium"
297        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
298                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
299       
300        OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
301       
302        sum(OutletL.z)= sum(OutletV.z);
303       
304        "Geometry Constraint"
305        V = ML* vL + MV*vV;
306end
Note: See TracBrowser for help on using the repository browser.