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 | * Sample file for model tray |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | * |
---|
19 | * This sample file needs VRTherm DEMO (www.vrtech.com.br) to run. |
---|
20 | * |
---|
21 | *---------------------------------------------------------------------- |
---|
22 | * Author: Paula B. Staudt |
---|
23 | * $Id: sample_tray.mso 468 2008-03-03 18:49:53Z paula $ |
---|
24 | *--------------------------------------------------------------------*# |
---|
25 | using "stage_separators/tray"; |
---|
26 | |
---|
27 | FlowSheet tray_Test_1 |
---|
28 | PARAMETERS |
---|
29 | PP as Plugin(Brief="Physical Properties", |
---|
30 | Type="PP", |
---|
31 | Components = [ "n-pentane", "benzene"], |
---|
32 | LiquidModel = "PR", |
---|
33 | VapourModel = "PR" |
---|
34 | ); |
---|
35 | NComp as Integer; |
---|
36 | |
---|
37 | SET |
---|
38 | NComp = PP.NumberOfComponents; |
---|
39 | |
---|
40 | VARIABLES |
---|
41 | deltaP as pressure; |
---|
42 | phiL as Real; |
---|
43 | |
---|
44 | DEVICES |
---|
45 | t1 as tray; |
---|
46 | feed as source; |
---|
47 | inL as liquid_stream; |
---|
48 | inV as vapour_stream; |
---|
49 | |
---|
50 | CONNECTIONS |
---|
51 | feed.Outlet to t1.Inlet; |
---|
52 | inL to t1.InletL; |
---|
53 | inV to t1.InletV; |
---|
54 | |
---|
55 | EQUATIONS |
---|
56 | deltaP = t1.InletV.P - t1.OutletV.P; |
---|
57 | phiL = t1.ML*t1.vL / t1.V; |
---|
58 | |
---|
59 | SPECIFY |
---|
60 | feed.Outlet.F = 113.4 * 'kmol/h'; |
---|
61 | feed.Outlet.T = 291 * 'K'; |
---|
62 | feed.Outlet.P = 1.66 * 'atm'; |
---|
63 | feed.Outlet.z = [0.5, 0.5]; |
---|
64 | |
---|
65 | inL.P = 165 * 'kPa'; |
---|
66 | inL.T = 310 * 'K'; |
---|
67 | inL.F = 61.99 * 'kmol/h'; |
---|
68 | inL.z = [0.1641, 0.8359]; |
---|
69 | |
---|
70 | inV.P = 150 * 'kPa'; |
---|
71 | inV.T = 321 * 'K'; |
---|
72 | inV.z = [0.0584, 0.9416]; |
---|
73 | |
---|
74 | t1.Emv = 1; |
---|
75 | t1.OutletV.F = 147.1 * 'kmol/h'; |
---|
76 | |
---|
77 | SET |
---|
78 | t1.V = 4 * 'ft^3'; |
---|
79 | t1.Ah = 0.394 * 'ft^2'; |
---|
80 | t1.lw = 20.94 * 'in'; |
---|
81 | t1.hw = 0.125 * 'ft'; |
---|
82 | t1.Q = 0 * 'kW'; |
---|
83 | t1.beta = 0.6; |
---|
84 | t1.alfa = 4; |
---|
85 | t1.Ap = 3.94 * 'ft^2'; |
---|
86 | |
---|
87 | INITIAL |
---|
88 | t1.OutletL.T = 320 *'K'; |
---|
89 | t1.Level = 1.2 * t1.hw; |
---|
90 | t1.OutletL.z(1) = 0.5; |
---|
91 | |
---|
92 | OPTIONS |
---|
93 | InitialFile = "/home/paula/tray_Test.rlt"; |
---|
94 | TimeStep = 10; |
---|
95 | TimeEnd = 100; |
---|
96 | end |
---|
97 | |
---|
98 | FlowSheet tray_Test_2 |
---|
99 | PARAMETERS |
---|
100 | PP as Plugin(Brief="Physical Properties", |
---|
101 | Type="PP", |
---|
102 | Components = [ "isobutane", "n-pentane", "propylene", |
---|
103 | "benzene", "isobutene" ], |
---|
104 | LiquidModel = "PR", |
---|
105 | VapourModel = "PR" |
---|
106 | ); |
---|
107 | NComp as Integer; |
---|
108 | |
---|
109 | SET |
---|
110 | NComp = PP.NumberOfComponents; |
---|
111 | |
---|
112 | VARIABLES |
---|
113 | deltaP as pressure; |
---|
114 | phiL as Real; |
---|
115 | |
---|
116 | DEVICES |
---|
117 | t1 as tray; |
---|
118 | feed as source; |
---|
119 | inL as liquid_stream; |
---|
120 | inV as vapour_stream; |
---|
121 | |
---|
122 | CONNECTIONS |
---|
123 | feed.Outlet to t1.Inlet; |
---|
124 | inL to t1.InletL; |
---|
125 | inV to t1.InletV; |
---|
126 | |
---|
127 | EQUATIONS |
---|
128 | deltaP = t1.InletV.P - t1.OutletV.P; |
---|
129 | phiL = t1.ML*t1.vL / t1.V; |
---|
130 | |
---|
131 | SPECIFY |
---|
132 | feed.Outlet.F = 0 * 'kmol/h'; |
---|
133 | feed.Outlet.T = 300 * 'K'; |
---|
134 | feed.Outlet.P = 1.66 * 'atm'; |
---|
135 | feed.Outlet.z = [0.5, 0.5]; |
---|
136 | |
---|
137 | inL.P = 2.22 * 'atm'; |
---|
138 | inL.T = 297.6 * 'K'; |
---|
139 | inL.F = 71.21 * 'kmol/h'; |
---|
140 | inL.z = [0.226, 0.425, 0.035, 0.025, 0.289]; |
---|
141 | |
---|
142 | inV.F = 175.3 * 'kmol/h'; |
---|
143 | inV.P = 2.3062 * 'atm'; |
---|
144 | inV.T = 308.3 * 'K'; |
---|
145 | inV.z = [0.265, 0.233, 0.150, 0.014, 0.338]; |
---|
146 | |
---|
147 | t1.Emv = 1; |
---|
148 | |
---|
149 | SET |
---|
150 | t1.V = 4 * 'ft^3'; |
---|
151 | t1.Ah = 0.394 * 'ft^2'; |
---|
152 | t1.lw = 20.94 * 'in'; |
---|
153 | t1.hw = 0.125 * 'ft'; |
---|
154 | t1.Q = 0 * 'kW'; |
---|
155 | t1.beta = 0.6; |
---|
156 | t1.alfa = 4; |
---|
157 | t1.Ap = 3.94 * 'ft^2'; |
---|
158 | |
---|
159 | INITIAL |
---|
160 | t1.OutletL.T = 304 *'K'; |
---|
161 | t1.Level = 1.2 * t1.hw; |
---|
162 | t1.OutletL.z([1:4]) = [0.2, 0.2, 0.2, 0.2]; |
---|
163 | |
---|
164 | OPTIONS |
---|
165 | #InitialFile = "/home/paula/tray_Test.rlt"; |
---|
166 | TimeStep = 10; |
---|
167 | TimeEnd = 100; |
---|
168 | end |
---|
169 | |
---|
170 | #to compare with tray_Test_1 |
---|
171 | FlowSheet packedStage_BilletSchultes_Test_1 |
---|
172 | PARAMETERS |
---|
173 | PP as Plugin(Brief="Physical Properties", |
---|
174 | Type="PP", |
---|
175 | Components = [ "n-pentane", "benzene"], |
---|
176 | LiquidModel = "PR", |
---|
177 | VapourModel = "PR" |
---|
178 | ); |
---|
179 | NComp as Integer; |
---|
180 | |
---|
181 | SET |
---|
182 | NComp = PP.NumberOfComponents; |
---|
183 | |
---|
184 | VARIABLES |
---|
185 | deltaP as Real (Unit='atm/m'); |
---|
186 | |
---|
187 | DEVICES |
---|
188 | t1 as packedStage_BilletSchultes; |
---|
189 | feed as source; |
---|
190 | inL as liquid_stream; |
---|
191 | inV as vapour_stream; |
---|
192 | |
---|
193 | CONNECTIONS |
---|
194 | feed.Outlet to t1.Inlet; |
---|
195 | inL to t1.InletL; |
---|
196 | inV to t1.InletV; |
---|
197 | |
---|
198 | EQUATIONS |
---|
199 | deltaP = (t1.InletV.P - t1.OutletV.P)/t1.hs; |
---|
200 | |
---|
201 | SPECIFY |
---|
202 | feed.Outlet.F = 113.4 * 'kmol/h'; |
---|
203 | feed.Outlet.T = 291 * 'K'; |
---|
204 | feed.Outlet.P = 1.66 * 'atm'; |
---|
205 | feed.Outlet.z = [0.5, 0.5]; |
---|
206 | |
---|
207 | inL.P = 165 * 'kPa'; |
---|
208 | inL.T = 310 * 'K'; |
---|
209 | inL.F = 61.99 * 'kmol/h'; |
---|
210 | inL.z = [0.1641, 0.8359]; |
---|
211 | |
---|
212 | inV.F = 201.25 * 'kmol/h'; |
---|
213 | inV.P = 150 * 'kPa'; |
---|
214 | inV.T = 321 * 'K'; |
---|
215 | inV.z = [0.0584, 0.9416]; |
---|
216 | |
---|
217 | SET |
---|
218 | #Metal Pall Ring - nominal packing size 50 mm - Billet and Schultes, 1999. |
---|
219 | t1.Q = 0 * 'kW'; |
---|
220 | t1.Ap = 0.8 * 'm^2'; |
---|
221 | t1.V = 0.8 * 'm^2' * 0.4 * 'm'; |
---|
222 | t1.ds = 1.009 * 'm'; |
---|
223 | t1.Cpo = 0.763; |
---|
224 | t1.e = 0.951; |
---|
225 | t1.a = 112.6 * 'm^2/m^3'; |
---|
226 | t1.hs = 0.4 * 'm'; |
---|
227 | t1.Qsio = 1; |
---|
228 | |
---|
229 | INITIAL |
---|
230 | t1.OutletL.T = 320 *'K'; |
---|
231 | t1.ML = 0.25 * 'kmol'; |
---|
232 | t1.OutletL.z(1) = 0.5; |
---|
233 | |
---|
234 | OPTIONS |
---|
235 | InitialFile = "packedStage_BilletSchultes_Test_1.rlt"; |
---|
236 | DAESolver(File="sundials"); |
---|
237 | TimeStep = 100; |
---|
238 | TimeEnd = 1000; |
---|
239 | end |
---|
240 | |
---|
241 | #the 3rd stage of the Distillation_kettle_cond_Test |
---|
242 | FlowSheet packedStage_BilletSchultes_Test_2 |
---|
243 | PARAMETERS |
---|
244 | PP as Plugin(Brief="Physical Properties", |
---|
245 | Type="PP", |
---|
246 | Components = [ "isobutane", "n-pentane", "propylene", |
---|
247 | "benzene", "isobutene" ], |
---|
248 | LiquidModel = "PR", |
---|
249 | VapourModel = "PR" |
---|
250 | ); |
---|
251 | NComp as Integer; |
---|
252 | |
---|
253 | SET |
---|
254 | NComp = PP.NumberOfComponents; |
---|
255 | |
---|
256 | VARIABLES |
---|
257 | deltaP as Real (Unit='atm/m'); |
---|
258 | |
---|
259 | DEVICES |
---|
260 | t1 as packedStage_BilletSchultes; |
---|
261 | feed as source; |
---|
262 | inL as liquid_stream; |
---|
263 | inV as vapour_stream; |
---|
264 | |
---|
265 | CONNECTIONS |
---|
266 | feed.Outlet to t1.Inlet; |
---|
267 | inL to t1.InletL; |
---|
268 | inV to t1.InletV; |
---|
269 | |
---|
270 | EQUATIONS |
---|
271 | deltaP = (t1.InletV.P - t1.OutletV.P)/t1.hs; |
---|
272 | |
---|
273 | SPECIFY |
---|
274 | feed.Outlet.F = 0 * 'kmol/h'; |
---|
275 | feed.Outlet.T = 300 * 'K'; |
---|
276 | feed.Outlet.P = 1 * 'atm'; |
---|
277 | feed.Outlet.z = 1/NComp; |
---|
278 | |
---|
279 | inL.F = 71.21 * 'kmol/h'; |
---|
280 | inL.P = 2.22 * 'atm'; |
---|
281 | inL.T = 297.6 * 'K'; |
---|
282 | inL.z = [0.226, 0.425, 0.035, 0.025, 0.289]; |
---|
283 | |
---|
284 | inV.F = 175.3 * 'kmol/h'; |
---|
285 | inV.P = 2.3062 * 'atm'; |
---|
286 | inV.T = 308.3 * 'K'; |
---|
287 | inV.z = [0.265, 0.233, 0.150, 0.014, 0.338]; |
---|
288 | |
---|
289 | #t1.OutletV.F = 177.9 * 'kmol/h'; |
---|
290 | |
---|
291 | SET |
---|
292 | #Metal Pall Ring - nominal packing size 50 mm - Billet and Schultes, 1999. |
---|
293 | t1.Q = 0 * 'kW'; |
---|
294 | t1.Ap = 0.8 * 'm^2'; |
---|
295 | t1.V = 0.8 * 'm^2' * 0.4 * 'm'; |
---|
296 | t1.ds = 1.009 * 'm'; |
---|
297 | t1.Cpo = 0.763; |
---|
298 | t1.e = 0.951; |
---|
299 | t1.a = 112.6 * 'm^2/m^3'; |
---|
300 | t1.hs = 0.4 * 'm'; |
---|
301 | t1.Qsio = 1; |
---|
302 | |
---|
303 | INITIAL |
---|
304 | t1.OutletL.T = 280 *'K'; |
---|
305 | t1.ML = 0.05 * 'kmol'; |
---|
306 | t1.OutletL.z([1:4]) = [0.286, 0.203, 0.148, 0.006]; |
---|
307 | |
---|
308 | OPTIONS |
---|
309 | DAESolver(File="sundials"); |
---|
310 | #InitialFile = "packedStage_BilletSchultes_Test.rlt"; |
---|
311 | TimeStep = 2; |
---|
312 | TimeEnd = 50; |
---|
313 | end |
---|