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

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

changing icons position.

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