source: branches/newlanguage/sample/pressure_changers/sample_valve.mso @ 144

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

corrected the water specific density at 60F and uncommented some equations.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 valve (simplified) and valve_linear
17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm DEMO (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
22* Author: Paula B. Staudt, Estefane Horn
23* $Id: sample_valve.mso 109 2007-01-11 22:03:27Z arge $
24*--------------------------------------------------------------------*#
25
26using "pressure_changers/valve";
27
28FlowSheet valve_Test_V
29# with vapour conditions
30        PARAMETERS
31        PP      as CalcObject(Brief="Physical Properties",File="vrpp");
32        NComp   as Integer;
33
34        SET
35        PP.Components = [ "isobutane", "benzene"];
36        PP.LiquidModel = "PR";
37        PP.VapourModel = "PR";
38        NComp = PP.NumberOfComponents;
39       
40        DEVICES
41        v1 as valve;
42        s1 as stream_therm;
43       
44        CONNECTIONS
45        s1 to v1.Inlet;
46
47        SPECIFY
48        s1.P = 150 * "kPa";
49        s1.T = 281.75 * "K";
50        s1.z = [0.664, 0.336];
51        s1.v = 0.0;
52
53        v1.x = 0.866;
54        v1.Outlet.P = 148 * "kPa";
55
56        SET
57        v1.k = 20 * "gal/min/psi^0.5";
58       
59        OPTIONS
60        relativeAccuracy = 1e-6;
61        mode = "steady";
62end
63
64FlowSheet valve_Test_L
65#with liquid conditions
66        PARAMETERS
67        PP      as CalcObject(Brief="Physical Properties",File="vrpp");
68        NComp   as Integer;
69
70        SET
71        PP.Components = [ "isobutane", "benzene"];
72        PP.LiquidModel = "PR";
73        PP.VapourModel = "PR";
74        NComp = PP.NumberOfComponents;
75       
76        DEVICES
77        v1 as valve;
78        s1 as stream_therm;
79       
80        CONNECTIONS
81        s1 to v1.Inlet;
82
83        SPECIFY
84        s1.P = 185 * "kPa";
85        s1.T = 328.12 * "K";
86        s1.z = [0.001848, 0.9982];
87        s1.v = 0.0;
88
89        v1.x = 0.3363;
90        v1.Outlet.P = 183 * "kPa";
91
92        SET
93        v1.k = 20 * "gal/min/psi^0.5";
94       
95        OPTIONS
96        relativeAccuracy = 1e-6;
97        mode = "steady";
98end
99
100FlowSheet valve_linear_Test
101       
102        DEVICES
103        S1 as streamTP;
104        V1 as valve_linear;
105
106        CONNECTIONS
107        S1 to V1.Inlet;
108       
109        PARAMETERS
110        PP              as CalcObject   (Brief="External Physical Properties", File="vrpp");
111        NComp   as Integer              (Default= 1);
112       
113        SET
114        PP.Components = ["water"];     
115        PP.LiquidModel = "IdealLiquid";
116        PP.VapourModel = "Ideal";
117        PP.Derivatives = 0;
118        NComp = PP.NumberOfComponents;
119       
120        SPECIFY
121        S1.P = 2169.78                  * "kPa";
122        S1.T = 394.26                   * "K" ;
123        S1.z = [1];
124        V1.Qv = 113.56                  * "m^3/h";
125        V1.x = 0.5;
126        V1.cv = 10                              * "m^3/h/kPa^0.5";
127       
128        OPTIONS
129        relativeAccuracy = 1e-6;
130        mode = "steady";
131end
Note: See TracBrowser for help on using the repository browser.