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

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

Updated tray and column models and samples

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.7 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 398 2007-10-26 14:44:56Z paula $
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
29the 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        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
134        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "on");
135       
136        VARIABLES
137        rhoL as dens_mass;
138        rhoV as dens_mass;
139
140        EQUATIONS
141        "Liquid Density"
142        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
143        "Vapour Density"
144        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
145
146        switch LiquidFlow
147                case "on":
148                "Francis Equation"
149#               OutletL.F*vL = 1.84*'m^0.5/s'*lw*((Level-(beta*hw))/(beta))^1.5;
150                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2;
151                when Level < (beta * hw) switchto "off";
152               
153                case "off":
154                "Low level"
155                OutletL.F = 0 * 'mol/h';
156                when Level > (beta * hw) + 1e-6*'m' switchto "on";
157        end
158
159        switch VapourFlow
160                case "on":
161                InletV.F*vV = sqrt((InletV.P - OutletV.P)/(rhoV*alfa))*Ah;
162                when InletV.F < 1e-6 * 'kmol/h' switchto "off";
163               
164                case "off":
165                InletV.F = 0 * 'mol/s';
166                when InletV.P > OutletV.P + Level*g*rhoL + 1e-1 * 'atm' switchto "on";
167        end
168
169end
170
171#*-------------------------------------------------------------------
172* Model of a tray with reaction
173*-------------------------------------------------------------------*#
174Model trayReact
175        ATTRIBUTES
176        Pallete         = false;
177        Icon            = "icon/Tray";
178        Brief           = "Model of a tray with reaction.";
179        Info            =
180"== Assumptions ==
181* both phases (liquid and vapour) exists all the time;
182* thermodymanic equilibrium with Murphree plate efficiency;
183* no entrainment of liquid or vapour phase;
184* no weeping;
185* the dymanics in the downcomer are neglected.
186       
187== Specify ==
188* the Feed stream;
189* the Liquid inlet stream;
190* the Vapour inlet stream;
191* the Vapour outlet flow (OutletV.F);
192* the reaction related variables.
193       
194== Initial ==
195* the plate temperature (OutletL.T)
196* the liquid height (Level) OR the liquid flow OutletL.F
197* (NoComps - 1) OutletL compositions
198";
199
200        PARAMETERS
201        outer PP as Plugin(Type="PP");
202        outer NComp as Integer;
203        V as volume(Brief="Total Volume of the tray");
204        Q as power (Brief="Rate of heat supply");
205        Ap as area (Brief="Plate area = Atray - Adowncomer");
206       
207        Ah as area (Brief="Total holes area");
208        lw as length (Brief="Weir length");
209        g as acceleration (Default=9.81);
210        hw as length (Brief="Weir height");
211        beta as fraction (Brief="Aeration fraction");
212        alfa as fraction (Brief="Dry pressure drop coefficient");
213
214        stoic(NComp) as Real(Brief="Stoichiometric matrix");
215        Hr as energy_mol;
216        Pstartup as pressure;
217       
218        VapourFlow as Switcher(Valid = ["on", "off"], Default = "off");
219        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "off");
220       
221        VARIABLES
222in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
223in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
224in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
225out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
226out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
227
228        yideal(NComp) as fraction;
229        Emv as Real (Brief = "Murphree efficiency");
230
231        M(NComp) as mol (Brief="Molar Holdup in the tray");
232        ML as mol (Brief="Molar liquid holdup");
233        MV as mol (Brief="Molar vapour holdup");
234        E as energy (Brief="Total Energy Holdup on tray");
235        vL as volume_mol (Brief="Liquid Molar Volume");
236        vV as volume_mol (Brief="Vapour Molar volume");
237        Level as length (Brief="Height of clear liquid on plate");
238        Vol as volume;
239       
240        rhoL as dens_mass;
241        rhoV as dens_mass;
242        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
243        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
244       
245        EQUATIONS
246        "Molar Concentration"
247        OutletL.z = vL * C;
248       
249        "Reaction"
250        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4))*'l/mol/s';
251       
252        "Component Molar Balance"
253        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
254                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
255       
256        "Energy Balance"
257        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
258                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r3 * vL*ML;
259       
260        "Molar Holdup"
261        M = ML*OutletL.z + MV*OutletV.z;
262       
263        "Energy Holdup"
264        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
265       
266        "Mol fraction normalisation"
267        sum(OutletL.z)= 1.0;
268       
269        "Liquid Volume"
270        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
271        "Vapour Volume"
272        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
273
274        "Thermal Equilibrium"
275        OutletV.T = OutletL.T;
276       
277        "Mechanical Equilibrium"
278        OutletV.P = OutletL.P;
279       
280        "Level of clear liquid over the weir"
281        Level = ML*vL/Ap;
282
283        Vol = ML*vL;
284       
285        "Liquid Density"
286        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
287        "Vapour Density"
288        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
289
290        switch LiquidFlow
291                case "on":
292                "Francis Equation"
293                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw)+1e-6*'m')/(beta))^2;
294                when Level < (beta * hw) switchto "off";
295               
296                case "off":
297                "Low level"
298                OutletL.F = 0 * 'mol/h';
299                when Level > (beta * hw) + 1e-6*'m' switchto "on";
300        end
301
302        switch VapourFlow
303                case "on":
304                #InletV.P = OutletV.P + Level*g*rhoL + rhoV*alfa*(InletV.F*vV/Ah)^2;
305                InletV.F*vV = sqrt((InletV.P - OutletV.P - Level*g*rhoL + 1e-8 * 'atm')/(rhoV*alfa))*Ah;
306                when InletV.P < OutletV.P + Level*g*rhoL switchto "off";
307               
308                case "off":
309                InletV.F = 0 * 'mol/s';
310                when InletV.P > OutletV.P + Level*g*rhoL + 3e-2 * 'atm' switchto "on";
311                #when InletV.P > OutletV.P + Level*beta*g*rhoL + 1e-2 * 'atm' switchto "on";
312        end
313
314        "Chemical Equilibrium"
315        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
316                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
317       
318        OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
319       
320        sum(OutletL.z)= sum(OutletV.z);
321       
322        "Geometry Constraint"
323        V = ML* vL + MV*vV;
324end
Note: See TracBrowser for help on using the repository browser.