source: branches/newlanguage/sample/stage_separators/sample_flash.mso @ 140

Last change on this file since 140 was 124, checked in by Rafael de Pelegrini Soares, 16 years ago

Updated some models using if conditions

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