source: branches/rate/eml/stage_separators/condenser.mso @ 958

Last change on this file since 958 was 353, checked in by Argimiro Resende Secchi, 15 years ago

Fixing some wiki notation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.2 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* Author: Paula B. Staudt
17* $Id: condenser.mso 353 2007-08-30 16:12:27Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model condenser
23        ATTRIBUTES
24        Pallete         = true;
25        Icon            = "icon/Condenser";
26        Brief           = "Model of a dynamic condenser.";
27        Info            =
28"== Assumptions ==
29* perfect mixing of both phases;
30* thermodynamics equilibrium.
31       
32== Specify ==
33* the inlet stream;
34* the outlet flows: OutletV.F and OutletL.F;
35* the heat supply.
36       
37== Initial Conditions ==
38* the condenser temperature (OutletL.T);
39* the condenser liquid level (Level);
40* (NoComps - 1) OutletL (OR OutletV) compositions.
41";     
42       
43        PARAMETERS
44        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
45        outer NComp as Integer;
46        V as volume (Brief="Condenser total volume");
47        Across as area (Brief="Cross Section Area of reboiler");
48
49        VARIABLES
50in      InletV as stream(Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}");
51out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
52out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
53in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
54
55        M(NComp) as mol (Brief="Molar Holdup in the tray");
56        ML as mol (Brief="Molar liquid holdup");
57        MV as mol (Brief="Molar vapour holdup");
58        E as energy (Brief="Total Energy Holdup on tray");
59        vL as volume_mol (Brief="Liquid Molar Volume");
60        vV as volume_mol (Brief="Vapour Molar volume");
61        Level as length (Brief="Level of liquid phase");
62
63        EQUATIONS
64        "Component Molar Balance"
65        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
66                                - OutletV.F*OutletV.z;
67
68        "Energy Balance"
69        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
70                                - OutletV.F*OutletV.h + InletQ.Q;
71
72        "Molar Holdup"
73        M = ML*OutletL.z + MV*OutletV.z;
74       
75        "Energy Holdup"
76        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
77       
78        "Mol fraction normalisation"
79        sum(OutletL.z)=1.0;
80        sum(OutletL.z)=sum(OutletV.z);
81
82        "Liquid Volume"
83        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
84        "Vapour Volume"
85        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
86
87        "Chemical Equilibrium"
88        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
89                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
90
91        "Thermal Equilibrium"
92        OutletL.T = OutletV.T;
93
94        "Mechanical Equilibrium"
95        OutletV.P = OutletL.P;
96
97        "Geometry Constraint"
98        V = ML*vL + MV*vV;
99
100        "Level of liquid phase"
101        Level = ML*vL/Across;
102end
103
104
105#*----------------------------------------------------------------------
106* Model of a  Steady State condenser with no thermodynamics equilibrium
107*---------------------------------------------------------------------*#
108Model condenserSteady
109        ATTRIBUTES
110        Pallete         = true;
111        Icon            = "icon/CondenserSteady";
112        Brief           = "Model of a  Steady State condenser with no thermodynamics equilibrium.";
113        Info            =
114"== Assumptions ==
115* perfect mixing of both phases;
116* no thermodynamics equilibrium.
117       
118== Specify ==
119* the inlet stream;
120* the pressure drop in the condenser;
121* the heat supply.
122";
123       
124        PARAMETERS
125        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
126        outer NComp as Integer;
127
128        VARIABLES
129in      InletV as stream(Brief="Vapour inlet stream", PosX=0.3431, PosY=0, Symbol="_{inV}");
130out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.34375, PosY=1, Symbol="_{outL}");
131in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.5974, Symbol="_{in}");
132        DP as press_delta (Brief="Pressure Drop in the condenser");
133
134        EQUATIONS
135        "Molar Balance"
136        InletV.F = OutletL.F;
137        InletV.z = OutletL.z;
138               
139        "Energy Balance"
140        InletV.F*InletV.h = OutletL.F*OutletL.h + InletQ.Q;
141       
142        "Pressure"
143        DP = InletV.P - OutletL.P;
144end
145
146#*-------------------------------------------------------------------
147* Condenser with reaction in liquid phase
148*--------------------------------------------------------------------*#
149Model condenserReact
150        ATTRIBUTES
151        Pallete         = true;
152        Icon            = "icon/Condenser";
153        Brief           = "Model of a Condenser with reaction in liquid phase.";
154        Info            =
155"== Assumptions ==
156* perfect mixing of both phases;
157* thermodynamics equilibrium;
158* the reaction only takes place in liquid phase.
159       
160== Specify ==
161* the reaction related variables;
162* the inlet stream;
163* the outlet flows: OutletV.F and OutletL.F;
164* the heat supply.
165
166== Initial Conditions ==
167* the condenser temperature (OutletL.T);
168* the condenser liquid level (Level);
169* (NoComps - 1) OutletL (OR OutletV) compositions.
170";
171       
172        PARAMETERS
173        outer PP as Plugin(Type="PP");
174        outer NComp as Integer;
175        V as volume (Brief="Condenser total volume");
176        Across as area (Brief="Cross Section Area of reboiler");
177
178        stoic(NComp) as Real(Brief="Stoichiometric matrix");
179        Hr as energy_mol;
180        Pstartup as pressure;
181
182        VARIABLES
183in      InletV as stream(Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}");
184out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}");
185out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}");
186in      InletQ as energy_stream (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}");
187
188        M(NComp) as mol (Brief="Molar Holdup in the tray");
189        ML as mol (Brief="Molar liquid holdup");
190        MV as mol (Brief="Molar vapour holdup");
191        E as energy (Brief="Total Energy Holdup on tray");
192        vL as volume_mol (Brief="Liquid Molar Volume");
193        vV as volume_mol (Brief="Vapour Molar volume");
194        Level as length (Brief="Level of liquid phase");
195        Vol as volume;
196        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
197        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
198
199        EQUATIONS
200        "Molar Concentration"
201        OutletL.z = vL * C;
202       
203        "Reaction"
204        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';
205       
206        "Component Molar Balance"
207        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
208                                - OutletV.F*OutletV.z + stoic*r3*ML*vL;
209
210        "Energy Balance"
211        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
212                                - OutletV.F*OutletV.h + InletQ.Q + Hr * r3 * ML*vL;
213
214        "Molar Holdup"
215        M = ML*OutletL.z + MV*OutletV.z;
216       
217        "Energy Holdup"
218        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
219       
220        "Mol fraction normalisation"
221        sum(OutletL.z)=1.0;
222
223        "Liquid Volume"
224        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
225        "Vapour Volume"
226        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
227
228        "Thermal Equilibrium"
229        OutletL.T = OutletV.T;
230
231        "Mechanical Equilibrium"
232        OutletV.P = OutletL.P;
233
234        "Geometry Constraint"
235        V = ML*vL + MV*vV;
236
237        Vol = ML*vL;
238       
239        "Level of liquid phase"
240        Level = ML*vL/Across;
241       
242        "Chemical Equilibrium"
243        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
244        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
245
246        sum(OutletL.z)=sum(OutletV.z);
247
248end
Note: See TracBrowser for help on using the repository browser.