source: trunk/sample/miscellaneous/sample_streams.mso @ 494

Last change on this file since 494 was 218, checked in by Argimiro Resende Secchi, 17 years ago

Remove more convergence problems in samples.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 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 streams
17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm DEMO (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
22* Author: Rafael de Pelegrini Soares
23* $Id: sample_streams.mso 218 2007-03-16 02:55:04Z arge $
24*--------------------------------------------------------------------*#
25
26using "streams";
27
28FlowSheet SampleStreams
29        PARAMETERS
30        NComp as Integer(Default=5);
31
32        DEVICES
33        s1 as stream;
34
35        SPECIFY
36        s1.F = 10  * 'kmol/h';
37        s1.T = 300 * 'K';
38        s1.P = 1   * 'atm';
39        s1.z = 1/NComp;
40        s1.h = 5   * 'J/kmol';
41        s1.v = 0.0;
42
43        OPTIONS
44        Dynamic = false;
45end
46
47FlowSheet SampleStreamsTherm
48        PARAMETERS
49        PP   as Plugin(Brief="Physical Properties", Type="PP",
50                Components = [ "isobutane", "benzene", "ethanol" ],
51                LiquidModel = "IdealLiquid",
52                VapourModel = "Ideal");
53        NComp as Integer;
54
55        SET
56        NComp = PP.NumberOfComponents;
57
58        DEVICES
59        sl as source;
60        sv as source;
61       
62        LiqOut  as sink;
63        VapOut as sink;
64       
65        CONNECTIONS
66       
67        sl.Outlet to LiqOut.Inlet;
68        sv.Outlet to VapOut.Inlet;
69
70       
71        SPECIFY
72        sl.Outlet.F = 10  * 'kmol/h';
73        sl.Outlet.T = 300 * 'K';
74        sl.Outlet.P = 100 * 'kPa';
75        sl.Outlet.z =  [0.24596, 0.370278, 0.383762];
76#       sl.Outlet.v = 0.0; #liquid stream
77
78       
79        sv.Outlet.F = 10  * 'kmol/h';
80        #sv.Outlet.h = 20248 * 'J/mol';
81        sv.Outlet.T = 300 * 'K';
82        sv.Outlet.P = 100 * 'kPa';
83        #sv.Outlet.z = [0.824212, 0.12577, 0.0500176];
84#       sv.Outlet.v = 1.0; #vapor stream
85
86        EQUATIONS
87        "Liquid-Vapour equilibrium"
88        PP.VapourFugacityCoefficient(sv.Outlet.T, sv.Outlet.P, sv.Outlet.z) * sv.Outlet.z =
89                PP.LiquidFugacityCoefficient(sl.Outlet.T, sl.Outlet.P, sl.Outlet.z) * sl.Outlet.z;
90       
91        OPTIONS
92        Dynamic= true;
93end
Note: See TracBrowser for help on using the repository browser.