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

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

Added orientation type (vertical and horizontal) into the flash model. "Across" is now a variable and "diameter" is a new parameter.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
RevLine 
[86]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 235 2007-04-12 01:16:05Z arge $
24*--------------------------------------------------------------------*#
[1]25using "stage_separators/flash";
26
27# exemplo baseado nos dados do artigo do Gani 1985.
28FlowSheet flash_Test
29        PARAMETERS
[213]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        );
[117]37        NComp as Integer;
[1]38
39        VARIABLES
40        Q       as heat_rate (Brief="Heat supplied");
41       
42        SET
43        NComp = PP.NumberOfComponents;
44       
45        DEVICES
46        fl as flash;
[117]47        s1 as source;
[1]48       
49        CONNECTIONS
[119]50        s1.Outlet to fl.Inlet;
[1]51        Q to fl.Q;
52       
[54]53        EQUATIONS
[176]54        fl.OutletL.F = 400*sqrt(fl.Level/'m') * 'kmol/h';
[54]55       
[1]56        SPECIFY
[176]57        s1.Outlet.F = 496.3 * 'kmol/h';
58        s1.Outlet.T = 338 * 'K';
59        s1.Outlet.P = 507.1 * 'kPa';
[123]60        #s1.Outlet.v = 0.1380;
[117]61        s1.Outlet.z = [0.2379,0.3082,0.09958,0.1373,0.08872,0.1283];
[1]62
[176]63        fl.OutletV.F = 68.5 * 'kmol/h';
64        Q = 0 * 'kJ/h';
[1]65       
66        SET
[235]67        fl.V = 50 * 'm^3';
68        fl.diameter = 2 * 'm';
69        fl.orientation = "vertical";
70#       fl.orientation = "horizontal";
71
[1]72        INITIAL
[176]73        fl.OutletL.T = 338 * 'K';
[235]74        fl.Level = 0.4 * 'm';
[124]75
[1]76        fl.OutletL.z(1) = 0.1;
77        fl.OutletL.z(2) = 0.1;
78        fl.OutletL.z(3) = 0.1;
79        fl.OutletL.z(4) = 0.1;
80        fl.OutletL.z(5) = 0.1;
81       
82        OPTIONS
[123]83        RelativeAccuracy = 1e-4;
84        AbsoluteAccuracy = 1e-8;
[117]85        Dynamic = true;
86        TimeStep = 0.1;
[235]87        TimeEnd = 5;
[176]88        TimeUnit = 'h';
[1]89end
90
91# exemplo baseado nos dados do artigo do Gani 1985.
92FlowSheet flashSteady_Test
93        PARAMETERS
[213]94        PP as Plugin(Brief="Physical Properties",
95                Type="PP",
96                Components = ["1,3-butadiene", "isobutene", "n-pentane",
97                        "1-pentene", "1-hexene", "benzene"],
98                LiquidModel = "PR",
99                VapourModel = "PR"
100        );
[117]101        NComp as Integer;
[1]102
103        VARIABLES
104        Q       as heat_rate (Brief="Heat supplied");
105       
106        SET
107        NComp = PP.NumberOfComponents;
108       
109        DEVICES
[117]110        fl as flash_steady;
111        s1 as source;
[1]112       
113        CONNECTIONS
[121]114        s1.Outlet to fl.Inlet;
[1]115        Q to fl.Q;
116       
117        SPECIFY
[176]118        s1.Outlet.F = 496.3 * 'kmol/h';
119        s1.Outlet.T = 338 * 'K';
120        s1.Outlet.P = 507.1 * 'kPa';
[117]121        #s1.Outlet.v = 0.1380;
122        s1.Outlet.z = [0.2379,0.3082,0.09959,0.1373,0.08872,0.1283];
[1]123       
[176]124        fl.OutletL.P = 2.5 * 'atm';
[1]125
[176]126        #Q = 0 * 'kJ/h';
127        fl.OutletL.T = 315.06 * 'K';
[1]128       
129        OPTIONS
[117]130        Dynamic = false;
[1]131end
Note: See TracBrowser for help on using the repository browser.