source: branches/gui/eml/stage_separators/reboiler.mso @ 648

Last change on this file since 648 was 648, checked in by gerson bicca, 14 years ago

updates

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