source: mso/eml/stage_separators/condenser.mso @ 68

Last change on this file since 68 was 65, checked in by Argimiro Resende Secchi, 17 years ago

DP as variable in CondenserSteady?.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 KB
Line 
1#*-------------------------------------------------------------------
2* Model of a dynamic condenser
3*--------------------------------------------------------------------
4*
5*       Streams:
6*               * a vapour inlet stream
7*               * a liquid outlet stream
8*
9*       Assumptions:
10*               * perfect mixing of both phases
11*               * thermodynamics equilibrium
12*
13*       Specify:
14*               * the Inlet stream
15*               * the Outlet flows
16*
17*       Initial:
18*               * the condenser temperature (OutletL.T)
19*               * the condenser level (Ll)
20*               * (NoComps - 1) Outlet compositions
21*
22*----------------------------------------------------------------------
23* Author: Paula B. Staudt
24* $Id: condenser.mso 65 2006-11-24 03:22:15Z arge $
25*--------------------------------------------------------------------*#
26
27using "streams";
28
29Model condenser
30        PARAMETERS
31ext PP as CalcObject;
32ext NComp as Integer;
33        V as volume (Brief="Condenser total volume");
34        Across as area (Brief="Cross Section Area of reboiler");
35
36        VARIABLES
37in      InletV as stream; #(Brief="Vapour inlet stream");
38out     OutletL as stream_therm; #(Brief="Liquid outlet stream");
39out     OutletV as stream_therm; #(Brief="Vapour outlet stream");
40in      Q as heat_rate (Brief="Heat supplied");
41
42        M(NComp) as mol (Brief="Molar Holdup in the tray");
43        ML as mol (Brief="Molar liquid holdup");
44        MV as mol (Brief="Molar vapour holdup");
45        E as energy (Brief="Total Energy Holdup on tray");
46        vL as volume_mol (Brief="Liquid Molar Volume");
47        vV as volume_mol (Brief="Vapour Molar volume");
48        Level as length (Brief="Level of liquid phase");
49
50        EQUATIONS
51        "Component Molar Balance"
52        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
53                                - OutletV.F*OutletV.z;
54
55        "Energy Balance"
56        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
57                                - OutletV.F*OutletV.h + Q;
58
59        "Molar Holdup"
60        M = ML*OutletL.z + MV*OutletV.z;
61       
62        "Energy Holdup"
63        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
64       
65        "Mol fraction normalisation"
66        sum(OutletL.z)=1.0;
67        sum(OutletL.z)=sum(OutletV.z);
68
69        "Liquid Volume"
70        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
71        "Vapour Volume"
72        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
73
74        "Chemical Equilibrium"
75        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
76                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
77
78        "Thermal Equilibrium"
79        OutletL.T = OutletV.T;
80
81        "Mechanical Equilibrium"
82        OutletV.P = OutletL.P;
83
84        "Geometry Constraint"
85        V = ML*vL + MV*vV;
86
87        "Level of liquid phase"
88        Level = ML*vL/Across;
89       
90        "Vapourisation Fraction"
91        OutletL.v = 0.0;
92        OutletV.v = 1.0;
93end
94
95
96#*----------------------------------------------------------------------
97* Model of a  Steady State condenser with no thermodynamics equilibrium
98*---------------------------------------------------------------------*#
99Model condenserSteady
100        PARAMETERS
101ext PP as CalcObject;
102ext NComp as Integer;
103
104        VARIABLES
105in      InletV as stream; #(Brief="Vapour inlet stream");
106out     OutletL as stream_therm; #(Brief="Liquid outlet stream");
107in      Q as heat_rate (Brief="Heat supplied");
108        DP as press_delta (Brief="Pressure Drop in the condenser");
109
110        EQUATIONS
111        "Molar Balance"
112        InletV.F = OutletL.F;
113        InletV.z = OutletL.z;
114               
115        "Energy Balance"
116        InletV.F*InletV.h = OutletL.F*OutletL.h + Q;
117       
118        "Pressure"
119        DP = InletV.P - OutletL.P;
120
121        "Vapourisation Fraction"
122        OutletL.v = 0.0;
123end
124
125#*-------------------------------------------------------------------
126* Condenser with reaction in liquid phase
127*--------------------------------------------------------------------*#
128Model condenserReact
129        PARAMETERS
130ext PP as CalcObject;
131ext NComp as Integer;
132        V as volume (Brief="Condenser total volume");
133        Across as area (Brief="Cross Section Area of reboiler");
134
135        stoic(NComp) as Real(Brief="Stoichiometric matrix");
136        Hr as energy_mol;
137        Pstartup as pressure;
138
139        VARIABLES
140in      InletV as stream;                       #(Brief="Vapour inlet stream");
141out     OutletL as stream_therm;        #(Brief="Liquid outlet stream");
142out     OutletV as stream_therm;        #(Brief="Vapour outlet stream");
143
144        M(NComp) as mol (Brief="Molar Holdup in the tray");
145        ML as mol (Brief="Molar liquid holdup");
146        MV as mol (Brief="Molar vapour holdup");
147        E as energy (Brief="Total Energy Holdup on tray");
148        vL as volume_mol (Brief="Liquid Molar Volume");
149        vV as volume_mol (Brief="Vapour Molar volume");
150        Level as length (Brief="Level of liquid phase");
151        Q as heat_rate (Brief="Heat supplied");
152        Vol as volume;
153        r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s");
154        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
155
156        EQUATIONS
157        "Molar Concentration"
158        OutletL.z = vL * C;
159       
160        "Component Molar Balance"
161        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
162                                - OutletV.F*OutletV.z + stoic*r*ML*vL;
163
164        "Energy Balance"
165        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
166                                - OutletV.F*OutletV.h + Q + Hr * r * ML*vL;
167
168        "Molar Holdup"
169        M = ML*OutletL.z + MV*OutletV.z;
170       
171        "Energy Holdup"
172        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
173       
174        "Mol fraction normalisation"
175        sum(OutletL.z)=1.0;
176
177        "Liquid Volume"
178        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
179        "Vapour Volume"
180        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
181
182        "Thermal Equilibrium"
183        OutletL.T = OutletV.T;
184
185        "Mechanical Equilibrium"
186        OutletV.P = OutletL.P;
187
188        "Geometry Constraint"
189        V = ML*vL + MV*vV;
190
191        Vol = ML*vL;
192       
193        "Level of liquid phase"
194        Level = ML*vL/Across;
195       
196        "Vapourisation Fraction"
197        OutletL.v = 0.0;
198        OutletV.v = 1.0;
199       
200        "Chemical Equilibrium"
201        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
202        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
203
204        sum(OutletL.z)=sum(OutletV.z);
205
206end
Note: See TracBrowser for help on using the repository browser.