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

Last change on this file since 698 was 698, checked in by gerson bicca, 15 years ago

added heat_flow model for control purposes - starting to modify the reactive distillation column (BRANCH)

File size: 9.8 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
132PARAMETERS
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
137VARIABLES
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
144EQUATIONS
145
146"Molar Balance"
147        InletL.F = OutletV.F;
148        InletL.z = OutletV.z;
149       
150"Vapour Volume"
151        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
152       
153"Vapour Density"
154        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
155
156"Energy Balance"
157        InletL.F*InletL.h + InletQ = OutletV.F*OutletV.h;
158       
159"Pressure"
160        DP = InletL.P - OutletV.P;
161
162end
163
164#*----------------------------------------------------------------------
165* Model of a  Steady State reboiler with fake calculation of
166* vaporisation fraction and output temperature, but with a real
167* calculation of the output stream enthalpy
168*---------------------------------------------------------------------*#
169Model reboilerSteady_fakeH
170        ATTRIBUTES
171        Pallete         = true;
172        Icon            = "icon/ReboilerSteady";
173        Brief           = "Model of a  Steady State reboiler with fake calculation of outlet conditions.";
174        Info            =
175"Model of a  Steady State reboiler with fake calculation of
176vaporisation fraction and output temperature, but with a real
177calculation of the output stream enthalpy.
178";
179       
180        PARAMETERS
181        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
182        outer NComp as Integer;
183        DP as press_delta (Brief="Pressure Drop in the reboiler");
184        k as Real (Brief = "Flow Constant", Unit='mol/J');
185       
186        VARIABLES
187in      InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}");
188out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}");
189in      InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}");
190
191        EQUATIONS
192        "Molar Balance"
193        InletL.F = OutletV.F;
194        InletL.z = OutletV.z;
195       
196        "Energy Balance"
197        InletL.F*InletL.h + InletQ = OutletV.F*OutletV.h;
198       
199        "Pressure"
200        DP = InletL.P - OutletV.P;
201
202        "Fake Vapourisation Fraction"
203        OutletV.v = 1.0;
204       
205        "Fake output temperature"
206        OutletV.T = 300*'K';
207       
208        "Pressure Drop through the reboiler"
209        OutletV.F = k*InletQ;
210end
211
212#*-------------------------------------------------------------------
213* Model of a dynamic reboiler with reaction
214*-------------------------------------------------------------------*#
215Model reboilerReact
216        ATTRIBUTES
217        Pallete         = true;
218        Icon            = "icon/Reboiler";
219        Brief           = "Model of a dynamic reboiler with reaction.";
220        Info            =
221"== Assumptions ==
222* perfect mixing of both phases;
223* thermodynamics equilibrium;
224* no liquid entrainment in the vapour stream;
225* the reaction takes place only in the liquid phase.
226       
227== Specify ==
228* the kinetics variables;
229* the inlet stream;
230* the liquid inlet stream;
231* the outlet flows: OutletV.F and OutletL.F;
232* the heat supply.
233
234== Initial Conditions ==
235* the reboiler temperature (OutletL.T);
236* the reboiler liquid level (Level);
237* (NoComps - 1) OutletL (OR OutletV) compositions.
238";
239       
240        PARAMETERS
241        outer PP as Plugin(Type="PP");
242        outer NComp as Integer;
243        Across as area (Brief="Cross Section Area of reboiler");
244        V as volume (Brief="Total volume of reboiler");
245
246        stoic(NComp) as Real(Brief="Stoichiometric matrix");
247        Hr as energy_mol;
248        Pstartup as pressure;
249
250        VARIABLES
251in      Inlet as stream(Brief="Feed Stream", PosX=0.8127, PosY=0, Symbol="_{in}");
252in      InletL as stream(Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}");
253out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");
254out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");
255        InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
256
257        M(NComp) as mol (Brief="Molar Holdup in the tray");
258        ML as mol (Brief="Molar liquid holdup");
259        MV as mol (Brief="Molar vapour holdup");
260        E as energy (Brief="Total Energy Holdup on tray");
261        vL as volume_mol (Brief="Liquid Molar Volume");
262        vV as volume_mol (Brief="Vapour Molar volume");
263        Level as length (Brief="Level of liquid phase");
264        Vol as volume;
265        startup as Real;
266        rhoV as dens_mass;
267        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
268        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
269
270        EQUATIONS
271        "Molar Concentration"
272        OutletL.z = vL * C;
273       
274        "Reaction"
275        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';
276
277        "Component Molar Balance"
278        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
279                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
280       
281        "Energy Balance"
282        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
283                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML;
284       
285        "Molar Holdup"
286        M = ML*OutletL.z + MV*OutletV.z;
287       
288        "Energy Holdup"
289        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
290       
291        "Mol fraction normalisation"
292        sum(OutletL.z)=1.0;
293       
294        "Liquid Volume"
295        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
296        "Vapour Volume"
297        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
298        "Vapour Density"
299        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
300       
301        "Level of liquid phase"
302        Level = ML*vL/Across;
303
304        Vol = ML*vL;
305       
306        "Mechanical Equilibrium"
307        OutletL.P = OutletV.P;
308       
309        "Thermal Equilibrium"
310        OutletL.T = OutletV.T; 
311       
312        "Geometry Constraint"
313        V = ML*vL + MV*vV;             
314
315        "Chemical Equilibrium"
316        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
317        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
318
319        sum(OutletL.z)=sum(OutletV.z);
320       
321end
Note: See TracBrowser for help on using the repository browser.