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