1 | using "stage_separators/column"; |
---|
2 | |
---|
3 | # column section with 2 trays |
---|
4 | FlowSheet SectionColumn_Test_with2tray |
---|
5 | PARAMETERS |
---|
6 | PP as CalcObject(Brief="Physical Properties",File="vrpp"); |
---|
7 | NComp as Integer; |
---|
8 | |
---|
9 | SET |
---|
10 | PP.Components = [ "isobutane", "n-pentane"]; |
---|
11 | PP.LiquidModel = "PR"; |
---|
12 | PP.VapourModel = "PR"; |
---|
13 | NComp = PP.NumberOfComponents; |
---|
14 | |
---|
15 | DEVICES |
---|
16 | sec as Section_Column; |
---|
17 | feed as stream_therm; |
---|
18 | reb as stream_therm; |
---|
19 | cond as stream_therm; |
---|
20 | zero as stream; |
---|
21 | |
---|
22 | CONNECTIONS |
---|
23 | feed to sec.trays(2).Inlet; |
---|
24 | zero to sec.trays(1).Inlet; |
---|
25 | reb to sec.trays(2).InletV; |
---|
26 | cond to sec.trays(1).InletL; |
---|
27 | |
---|
28 | SPECIFY |
---|
29 | feed.F = 113.4 * "kmol/h"; |
---|
30 | feed.T = 291 * "K"; |
---|
31 | feed.P = 168.3 * "kPa"; |
---|
32 | feed.z = [0.5, 0.5]; |
---|
33 | feed.v = 0; |
---|
34 | |
---|
35 | zero.F = 0 * "kmol/h"; |
---|
36 | zero.T = 300 * "K"; |
---|
37 | zero.P = 1 * "atm"; |
---|
38 | zero.z = [0.5, 0.5]; |
---|
39 | zero.v = 0; |
---|
40 | zero.h = 0 * "J/mol"; |
---|
41 | |
---|
42 | cond.F = 68 * "kmol/h"; |
---|
43 | cond.P = 150 * "kPa"; |
---|
44 | cond.T = 281.75 * "K"; |
---|
45 | cond.v = 0.0; |
---|
46 | cond.z = [0.6664, 0.3336]; |
---|
47 | |
---|
48 | reb.F = 153 * "kmol/h"; |
---|
49 | reb.P = 185 * "kPa"; |
---|
50 | reb.T = 328.12 * "K"; |
---|
51 | reb.z = [0.001848, 0.9982]; |
---|
52 | reb.v = 1.0; |
---|
53 | |
---|
54 | sec.trays.Emv = 1; |
---|
55 | |
---|
56 | SET |
---|
57 | sec.NTrays = 2; |
---|
58 | #COLUMN |
---|
59 | sec.trays.V = 4 * "ft^3"; |
---|
60 | sec.trays.Ah = 0.394 * "ft^2"; |
---|
61 | sec.trays.lw = 20.94 * "in"; |
---|
62 | sec.trays.hw = 0.125 * "ft"; |
---|
63 | sec.trays.Q = 0 * "kW"; |
---|
64 | sec.trays.beta = 0.6; |
---|
65 | sec.trays.alfa = 4; |
---|
66 | sec.trays.Ap = 3.94 * "ft^2"; |
---|
67 | |
---|
68 | INITIAL |
---|
69 | sec.trays.OutletL.T = 290 *"K"; |
---|
70 | sec.trays.Level = 0.9 * sec.trays.hw; |
---|
71 | sec.trays.OutletL.z(1) = 0.5; |
---|
72 | |
---|
73 | OPTIONS |
---|
74 | #relativeAccuracy = 1e-3; |
---|
75 | outputLevel = "low"; |
---|
76 | time = [0:10:1000]; |
---|
77 | end |
---|
78 | |
---|
79 | # column section with 8 trays |
---|
80 | FlowSheet SectionColumn_Test_with8tray |
---|
81 | PARAMETERS |
---|
82 | PP as CalcObject(Brief="Physical Properties",File="vrpp"); |
---|
83 | NComp as Integer; |
---|
84 | |
---|
85 | SET |
---|
86 | PP.Components = [ "isobutane", "n-pentane"]; |
---|
87 | PP.LiquidModel = "PR"; |
---|
88 | PP.VapourModel = "PR"; |
---|
89 | PP.Derivatives = 0; |
---|
90 | NComp = PP.NumberOfComponents; |
---|
91 | |
---|
92 | DEVICES |
---|
93 | sec as Section_Column; |
---|
94 | feed as stream_therm; |
---|
95 | reb as stream_therm; |
---|
96 | cond as stream_therm; |
---|
97 | zero as stream; |
---|
98 | |
---|
99 | CONNECTIONS |
---|
100 | feed to sec.trays(5).Inlet; |
---|
101 | |
---|
102 | zero to sec.trays([1:4]).Inlet; |
---|
103 | zero to sec.trays([6:8]).Inlet; |
---|
104 | |
---|
105 | reb to sec.trays(8).InletV; |
---|
106 | cond to sec.trays(1).InletL; |
---|
107 | |
---|
108 | SPECIFY |
---|
109 | feed.F = 113.4 * "kmol/h"; |
---|
110 | feed.T = 291 * "K"; |
---|
111 | feed.P = 168.3 * "kPa"; |
---|
112 | feed.z = [0.5, 0.5]; |
---|
113 | feed.v = 0; |
---|
114 | |
---|
115 | zero.F = 0 * "kmol/h"; |
---|
116 | zero.T = 300 * "K"; |
---|
117 | zero.P = 1 * "atm"; |
---|
118 | zero.z = [0.5, 0.5]; |
---|
119 | zero.v = 0; |
---|
120 | zero.h = 0 * "J/mol"; |
---|
121 | |
---|
122 | cond.F = 68 * "kmol/h"; |
---|
123 | cond.P = 150 * "kPa"; |
---|
124 | cond.T = 281.75 * "K"; |
---|
125 | cond.v = 0.0; |
---|
126 | cond.z = [0.6664, 0.3336]; |
---|
127 | |
---|
128 | reb.F = 153 * "kmol/h"; |
---|
129 | reb.P = 185 * "kPa"; |
---|
130 | reb.T = 328.12 * "K"; |
---|
131 | reb.z = [0.001848, 0.9982]; |
---|
132 | reb.v = 1.0; |
---|
133 | |
---|
134 | sec.trays.Emv = 1; |
---|
135 | |
---|
136 | SET |
---|
137 | sec.NTrays = 8; |
---|
138 | #COLUMN |
---|
139 | sec.trays.V = 4 * "ft^3"; |
---|
140 | sec.trays.Ah = 0.394 * "ft^2"; |
---|
141 | sec.trays.lw = 20.94 * "in"; |
---|
142 | sec.trays.hw = 0.125 * "ft"; |
---|
143 | sec.trays.Q = 0 * "kW"; |
---|
144 | sec.trays.beta = 0.6; |
---|
145 | sec.trays.alfa = 4; |
---|
146 | sec.trays.Ap = 3.94 * "ft^2"; |
---|
147 | |
---|
148 | INITIAL |
---|
149 | sec.trays.OutletL.T = 290 *"K"; |
---|
150 | sec.trays.Level = 0.3 * sec.trays.hw; |
---|
151 | sec.trays.OutletL.z(1) = 0.5; |
---|
152 | |
---|
153 | OPTIONS |
---|
154 | relativeAccuracy = 1e-5; |
---|
155 | outputLevel = "medium"; |
---|
156 | time = [0:1:100]; |
---|
157 | end |
---|
158 | |
---|
159 | |
---|
160 | FlowSheet Distillation_kettle_cond_Test |
---|
161 | PARAMETERS |
---|
162 | PP as CalcObject(Brief="Physical Properties",File="vrpp"); |
---|
163 | NComp as Integer; |
---|
164 | |
---|
165 | VARIABLES |
---|
166 | Qc as heat_rate (Brief="Heat rate removed from condenser"); |
---|
167 | Qr as heat_rate (Brief="Heat rate supplied to reboiler"); |
---|
168 | |
---|
169 | SET |
---|
170 | PP.Components = [ "isobutane", "n-pentane", "propylene", |
---|
171 | "benzene", "isobutene" ]; |
---|
172 | PP.LiquidModel = "PR"; |
---|
173 | PP.VapourModel = "PR"; |
---|
174 | PP.Derivatives = 1; |
---|
175 | NComp = PP.NumberOfComponents; |
---|
176 | |
---|
177 | DEVICES |
---|
178 | col as Distillation_kettle_cond; |
---|
179 | feed as streamTP; |
---|
180 | zero as stream; |
---|
181 | |
---|
182 | CONNECTIONS |
---|
183 | feed to col.trays(5).Inlet; |
---|
184 | zero to col.reb.Inlet; |
---|
185 | zero to col.trays([1:4]).Inlet; |
---|
186 | zero to col.trays([6:col.NTrays]).Inlet; |
---|
187 | Qc to col.cond.Q; |
---|
188 | Qr to col.reb.Q; |
---|
189 | |
---|
190 | SPECIFY |
---|
191 | feed.F = 113.4 * "kmol/h"; |
---|
192 | feed.T = 291 * "K"; |
---|
193 | feed.P = 168.3 * "kPa"; |
---|
194 | feed.z = 1/NComp; |
---|
195 | |
---|
196 | zero.F = 0 * "kmol/h"; |
---|
197 | zero.T = 300 * "K"; |
---|
198 | zero.P = 1 * "atm"; |
---|
199 | zero.z = 1/NComp; |
---|
200 | zero.v = 0; |
---|
201 | zero.h = 0 * "J/mol"; |
---|
202 | |
---|
203 | col.sp.Outlet2.F = 85 * "kmol/h"; |
---|
204 | col.reb.OutletL.F = 28.4 * "kmol/h"; |
---|
205 | col.sp.frac = 0.444445; |
---|
206 | col.cond.OutletV.F = 0 * "kmol/h"; |
---|
207 | Qr = 3.7743e6 * "kJ/h"; |
---|
208 | Qc = -3.71e6 * "kJ/h"; |
---|
209 | col.pump1.dP = 16 * "kPa"; |
---|
210 | col.trays.Emv = 1; |
---|
211 | |
---|
212 | SET |
---|
213 | col.NTrays = 8; |
---|
214 | col.cond.V = 2 * "m^3"; |
---|
215 | col.cond.Across = 1 * "m^2"; |
---|
216 | col.trays.V = 4 * "ft^3"; |
---|
217 | col.trays.Ah = 0.394 * "ft^2"; |
---|
218 | col.trays.lw = 20.94 * "in"; |
---|
219 | col.trays.hw = 0.125 * "ft"; |
---|
220 | col.trays.Q = 0 * "kW"; |
---|
221 | col.trays.beta = 0.6; |
---|
222 | col.trays.alfa = 4; |
---|
223 | col.trays.Ap = 3.94 * "ft^2"; |
---|
224 | col.reb.V = 2 * "m^3"; |
---|
225 | col.reb.Across = 1 * "m^2"; |
---|
226 | |
---|
227 | INITIAL |
---|
228 | # condenser |
---|
229 | col.cond.OutletL.T = 260 *"K"; |
---|
230 | col.cond.Level = 1 * "m"; |
---|
231 | col.cond.OutletL.z([1:4]) = [0.65, 0.05, 0.01, 0.01]; |
---|
232 | |
---|
233 | # reboiler |
---|
234 | col.reb.OutletL.T = 330 *"K"; |
---|
235 | col.reb.Level = 1 * "m"; |
---|
236 | col.reb.OutletL.z([1:4]) = [0.1, 0.7, 0.01, 0.01]; |
---|
237 | |
---|
238 | # column trays |
---|
239 | col.trays.OutletL.T = 290 * "K"; |
---|
240 | col.trays.Level = 0.2 * col.trays.hw; |
---|
241 | col.trays.OutletL.z([1:4]) = [0.5, 0.05, 0.01, 0.01]; |
---|
242 | |
---|
243 | OPTIONS |
---|
244 | outputLevel = "high"; |
---|
245 | relativeAccuracy = 1e-5; |
---|
246 | time = [0:0.01:1, 2:50]; |
---|
247 | end |
---|