source: trunk/sample/pressure_changers/sample_valve.mso @ 410

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

Updated solver options for the new language

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
RevLine 
[81]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*--------------------------------------------------------------------
[206]16* Sample file for models valve_simplified and valve
[81]17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm DEMO (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
[206]22* Author: Paula B. Staudt, Estefane Horn, Núbia do Carmo Ferreira
[81]23* $Id: sample_valve.mso 247 2007-04-24 13:44:18Z rafael $
24*--------------------------------------------------------------------*#
25
[1]26using "pressure_changers/valve";
27
28FlowSheet valve_Test_V
29# with vapour conditions
30        PARAMETERS
[213]31        PP      as Plugin(Brief="Physical Properties",
32                Type="PP",
33                Components = [ "isobutane", "benzene"],
34                LiquidModel = "PR",
35                VapourModel = "PR"
36        );
[1]37        NComp   as Integer;
38
39        SET
40        NComp = PP.NumberOfComponents;
41       
42        DEVICES
[205]43        v1 as valve_simplified;
[196]44        s1 as source;
[1]45       
46        CONNECTIONS
[196]47        s1.Outlet to v1.Inlet;
[1]48
49        SPECIFY
[196]50        s1.Outlet.P = 150 * 'kPa';
51        s1.Outlet.T = 281.75 * 'K';
52        s1.Outlet.z = [0.664, 0.336];
[1]53
54        v1.x = 0.866;
[196]55        v1.Outlet.P = 148 * 'kPa';
[1]56
57        SET
[196]58        v1.k = 20 * 'gal/min/psi^0.5';
[1]59       
60        OPTIONS
[196]61        Dynamic = false;
[247]62        NLASolver(
63                RelativeAccuracy = 1e-6
64        );
[1]65end
66
67FlowSheet valve_Test_L
68#with liquid conditions
69        PARAMETERS
[213]70        PP      as Plugin(Brief="Physical Properties",
71                Type="PP",
72                Components = [ "isobutane", "benzene"],
73                LiquidModel = "PR",
74                VapourModel = "PR"
75        );
[1]76        NComp   as Integer;
77
78        SET
79        NComp = PP.NumberOfComponents;
80       
81        DEVICES
[205]82        v1 as valve_simplified;
[196]83        s1 as source;
[1]84       
85        CONNECTIONS
[196]86        s1.Outlet to v1.Inlet;
[1]87
88        SPECIFY
[196]89        s1.Outlet.P = 185 * 'kPa';
90        s1.Outlet.T = 328.12 * 'K';
91        s1.Outlet.z = [0.001848, 0.9982];
[1]92
93        v1.x = 0.3363;
[196]94        v1.Outlet.P = 183 * 'kPa';
[1]95
96        SET
[196]97        v1.k = 20 * 'gal/min/psi^0.5';
[1]98       
99        OPTIONS
[196]100        Dynamic = false;
[247]101        NLASolver(
102                RelativeAccuracy = 1e-6
103        );
[1]104end
[57]105
106FlowSheet valve_linear_Test
107       
108        DEVICES
[196]109        S1 as source;
[205]110        V1 as valve;
[57]111
112        CONNECTIONS
[196]113        S1.Outlet to V1.Inlet;
[57]114       
115        PARAMETERS
[213]116        PP      as Plugin(Brief="Physical Properties",
117                Type="PP",
118                Components = [ "isobutane", "benzene"],
119                LiquidModel = "PR",
120                VapourModel = "PR"
121        );
[57]122        NComp   as Integer              (Default= 1);
123       
124        SET
125        NComp = PP.NumberOfComponents;
[206]126        V1.valve_type = "linear"; #"parabolic", "equal", "quick", "hyperbolic"
127
[57]128        SPECIFY
[196]129        S1.Outlet.P = 2169.78                   * 'kPa';
130        S1.Outlet.T = 394.26                    * 'K' ;
131        S1.Outlet.z = [1];
132       
133        V1.Qv = 113.56                  * 'm^3/h';
[57]134        V1.x = 0.5;
[196]135        V1.cv = 10                              * 'm^3/h/kPa^0.5';
[109]136       
137        OPTIONS
[196]138        Dynamic = false;
[247]139        NLASolver(
140                RelativeAccuracy = 1e-6
141        );
[57]142end
Note: See TracBrowser for help on using the repository browser.