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