source: mso/sample/miscellaneous/sample_streams.mso @ 4

Last change on this file since 4 was 1, checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#*---------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2002-2004  the author
6*----------------------------------------------------------------------
7* Author: Rafael de Pelegrini Soares
8* $Id: sample_streams.mso 1 2006-06-20 17:33:53Z rafael $
9*----------------------------------------------------------------------
10*
11* EMSO sample file.
12*
13* Simple flowsheet with some streams.
14*
15*--------------------------------------------------------------------*#
16
17using "streams";
18
19FlowSheet SampleStreams
20        PARAMETERS
21        NComp as Integer(Default=5);
22
23        DEVICES
24        s1 as stream;
25
26        SPECIFY
27        s1.F = 10  * "kmol/h";
28        s1.T = 300 * "K";
29        s1.P = 1   * "atm";
30        s1.z = 1/NComp;
31        s1.h = 5   * "J/kmol";
32        s1.v = 0.0;
33
34        OPTIONS
35        mode = "steady";
36end
37
38FlowSheet SampleStreamsTherm
39        PARAMETERS
40        PP   as CalcObject(Brief="Physical Properties", File="vrpp");
41        NComp as Integer;
42
43        SET
44        PP.LiquidModel = "PR";
45        PP.VapourModel = "PR";
46        PP.Components = [ "n-butane", "benzene", "n-octane" ];
47        NComp = PP.NumberOfComponents;
48
49        DEVICES
50        sl as stream_therm;
51        sv as stream_therm;
52       
53        SPECIFY
54        sl.F = 10  * "kmol/h";
55        sl.T = 300 * "K";
56        sl.P = 100 * "kPa";
57        sl.z =  [0.24596, 0.370278, 0.383762];
58        sl.v = 0.0; #liquid stream
59
60       
61        sv.F = 10  * "kmol/h";
62        #sv.h = 20248 * "J/mol";
63        sv.T = 300 * "K";
64        sv.P = 100 * "kPa";
65        #sv.z = [0.824212, 0.12577, 0.0500176];
66        sv.v = 1.0; #vapor stream
67
68        "Liquid-Vapour equilibrium"
69        PP.VapourFugacityCoefficient(sv.T, sv.P, sv.z) * sv.z =
70                PP.LiquidFugacityCoefficient(sl.T, sl.P, sl.z) * sl.z;
71       
72        OPTIONS
73        #mode = "steady";
74        outputLevel = "high";
75end
Note: See TracBrowser for help on using the repository browser.