source: trunk/eml/stage_separators/condenser.mso @ 233

Last change on this file since 233 was 210, checked in by Argimiro Resende Secchi, 16 years ago

Remove convergence problems of some samples.

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