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

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

changing icons position.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.8 KB
RevLine 
[1]1#*-------------------------------------------------------------------
[72]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*
[1]15*----------------------------------------------------------------------
16* Author: Paula B. Staudt
17* $Id: condenser.mso 300 2007-07-04 22:55:05Z arge $
18*--------------------------------------------------------------------*#
19
20using "streams";
21
22Model condenser
[262]23        ATTRIBUTES
24        Pallete         = true;
[300]25        Icon            = "icon/Condenser";
[262]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       
[1]43        PARAMETERS
[210]44        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[125]45        outer NComp as Integer;
[1]46        V as volume (Brief="Condenser total volume");
47        Across as area (Brief="Cross Section Area of reboiler");
48
49        VARIABLES
[125]50in      InletV as stream(Brief="Vapour inlet stream");
51out     OutletL as liquid_stream(Brief="Liquid outlet stream");
52out     OutletV as vapour_stream(Brief="Vapour outlet stream");
[1]53in      Q as heat_rate (Brief="Heat supplied");
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 + 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
[262]109        ATTRIBUTES
110        Pallete         = true;
[300]111        Icon            = "icon/CondenserSteady";
[262]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       
[1]124        PARAMETERS
[210]125        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[125]126        outer NComp as Integer;
[1]127
128        VARIABLES
[125]129in      InletV as stream(Brief="Vapour inlet stream");
130out     OutletL as liquid_stream(Brief="Liquid outlet stream");
[1]131in      Q as heat_rate (Brief="Heat supplied");
[65]132        DP as press_delta (Brief="Pressure Drop in the condenser");
[1]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 + Q;
141       
142        "Pressure"
143        DP = InletV.P - OutletL.P;
144end
[38]145
146#*-------------------------------------------------------------------
147* Condenser with reaction in liquid phase
148*--------------------------------------------------------------------*#
149Model condenserReact
[262]150        ATTRIBUTES
151        Pallete         = true;
[300]152        Icon            = "icon/Condenser";
[262]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       
[38]172        PARAMETERS
[243]173        outer PP as Plugin(Type="PP");
[125]174        outer NComp as Integer;
[38]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
[125]183in      InletV as stream(Brief="Vapour inlet stream");
184out     OutletL as liquid_stream(Brief="Liquid outlet stream");
185out     OutletV as vapour_stream(Brief="Vapour outlet stream");
[38]186
187        M(NComp) as mol (Brief="Molar Holdup in the tray");
188        ML as mol (Brief="Molar liquid holdup");
189        MV as mol (Brief="Molar vapour holdup");
190        E as energy (Brief="Total Energy Holdup on tray");
191        vL as volume_mol (Brief="Liquid Molar Volume");
192        vV as volume_mol (Brief="Vapour Molar volume");
193        Level as length (Brief="Level of liquid phase");
194        Q as heat_rate (Brief="Heat supplied");
195        Vol as volume;
[243]196        r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
[38]197        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
198
199        EQUATIONS
200        "Molar Concentration"
201        OutletL.z = vL * C;
202       
[243]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       
[38]206        "Component Molar Balance"
207        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
[243]208                                - OutletV.F*OutletV.z + stoic*r3*ML*vL;
[38]209
210        "Energy Balance"
211        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
[243]212                                - OutletV.F*OutletV.h + Q + Hr * r3 * ML*vL;
[38]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);
[243]247
[38]248end
Note: See TracBrowser for help on using the repository browser.