source: branches/newlanguage/eml/stage_separators/reboiler.mso @ 125

Last change on this file since 125 was 125, checked in by Rafael de Pelegrini Soares, 15 years ago

Updated some models for the new language proposal

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.5 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* Model of a dynamic reboiler
17*--------------------------------------------------------------------
18*
19*       Streams:
20*               * a liquid inlet stream
21*               * a liquid outlet stream
22*               * a vapour outlet stream
23*               * a feed stream
24*
25*       Assumptions:
26*               * perfect mixing of both phases
27*               * thermodynamics equilibrium
28*               * no liquid entrainment in the vapour stream
29*
30*       Specify:
31*               * the Feed stream
32*               * the Liquid inlet stream
33*               * the outlet flows: OutletV.F and OutletL.F
34*
35*       Initial:
36*               * the reboiler temperature (OutletL.T)
37*               * the reboiler liquid level (Ll)
38*               * (NoComps - 1) OutletL (OR OutletV) compositions
39*
40*
41*----------------------------------------------------------------------
42* Author: Paula B. Staudt
43* $Id: reboiler.mso 125 2007-01-22 19:57:16Z rafael $
44*--------------------------------------------------------------------*#
45
46using "streams";
47
48Model reboiler
49        PARAMETERS
50        outer PP as Plugin;
51        outer NComp as Integer;
52        Across as area (Brief="Cross Section Area of reboiler");
53        V as volume (Brief="Total volume of reboiler");
54
55        VARIABLES
56in      Inlet as stream(Brief="Feed Stream");
57in      InletL as stream(Brief="Liquid inlet stream");
58out     OutletL as liquid_stream(Brief="Liquid outlet stream");
59out     OutletV as vapour_stream(Brief="Vapour outlet stream");
60in      Q as heat_rate (Brief="Heat supplied");
61
62        M(NComp) as mol (Brief="Molar Holdup in the tray");
63        ML as mol (Brief="Molar liquid holdup");
64        MV as mol (Brief="Molar vapour holdup");
65        E as energy (Brief="Total Energy Holdup on tray");
66        vL as volume_mol (Brief="Liquid Molar Volume");
67        vV as volume_mol (Brief="Vapour Molar volume");
68        Level as length (Brief="Level of liquid phase");
69        rhoV as dens_mass (Brief="Vapour Density");
70
71        EQUATIONS
72        "Component Molar Balance"
73        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
74                - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
75       
76        "Energy Balance"
77        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
78                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q;
79       
80        "Molar Holdup"
81        M = ML*OutletL.z + MV*OutletV.z;
82       
83        "Energy Holdup"
84        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
85       
86        "Mol fraction normalisation"
87        sum(OutletL.z)=1.0;
88        sum(OutletL.z)=sum(OutletV.z);
89
90        "Vapour Density"
91        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
92
93        "Liquid Volume"
94        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
95       
96        "Vapour Volume"
97        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
98       
99        "Chemical Equilibrium"
100        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
101                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
102
103        "Mechanical Equilibrium"
104        OutletL.P = OutletV.P;
105       
106        "Thermal Equilibrium"
107        OutletL.T = OutletV.T;
108       
109        "Geometry Constraint"
110        V = ML*vL + MV*vV;
111       
112        "Level of liquid phase"
113        Level = ML*vL/Across;
114end
115
116#*----------------------------------------------------------------------
117* Model of a  Steady State reboiler with no thermodynamics equilibrium
118*---------------------------------------------------------------------*#
119Model reboilerSteady
120        PARAMETERS
121        outer PP as Plugin;
122        outer NComp as Integer;
123        DP as press_delta (Brief="Pressure Drop in the reboiler");
124
125        VARIABLES
126in      InletL as stream(Brief="Liquid inlet stream");
127out     OutletV as vapour_stream(Brief="Vapour outlet stream");
128in      Q as heat_rate (Brief="Heat supplied");
129        vV as volume_mol (Brief="Vapour Molar volume");
130        rhoV as dens_mass (Brief="Vapour Density");
131
132        EQUATIONS
133        "Molar Balance"
134        InletL.F = OutletV.F;
135        InletL.z = OutletV.z;
136       
137        "Vapour Volume"
138        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
139       
140        "Vapour Density"
141        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
142
143        "Energy Balance"
144        InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
145       
146        "Pressure"
147        DP = InletL.P - OutletV.P;
148end
149
150#*----------------------------------------------------------------------
151* Model of a  Steady State reboiler with fake calculation of
152* vaporisation fraction and output temperature, but with a real
153* calculation of the output stream enthalpy
154*---------------------------------------------------------------------*#
155Model reboilerSteady_fakeH
156        PARAMETERS
157        outer PP as Plugin;
158        outer NComp as Integer;
159        DP as press_delta (Brief="Pressure Drop in the reboiler");
160        k as Real (Brief = "Flow Constant", Unit="mol/J");
161       
162        VARIABLES
163in      InletL as stream(Brief="Liquid inlet stream");
164out     OutletV as stream(Brief="Vapour outlet stream");
165in      Q as heat_rate (Brief="Heat supplied");
166
167        EQUATIONS
168        "Molar Balance"
169        InletL.F = OutletV.F;
170        InletL.z = OutletV.z;
171       
172        "Energy Balance"
173        InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
174       
175        "Pressure"
176        DP = InletL.P - OutletV.P;
177
178        "Fake Vapourisation Fraction"
179        OutletV.v = 1.0;
180       
181        "Fake output temperature"
182        OutletV.T = 300*"K";
183       
184        "Pressure Drop through the reboiler"
185        OutletV.F = k*Q;
186end
187
188#*-------------------------------------------------------------------
189* Model of a dynamic reboiler with reaction
190*-------------------------------------------------------------------*#
191Model reboilerReact
192        PARAMETERS
193        outer PP as Plugin;
194        outer NComp as Integer;
195        Across as area (Brief="Cross Section Area of reboiler");
196        V as volume (Brief="Total volume of reboiler");
197
198        stoic(NComp) as Real(Brief="Stoichiometric matrix");
199        Hr as energy_mol;
200        Pstartup as pressure;
201
202        VARIABLES
203in      Inlet as stream(Brief="Feed Stream");
204in      InletL as stream(Brief="Liquid inlet stream");
205out     OutletL as liquid_stream(Brief="Liquid outlet stream");
206out     OutletV as vapour_stream(Brief="Vapour outlet stream");
207
208        Q as heat_rate (Brief="Heat supplied");
209        M(NComp) as mol (Brief="Molar Holdup in the tray");
210        ML as mol (Brief="Molar liquid holdup");
211        MV as mol (Brief="Molar vapour holdup");
212        E as energy (Brief="Total Energy Holdup on tray");
213        vL as volume_mol (Brief="Liquid Molar Volume");
214        vV as volume_mol (Brief="Vapour Molar volume");
215        Level as length (Brief="Level of liquid phase");
216        Vol as volume;
217        startup as Real;
218        rhoV as dens_mass;
219        r as reaction_mol (Brief = "Reaction resulting ethyl acetate", Unit = "mol/l/s");
220        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
221
222        EQUATIONS
223        "Molar Concentration"
224        OutletL.z = vL * C;
225       
226        "Component Molar Balance"
227        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
228                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL;
229       
230        "Energy Balance"
231        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
232                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q + Hr * r * vL*ML;
233       
234        "Molar Holdup"
235        M = ML*OutletL.z + MV*OutletV.z;
236       
237        "Energy Holdup"
238        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
239       
240        "Mol fraction normalisation"
241        sum(OutletL.z)=1.0;
242       
243        "Liquid Volume"
244        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
245        "Vapour Volume"
246        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
247        "Vapour Density"
248        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
249       
250        "Level of liquid phase"
251        Level = ML*vL/Across;
252
253        Vol = ML*vL;
254       
255        "Mechanical Equilibrium"
256        OutletL.P = OutletV.P;
257       
258        "Thermal Equilibrium"
259        OutletL.T = OutletV.T; 
260       
261        "Geometry Constraint"
262        V = ML*vL + MV*vV;
263
264        "Chemical Equilibrium"
265        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
266        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
267
268        sum(OutletL.z)=sum(OutletV.z);
269       
270end
Note: See TracBrowser for help on using the repository browser.