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

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

Updated stage_separators file header and added headers template files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.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* 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 72 2006-12-08 18:29:10Z paula $
44*--------------------------------------------------------------------*#
45
46using "streams";
47
48Model reboiler
49        PARAMETERS
50ext PP as CalcObject;
51ext 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 stream_therm; # (Brief="Liquid outlet stream");
59out     OutletV as stream_therm; # (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;
114               
115        "vaporization fraction"
116        OutletV.v = 1.0;
117        OutletL.v = 0.0;
118end
119
120#*----------------------------------------------------------------------
121* Model of a  Steady State reboiler with no thermodynamics equilibrium
122*---------------------------------------------------------------------*#
123Model reboilerSteady
124        PARAMETERS
125ext PP as CalcObject;
126ext NComp as Integer;
127        DP as press_delta (Brief="Pressure Drop in the reboiler");
128
129        VARIABLES
130in      InletL as stream; #(Brief="Liquid inlet stream");
131out     OutletV as stream_therm; #(Brief="Vapour outlet stream");
132in      Q as heat_rate (Brief="Heat supplied");
133        vV as volume_mol (Brief="Vapour Molar volume");
134        rhoV as dens_mass (Brief="Vapour Density");
135
136        EQUATIONS
137        "Molar Balance"
138        InletL.F = OutletV.F;
139        InletL.z = OutletV.z;
140       
141        "Vapour Volume"
142        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
143       
144        "Vapour Density"
145        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
146
147        "Energy Balance"
148        InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
149       
150        "Pressure"
151        DP = InletL.P - OutletV.P;
152
153        "Vapourisation Fraction"
154        OutletV.v = 1.0;
155end
156
157#*----------------------------------------------------------------------
158* Model of a  Steady State reboiler with fake calculation of
159* vaporisation fraction and output temperature, but with a real
160* calculation of the output stream enthalpy
161*---------------------------------------------------------------------*#
162Model reboilerSteady_fakeH
163        PARAMETERS
164ext PP as CalcObject;
165ext NComp as Integer;
166        DP as press_delta (Brief="Pressure Drop in the reboiler");
167        k as Real (Brief = "Flow Constant", Unit="mol/J");
168       
169        VARIABLES
170in      InletL as stream; #(Brief="Liquid inlet stream");
171out     OutletV as stream; #(Brief="Vapour outlet stream");
172in      Q as heat_rate (Brief="Heat supplied");
173
174        EQUATIONS
175        "Molar Balance"
176        InletL.F = OutletV.F;
177        InletL.z = OutletV.z;
178       
179        "Energy Balance"
180        InletL.F*InletL.h + Q = OutletV.F*OutletV.h;
181       
182        "Pressure"
183        DP = InletL.P - OutletV.P;
184
185        "Fake Vapourisation Fraction"
186        OutletV.v = 1.0;
187       
188        "Fake output temperature"
189        OutletV.T = 300*"K";
190       
191        "Pressure Drop through the reboiler"
192        OutletV.F = k*Q;
193end
194
195#*-------------------------------------------------------------------
196* Model of a dynamic reboiler with reaction
197*-------------------------------------------------------------------*#
198Model reboilerReact
199        PARAMETERS
200ext PP as CalcObject;
201ext NComp as Integer;
202        Across as area (Brief="Cross Section Area of reboiler");
203        V as volume (Brief="Total volume of reboiler");
204
205        stoic(NComp) as Real(Brief="Stoichiometric matrix");
206        Hr as energy_mol;
207        Pstartup as pressure;
208
209        VARIABLES
210in      Inlet as stream;                        #(Brief="Feed Stream");
211in      InletL as stream;                       #(Brief="Liquid inlet stream");
212out     OutletL as stream_therm;        #(Brief="Liquid outlet stream");
213out     OutletV as stream_therm;        #(Brief="Vapour outlet stream");
214
215        Q as heat_rate (Brief="Heat supplied");
216        M(NComp) as mol (Brief="Molar Holdup in the tray");
217        ML as mol (Brief="Molar liquid holdup");
218        MV as mol (Brief="Molar vapour holdup");
219        E as energy (Brief="Total Energy Holdup on tray");
220        vL as volume_mol (Brief="Liquid Molar Volume");
221        vV as volume_mol (Brief="Vapour Molar volume");
222        Level as length (Brief="Level of liquid phase");
223        Vol as volume;
224        startup as Real;
225        rhoV as dens_mass;
226        r as reaction_mol (Brief = "Reaction resulting ethyl acetate", Unit = "mol/l/s");
227        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
228
229        EQUATIONS
230        "Molar Concentration"
231        OutletL.z = vL * C;
232       
233        "Component Molar Balance"
234        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
235                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL;
236       
237        "Energy Balance"
238        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
239                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q + Hr * r * vL*ML;
240       
241        "Molar Holdup"
242        M = ML*OutletL.z + MV*OutletV.z;
243       
244        "Energy Holdup"
245        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
246       
247        "Mol fraction normalisation"
248        sum(OutletL.z)=1.0;
249       
250        "Liquid Volume"
251        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
252        "Vapour Volume"
253        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
254        "Vapour Density"
255        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
256       
257        "Level of liquid phase"
258        Level = ML*vL/Across;
259
260        Vol = ML*vL;
261       
262        "vaporization fraction "
263        OutletV.v = 1.0;
264        OutletL.v = 0.0;
265       
266        "Mechanical Equilibrium"
267        OutletL.P = OutletV.P;
268       
269        "Thermal Equilibrium"
270        OutletL.T = OutletV.T; 
271       
272        "Geometry Constraint"
273        V = ML*vL + MV*vV;             
274
275        "Chemical Equilibrium"
276        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
277        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
278
279        sum(OutletL.z)=sum(OutletV.z);
280       
281end
Note: See TracBrowser for help on using the repository browser.