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: Based on Models written by Paula B. Staudt |
---|
17 | * $Id$ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | # The complete documentation for these models needs to be updated !!! |
---|
21 | |
---|
22 | using "streams"; |
---|
23 | |
---|
24 | Model User_trayBasic |
---|
25 | |
---|
26 | ATTRIBUTES |
---|
27 | Pallete = false; |
---|
28 | Icon = "icon/Tray"; |
---|
29 | Brief = "Basic description of a tray column model."; |
---|
30 | Info = |
---|
31 | "To be updated"; |
---|
32 | |
---|
33 | PARAMETERS |
---|
34 | outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); |
---|
35 | outer NComp as Integer; |
---|
36 | |
---|
37 | VARIABLES |
---|
38 | |
---|
39 | Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Hidden=true); |
---|
40 | LiquidSideStream as liquid_stream (Brief="liquid Sidestream", Hidden=true); |
---|
41 | VapourSideStream as vapour_stream (Brief="vapour Sidestream", Hidden=true); |
---|
42 | |
---|
43 | in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); |
---|
44 | in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); |
---|
45 | out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); |
---|
46 | out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); |
---|
47 | |
---|
48 | M(NComp) as mol (Brief="Molar Holdup in the tray"); |
---|
49 | ML as mol (Brief="Molar liquid holdup"); |
---|
50 | MV as mol (Brief="Molar vapour holdup"); |
---|
51 | E as energy (Brief="Total Energy Holdup on tray"); |
---|
52 | vL as volume_mol (Brief="Liquid Molar Volume"); |
---|
53 | vV as volume_mol (Brief="Vapour Molar volume"); |
---|
54 | Level as length (Brief="Height of clear liquid on plate"); |
---|
55 | yideal(NComp) as fraction; |
---|
56 | |
---|
57 | |
---|
58 | EQUATIONS |
---|
59 | |
---|
60 | "Component Molar Balance" |
---|
61 | diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z- OutletL.F*OutletL.z - OutletV.F*OutletV.z- |
---|
62 | LiquidSideStream.F*LiquidSideStream.z-VapourSideStream.F*VapourSideStream.z; |
---|
63 | |
---|
64 | "Molar Holdup" |
---|
65 | M = ML*OutletL.z + MV*OutletV.z; |
---|
66 | |
---|
67 | "Mol fraction normalisation" |
---|
68 | sum(OutletL.z)= 1.0; |
---|
69 | sum(OutletL.z)= sum(OutletV.z); |
---|
70 | |
---|
71 | "Liquid Volume" |
---|
72 | vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); |
---|
73 | |
---|
74 | "Vapour Volume" |
---|
75 | vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
76 | |
---|
77 | "Chemical Equilibrium" |
---|
78 | PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal; |
---|
79 | |
---|
80 | "Thermal Equilibrium" |
---|
81 | OutletV.T = OutletL.T; |
---|
82 | |
---|
83 | "Mechanical Equilibrium" |
---|
84 | OutletV.P = OutletL.P; |
---|
85 | |
---|
86 | "Thermal Equilibrium Vapour Side Stream" |
---|
87 | OutletV.T = VapourSideStream.T; |
---|
88 | |
---|
89 | "Thermal Equilibrium Liquid Side Stream" |
---|
90 | OutletL.T = LiquidSideStream.T; |
---|
91 | |
---|
92 | "Mechanical Equilibrium Vapour Side Stream" |
---|
93 | OutletV.P= VapourSideStream.P; |
---|
94 | |
---|
95 | "Mechanical Equilibrium Liquid Side Stream" |
---|
96 | OutletL.P = LiquidSideStream.P; |
---|
97 | |
---|
98 | "Composition Liquid Side Stream" |
---|
99 | OutletL.z= LiquidSideStream.z; |
---|
100 | |
---|
101 | "Composition Vapour Side Stream" |
---|
102 | OutletV.z= VapourSideStream.z; |
---|
103 | |
---|
104 | end |
---|
105 | |
---|
106 | Model User_tray as User_trayBasic |
---|
107 | |
---|
108 | ATTRIBUTES |
---|
109 | Pallete = false; |
---|
110 | Icon = "icon/Tray"; |
---|
111 | Brief = "Description of a column tray."; |
---|
112 | Info = |
---|
113 | "To be updated"; |
---|
114 | |
---|
115 | VARIABLES |
---|
116 | rhoL as dens_mass; |
---|
117 | rhoV as dens_mass; |
---|
118 | |
---|
119 | btemp as Real (Brief="Temporary variable of Roffels liquid flow equation"); |
---|
120 | |
---|
121 | EQUATIONS |
---|
122 | |
---|
123 | "Liquid Density" |
---|
124 | rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); |
---|
125 | |
---|
126 | "Vapour Density" |
---|
127 | rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); |
---|
128 | |
---|
129 | end |
---|
130 | |
---|