source: mso/eml/stage_separators/reboiler.mso @ 46

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

Fixed some sample files

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