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

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

Fix some new language syntax.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 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 Batch Distillation (or Differential Distilation)
17*--------------------------------------------------------------------
18*
19*       Streams:
20*               * a liquid inlet stream
21*               * a vapour outlet stream
22*               * a inlet stream
23*
24*       Assumptions:
25*               * perfect mixing of both phases
26*               * thermodynamics equilibrium
27*               * no liquid entrainment in the vapour stream
28*
29*       Specify:
30*               * the inlet stream
31*               * the liquid inlet stream
32*               * the molar flow of the vapour outlet stream
33*
34*       Initial:
35*               * the distillator temperature (T)
36*               * the distillator liquid level (Ll)
37*               * (NoComps - 1) compositions in the distillator
38*                                       or in the OutletV
39*               
40*
41*----------------------------------------------------------------------
42* Author: Maurício Carvalho Maciel
43* $Id: batch_dist.mso 176 2007-03-04 04:56:54Z arge $
44*--------------------------------------------------------------------*#
45using "streams";
46       
47Model Diff_Dist
48       
49        PARAMETERS
50outer PP                as Plugin       (Brief = "External Physical Properties", Type="PP");
51outer NComp     as Integer      (Brief = "Number of chemical components", Lower = 1);
52        Across  as area                 (Brief="Cross Section Area");
53        V               as volume               (Brief="Total volume");
54       
55        VARIABLES
56in      Inlet   as stream (Brief="Feed stream");
57in      InletL  as stream (Brief="Liquid inlet stream");
58out     OutletV as vapour_stream (Brief="Vapour outlet stream");
59
60        M(NComp)        as mol                  (Brief="Molar Holdup in the distillator");
61        ML                      as mol                  (Brief="Molar liquid holdup");
62        MV                      as mol                  (Brief="Molar vapour holdup");
63        E                       as energy               (Brief="Total Energy holdup on distillator");
64        volL            as volume_mol   (Brief="Liquid Molar Volume");
65        volV            as volume_mol   (Brief="Vapour Molar volume");
66        Level           as length               (Brief="Level of liquid phase", Default=1, Lower=0);
67        T                       as temperature  (Brief="Temperature on distillator");
68        P                       as pressure             (Brief="Pressure on distillator");
69        x(NComp)        as fraction     (Brief = "Molar Fraction of the Liquid of the distillator");
70        h                       as enth_mol             (Brief="Molar Enthalpy of the liquid of the distillator");
71        Q                       as heat_rate    (Brief="Heat supplied");
72       
73        EQUATIONS
74       
75        "Component Molar Balance"
76        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z - OutletV.F*OutletV.z;
77       
78        "Energy Balance"
79        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h - OutletV.F*OutletV.h + Q;
80       
81        "Molar Holdup"
82        M = ML*x + MV*OutletV.z;
83       
84        "Energy Holdup"
85        E = ML*h + MV*OutletV.h - P*V;
86       
87        "Mol fraction normalisation"
88        sum(x)=1.0;
89        sum(x)=sum(OutletV.z);
90
91        "Liquid Volume"
92        volL = PP.LiquidVolume(T, P, x);
93       
94        "Vapour Volume"
95        volV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
96       
97        "Chemical Equilibrium"
98        PP.LiquidFugacityCoefficient(T, P, x)*x =
99                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
100
101        "Mechanical Equilibrium"
102        P = OutletV.P;
103       
104        "Thermal Equilibrium"
105        T = OutletV.T;
106       
107        "Geometry Constraint"
108        V = ML*volL + MV*volV;
109       
110        "Level of liquid phase"
111        Level = ML*volL/Across;
112       
113        "Enthalpy"
114        h = PP.LiquidEnthalpy(T, P, x);
115       
116end
117       
118       
119
Note: See TracBrowser for help on using the repository browser.