source: trunk/sample/stage_separators/sample_flash.mso @ 844

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

Adding dew and bubble point models in flash.mso.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.5 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* Sample file for model flash and flashSteady
17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
22* Author: Paula B. Staudt
23* $Id: sample_flash.mso 844 2009-09-10 11:47:35Z arge $
24*--------------------------------------------------------------------*#
25using "flash_new";
26
27# exemplo baseado nos dados do artigo do Gani 1985.
28FlowSheet flash_Test
29        PARAMETERS
30        PP as Plugin(Brief="Physical Properties",
31                Type="PP",
32                Components = ["1,3-butadiene", "isobutene", "n-pentane",
33                        "1-pentene", "1-hexene", "benzene"],
34                LiquidModel = "PR",
35                VapourModel = "PR"
36        );
37        NComp as Integer;
38
39        VARIABLES
40        Q       as energy_source (Brief="Heat supplied");
41       
42        SET
43        NComp = PP.NumberOfComponents;
44       
45        DEVICES
46        fl as flash;
47        s1 as source;
48       
49        CONNECTIONS
50        s1.Outlet to fl.Inlet;
51        Q.OutletQ to fl.InletQ;
52       
53        EQUATIONS
54        fl.OutletL.F = 400*sqrt(fl.Level/'m') * 'kmol/h';
55       
56        SPECIFY
57        s1.F = 496.3 * 'kmol/h';
58        s1.T = 338 * 'K';
59        s1.P = 507.1 * 'kPa';
60        s1.Composition = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283];
61
62        fl.OutletV.F = 68.5 * 'kmol/h';
63        Q.OutletQ.Q = 0 * 'kJ/h';
64       
65        SET
66        fl.V = 50 * 'm^3';
67        fl.diameter = 2 * 'm';
68        fl.orientation = "vertical";
69#       fl.orientation = "horizontal";
70
71        INITIAL
72        fl.OutletL.T = 338 * 'K';
73        fl.Level = 0.4 * 'm';
74
75        fl.OutletL.z(1) = 0.1;
76        fl.OutletL.z(2) = 0.1;
77        fl.OutletL.z(3) = 0.1;
78        fl.OutletL.z(4) = 0.1;
79        fl.OutletL.z(5) = 0.1;
80       
81        OPTIONS
82        Dynamic = true;
83        TimeStep = 0.1;
84        TimeEnd = 5;
85        TimeUnit = 'h';
86end
87
88# exemplo baseado nos dados do artigo do Gani 1985.
89FlowSheet flashSteady_Test
90        PARAMETERS
91        PP as Plugin(Brief="Physical Properties",
92                Type="PP",
93                Components = ["1,3-butadiene", "isobutene", "n-pentane",
94                        "1-pentene", "1-hexene", "benzene"],
95                LiquidModel = "PR",
96                VapourModel = "PR"
97        );
98        NComp as Integer;
99
100        VARIABLES
101        Q       as energy_source (Brief="Heat supplied");
102       
103        SET
104        NComp = PP.NumberOfComponents;
105       
106        DEVICES
107        fl as flash_steady;
108#       fl as FlashPHSteadyA;
109#       fl as flash_steady_full;
110#       fl as flash_steady_bd;
111        s1 as source;
112       
113        CONNECTIONS
114        s1.Outlet to fl.Inlet;
115        Q.OutletQ to fl.InletQ;
116       
117        SPECIFY
118        s1.F = 496.3 * 'kmol/h';
119        s1.T = 338 * 'K';
120        s1.P = 507.1 * 'kPa';
121        s1.Composition = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
122       
123        fl.OutletL.P = 2.5 * 'atm';
124        fl.OutletL.T = 315.06 * 'K';
125
126#       fl.vfrac = 1;
127
128#       Q.OutletQ.Q = 0 * 'kJ/h';
129       
130        OPTIONS
131        Dynamic = false;
132#       GuessFile="flashSteady_Test";
133end
134
135FlowSheet flashSteady_bubble
136        PARAMETERS
137        PP as Plugin(Brief="Physical Properties",
138                Type="PP",
139                Components = ["1,3-butadiene", "isobutene", "n-pentane",
140                        "1-pentene", "1-hexene", "benzene"],
141                LiquidModel = "PR",
142                VapourModel = "PR"
143        );
144        NComp as Integer;
145
146        VARIABLES
147        Q       as energy_source (Brief="Heat supplied");
148       
149        SET
150        NComp = PP.NumberOfComponents;
151       
152        DEVICES
153        fl as bubble_steady;
154        s1 as source;
155       
156        CONNECTIONS
157        s1.Outlet to fl.Inlet;
158        Q.OutletQ to fl.InletQ;
159       
160        SPECIFY
161        s1.F = 496.3 * 'kmol/h';
162        s1.T = 338 * 'K';
163        s1.P = 507.1 * 'kPa';
164        s1.Composition = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
165       
166        fl.OutletL.P = 2.5 * 'atm';
167#       fl.OutletL.T = 315.06 * 'K';
168
169#       Q.OutletQ.Q = 0 * 'kJ/h';
170       
171        OPTIONS
172        Dynamic = false;
173#       GuessFile="flashSteady_Test";
174end
175
176FlowSheet flashSteady_dew
177        PARAMETERS
178        PP as Plugin(Brief="Physical Properties",
179                Type="PP",
180                Components = ["1,3-butadiene", "isobutene", "n-pentane",
181                        "1-pentene", "1-hexene", "benzene"],
182                LiquidModel = "PR",
183                VapourModel = "PR"
184        );
185        NComp as Integer;
186
187        VARIABLES
188        Q       as energy_source (Brief="Heat supplied");
189       
190        SET
191        NComp = PP.NumberOfComponents;
192       
193        DEVICES
194        fl as dew_steady;
195        s1 as source;
196       
197        CONNECTIONS
198        s1.Outlet to fl.Inlet;
199        Q.OutletQ to fl.InletQ;
200       
201        SPECIFY
202        s1.F = 496.3 * 'kmol/h';
203        s1.T = 338 * 'K';
204        s1.P = 507.1 * 'kPa';
205        s1.Composition = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
206       
207        fl.OutletL.P = 2.5 * 'atm';
208#       fl.OutletL.T = 315.06 * 'K';
209
210#       Q.OutletQ.Q = 0 * 'kJ/h';
211       
212        OPTIONS
213        Dynamic = false;
214#       GuessFile="flashSteady_Test";
215end
Note: See TracBrowser for help on using the repository browser.