source: trunk/eml/stage_separators/reboiler.mso @ 344

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

Set icons positions for most devices.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.5 KB
RevLine 
[1]1#*-------------------------------------------------------------------
[72]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*
[1]15*----------------------------------------------------------------------
16* Author: Paula B. Staudt
17* $Id: reboiler.mso 325 2007-07-29 00:41:04Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model reboiler
[262]23        ATTRIBUTES
24        Pallete         = true;
[300]25        Icon            = "icon/Reboiler";
[262]26        Brief           = "Model of a dynamic reboiler - kettle.";
[267]27        Info            = "
28        <h2>Assumptions</h2>
29        <ul>
30        <li>perfect mixing of both phases;
31        <li>thermodynamics equilibrium;
32        <li>no liquid entrainment in the vapour stream.
33        </ul>
[262]34       
[267]35        <h2>Specify</h2>
36        <ul>
37        <li> the inlet stream;
38        <li> the liquid inlet stream;
39        <li> the outlet flows: OutletV.F and OutletL.F;
40        <li> the heat supply.
41        </ul>
[262]42       
[267]43        <h2>Initial Conditions</h2>
44        <ul>
45        <li> the reboiler temperature (OutletL.T);
46        <li> the reboiler liquid level (Level);
47        <li> (NoComps - 1) OutletL (OR OutletV) compositions.
48        </ul>
[262]49        ";     
50       
[1]51        PARAMETERS
[210]52        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[125]53        outer NComp as Integer;
[1]54        Across as area (Brief="Cross Section Area of reboiler");
55        V as volume (Brief="Total volume of reboiler");
56
57        VARIABLES
[325]58in      Inlet as stream(Brief="Feed Stream", PosX=0.8127, PosY=0);
59in      InletL as stream(Brief="Liquid inlet stream", PosX=0, PosY=0.5254);
60out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1);
61out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0);
62in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6123);
[1]63
64        M(NComp) as mol (Brief="Molar Holdup in the tray");
65        ML as mol (Brief="Molar liquid holdup");
66        MV as mol (Brief="Molar vapour holdup");
67        E as energy (Brief="Total Energy Holdup on tray");
68        vL as volume_mol (Brief="Liquid Molar Volume");
69        vV as volume_mol (Brief="Vapour Molar volume");
70        Level as length (Brief="Level of liquid phase");
71        rhoV as dens_mass (Brief="Vapour Density");
72
73        EQUATIONS
74        "Component Molar Balance"
75        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
76                - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
77       
78        "Energy Balance"
79        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
[310]80                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q;
[1]81       
82        "Molar Holdup"
83        M = ML*OutletL.z + MV*OutletV.z;
84       
85        "Energy Holdup"
86        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
87       
88        "Mol fraction normalisation"
89        sum(OutletL.z)=1.0;
90        sum(OutletL.z)=sum(OutletV.z);
91
92        "Vapour Density"
93        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
94
95        "Liquid Volume"
96        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
97       
98        "Vapour Volume"
99        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
100       
101        "Chemical Equilibrium"
102        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
103                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
104
105        "Mechanical Equilibrium"
106        OutletL.P = OutletV.P;
107       
108        "Thermal Equilibrium"
109        OutletL.T = OutletV.T;
110       
111        "Geometry Constraint"
112        V = ML*vL + MV*vV;
113       
114        "Level of liquid phase"
115        Level = ML*vL/Across;
116end
117
118#*----------------------------------------------------------------------
119* Model of a  Steady State reboiler with no thermodynamics equilibrium
120*---------------------------------------------------------------------*#
121Model reboilerSteady
[262]122        ATTRIBUTES
123        Pallete         = true;
[300]124        Icon            = "icon/ReboilerSteady";
[262]125        Brief           = "Model of a  Steady State reboiler with no thermodynamics equilibrium - thermosyphon.";
126        Info            =
127        "Assumptions:
128         * perfect mixing of both phases;
129         * no thermodynamics equilibrium;
130         * no liquid entrainment in the vapour stream.
131       
132        Specify:
133         * the InletL stream;
134         * the heat supply OR the outlet temperature (OutletV.T);
135        ";     
136
[1]137        PARAMETERS
[210]138        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[125]139        outer NComp as Integer;
[1]140        DP as press_delta (Brief="Pressure Drop in the reboiler");
141
142        VARIABLES
[325]143in      InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1);
144out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0);
145in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6111);
[1]146        vV as volume_mol (Brief="Vapour Molar volume");
147        rhoV as dens_mass (Brief="Vapour Density");
148
149        EQUATIONS
150        "Molar Balance"
151        InletL.F = OutletV.F;
152        InletL.z = OutletV.z;
153       
154        "Vapour Volume"
155        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
156       
157        "Vapour Density"
158        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
159
160        "Energy Balance"
[310]161        InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
[1]162       
163        "Pressure"
164        DP = InletL.P - OutletV.P;
165end
166
[72]167#*----------------------------------------------------------------------
168* Model of a  Steady State reboiler with fake calculation of
169* vaporisation fraction and output temperature, but with a real
170* calculation of the output stream enthalpy
171*---------------------------------------------------------------------*#
[46]172Model reboilerSteady_fakeH
[262]173        ATTRIBUTES
174        Pallete         = true;
[300]175        Icon            = "icon/ReboilerSteady";
[262]176        Brief           = "Model of a  Steady State reboiler with fake calculation of outlet conditions.";
177        Info            =
178        "Model of a  Steady State reboiler with fake calculation of
179        vaporisation fraction and output temperature, but with a real
180        calculation of the output stream enthalpy.
181        ";
182       
[46]183        PARAMETERS
[210]184        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[125]185        outer NComp as Integer;
[46]186        DP as press_delta (Brief="Pressure Drop in the reboiler");
[176]187        k as Real (Brief = "Flow Constant", Unit='mol/J');
[46]188       
189        VARIABLES
[325]190in      InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1);
191out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0);
192in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6111);
[46]193
194        EQUATIONS
195        "Molar Balance"
196        InletL.F = OutletV.F;
197        InletL.z = OutletV.z;
198       
199        "Energy Balance"
[310]200        InletL.F*InletL.h + InletQ.Q = OutletV.F*OutletV.h;
[46]201       
202        "Pressure"
203        DP = InletL.P - OutletV.P;
204
205        "Fake Vapourisation Fraction"
206        OutletV.v = 1.0;
207       
208        "Fake output temperature"
[176]209        OutletV.T = 300*'K';
[46]210       
211        "Pressure Drop through the reboiler"
[310]212        OutletV.F = k*InletQ.Q;
[46]213end
214
[38]215#*-------------------------------------------------------------------
216* Model of a dynamic reboiler with reaction
217*-------------------------------------------------------------------*#
218Model reboilerReact
[262]219        ATTRIBUTES
220        Pallete         = true;
[300]221        Icon            = "icon/Reboiler";
[262]222        Brief           = "Model of a dynamic reboiler with reaction.";
223        Info            =
224        "Assumptions:
225         * perfect mixing of both phases;
226         * thermodynamics equilibrium;
227         * no liquid entrainment in the vapour stream;
228         * the reaction takes place only in the liquid phase.
229       
230        Specify:
231         * the kinetics variables;
232         * the inlet stream;
233         * the liquid inlet stream;
234         * the outlet flows: OutletV.F and OutletL.F;
235         * the heat supply.
236       
237        Initial Conditions:
238         * the reboiler temperature (OutletL.T);
239         * the reboiler liquid level (Level);
240         * (NoComps - 1) OutletL (OR OutletV) compositions.
241        ";
242       
[38]243        PARAMETERS
[243]244        outer PP as Plugin(Type="PP");
[125]245        outer NComp as Integer;
[38]246        Across as area (Brief="Cross Section Area of reboiler");
247        V as volume (Brief="Total volume of reboiler");
248
249        stoic(NComp) as Real(Brief="Stoichiometric matrix");
250        Hr as energy_mol;
251        Pstartup as pressure;
252
253        VARIABLES
[325]254in      Inlet as stream(Brief="Feed Stream", PosX=0.8127, PosY=0);
255in      InletL as stream(Brief="Liquid inlet stream", PosX=0, PosY=0.5254);
256out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1);
257out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0);
258in      InletQ as energy_stream (Brief="Heat supplied", PosX=1, PosY=0.6123);
[38]259
260        M(NComp) as mol (Brief="Molar Holdup in the tray");
261        ML as mol (Brief="Molar liquid holdup");
262        MV as mol (Brief="Molar vapour holdup");
263        E as energy (Brief="Total Energy Holdup on tray");
264        vL as volume_mol (Brief="Liquid Molar Volume");
265        vV as volume_mol (Brief="Vapour Molar volume");
266        Level as length (Brief="Level of liquid phase");
267        Vol as volume;
268        startup as Real;
269        rhoV as dens_mass;
[243]270        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
[38]271        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
272
273        EQUATIONS
274        "Molar Concentration"
275        OutletL.z = vL * C;
276       
[243]277        "Reaction"
278        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';
279
[38]280        "Component Molar Balance"
281        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
[243]282                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
[38]283       
284        "Energy Balance"
285        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
[310]286                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * vL*ML;
[38]287       
288        "Molar Holdup"
289        M = ML*OutletL.z + MV*OutletV.z;
290       
291        "Energy Holdup"
292        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
293       
294        "Mol fraction normalisation"
295        sum(OutletL.z)=1.0;
296       
297        "Liquid Volume"
298        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
299        "Vapour Volume"
300        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
301        "Vapour Density"
302        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
303       
304        "Level of liquid phase"
305        Level = ML*vL/Across;
306
307        Vol = ML*vL;
308       
309        "Mechanical Equilibrium"
310        OutletL.P = OutletV.P;
311       
312        "Thermal Equilibrium"
313        OutletL.T = OutletV.T; 
314       
315        "Geometry Constraint"
[243]316        V = ML*vL + MV*vV;             
[38]317
318        "Chemical Equilibrium"
319        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
320        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
321
322        sum(OutletL.z)=sum(OutletV.z);
323       
324end
Note: See TracBrowser for help on using the repository browser.