1 | #*---------------------------------------------- |
---|
2 | * FlowSheet generated automaticaly by EMSO-GUI |
---|
3 | *----------------------------------------------*# |
---|
4 | |
---|
5 | using "streams"; |
---|
6 | using "stage_separators/column"; |
---|
7 | using "pressure_changers/valve"; |
---|
8 | using "controllers/heat_flow"; |
---|
9 | using "controllers/PIDs"; |
---|
10 | |
---|
11 | FlowSheet Column_Distillation_Kettle_Diagram |
---|
12 | PARAMETERS |
---|
13 | PP as Plugin(Brief="Physical Properties", |
---|
14 | Type="PP", |
---|
15 | Components = ["isobutane","n-pentane","propylene","benzene","isobutene"], |
---|
16 | LiquidModel = "PR", |
---|
17 | VapourModel = "PR" |
---|
18 | ); |
---|
19 | NComp as Integer; |
---|
20 | SET |
---|
21 | NComp = PP.NumberOfComponents; |
---|
22 | |
---|
23 | DEVICES |
---|
24 | feed as simple_source; |
---|
25 | |
---|
26 | SET |
---|
27 | |
---|
28 | SPECIFY |
---|
29 | feed.MolarComposition(1) = 0.20; |
---|
30 | feed.MolarComposition(2) = 0.20; |
---|
31 | feed.MolarComposition(3) = 0.20; |
---|
32 | feed.MolarComposition(4) = 0.20; |
---|
33 | feed.MolarComposition(5) = 0.20; |
---|
34 | feed.F = 113.4 * 'kmol/h'; |
---|
35 | feed.T = 291 * 'K'; |
---|
36 | feed.P = 168.30 * 'kPa'; |
---|
37 | |
---|
38 | INITIAL |
---|
39 | |
---|
40 | GUESS |
---|
41 | |
---|
42 | DEVICES |
---|
43 | Column_KC as Distillation_kettle_cond; |
---|
44 | |
---|
45 | SET |
---|
46 | Column_KC.FeedTrayLocation(1) = 9; |
---|
47 | Column_KC.NumberOfTrays = 16; |
---|
48 | Column_KC.VolumeOfTray = 0.12 * 'm^3'; |
---|
49 | Column_KC.HeatSupply = 0 * 'kW'; |
---|
50 | Column_KC.PlateArea = 0.37 * 'm^2'; |
---|
51 | Column_KC.HolesArea = 0.037 * 'm^2'; |
---|
52 | Column_KC.WeirLength = 0.53 * 'm'; |
---|
53 | Column_KC.WeirHeight = 0.038 * 'm'; |
---|
54 | Column_KC.beta = 0.6; |
---|
55 | Column_KC.alfa = 4; |
---|
56 | Column_KC.INITIALIZATION.TopTemperature = 328 * 'K'; |
---|
57 | Column_KC.INITIALIZATION.BottomTemperature = 330 * 'K'; |
---|
58 | Column_KC.INITIALIZATION.LevelFraction = 1; |
---|
59 | Column_KC.CONDENSER.V = 2 * 'm^3'; |
---|
60 | Column_KC.CONDENSER.Across = 1 * 'm^2'; |
---|
61 | Column_KC.CONDENSER.Initial_Level = 0.50 * 'm'; |
---|
62 | Column_KC.CONDENSER.Initial_Temperature = 300 * 'K'; |
---|
63 | Column_KC.REBOILER.Across = 2 * 'm^2'; |
---|
64 | Column_KC.REBOILER.V = 3 * 'm^3'; |
---|
65 | Column_KC.REBOILER.Initial_Level = 0.50 * 'm'; |
---|
66 | Column_KC.REBOILER.Initial_Temperature = 328 * 'K'; |
---|
67 | |
---|
68 | SPECIFY |
---|
69 | Column_KC.VapourDrawOffFlow = 0 * 'kmol/h'; |
---|
70 | Column_KC.LiquidDrawOffFlow = 0 * 'kmol/h'; |
---|
71 | Column_KC.MurphreeEff = 1; |
---|
72 | Column_KC.CONDENSER.OutletVapour.F = 0 * 'kmol/h'; |
---|
73 | Column_KC.SPLITTER.FlowRatios(1) = 0.6; |
---|
74 | Column_KC.PUMP.dP = 16 * 'kPa'; |
---|
75 | |
---|
76 | INITIAL |
---|
77 | |
---|
78 | GUESS |
---|
79 | |
---|
80 | DEVICES |
---|
81 | STR1 as simple_sink2; |
---|
82 | |
---|
83 | SET |
---|
84 | |
---|
85 | SPECIFY |
---|
86 | |
---|
87 | INITIAL |
---|
88 | |
---|
89 | GUESS |
---|
90 | |
---|
91 | DEVICES |
---|
92 | V1 as valve_flow; |
---|
93 | |
---|
94 | SET |
---|
95 | V1.MinFlow = 0 * 'kmol/h'; |
---|
96 | V1.MaxFlow = 600 * 'kmol/h'; |
---|
97 | |
---|
98 | SPECIFY |
---|
99 | |
---|
100 | INITIAL |
---|
101 | |
---|
102 | GUESS |
---|
103 | |
---|
104 | DEVICES |
---|
105 | STR2 as simple_sink; |
---|
106 | |
---|
107 | SET |
---|
108 | |
---|
109 | SPECIFY |
---|
110 | |
---|
111 | INITIAL |
---|
112 | |
---|
113 | GUESS |
---|
114 | |
---|
115 | DEVICES |
---|
116 | V2 as valve_flow; |
---|
117 | |
---|
118 | SET |
---|
119 | V2.MinFlow = 0 * 'kmol/h'; |
---|
120 | V2.MaxFlow = 100 * 'kmol/h'; |
---|
121 | |
---|
122 | SPECIFY |
---|
123 | |
---|
124 | INITIAL |
---|
125 | |
---|
126 | GUESS |
---|
127 | |
---|
128 | DEVICES |
---|
129 | STR3 as simple_sink; |
---|
130 | |
---|
131 | SET |
---|
132 | |
---|
133 | SPECIFY |
---|
134 | |
---|
135 | INITIAL |
---|
136 | |
---|
137 | GUESS |
---|
138 | |
---|
139 | DEVICES |
---|
140 | V3 as heat_flow; |
---|
141 | |
---|
142 | SET |
---|
143 | V3.MinHeatFlow = 0 * 'kW'; |
---|
144 | V3.MaxHeatFlow = 1000 * 'kW'; |
---|
145 | |
---|
146 | SPECIFY |
---|
147 | |
---|
148 | INITIAL |
---|
149 | |
---|
150 | GUESS |
---|
151 | |
---|
152 | DEVICES |
---|
153 | PIDT_reb as PID; |
---|
154 | |
---|
155 | SET |
---|
156 | PIDT_reb.PID_Select = "Ideal_AW"; |
---|
157 | PIDT_reb.Action = "Reverse"; |
---|
158 | PIDT_reb.Mode = "Automatic"; |
---|
159 | PIDT_reb.Clip = "Clipped"; |
---|
160 | PIDT_reb.alpha = 0.2; |
---|
161 | PIDT_reb.beta = 1; |
---|
162 | PIDT_reb.bias = 0.2; |
---|
163 | PIDT_reb.derivTime = 1 * 's'; |
---|
164 | PIDT_reb.intTime = 10 * 's'; |
---|
165 | PIDT_reb.gain = 3; |
---|
166 | PIDT_reb.gamma = 1; |
---|
167 | PIDT_reb.tau = 1 * 's'; |
---|
168 | PIDT_reb.tauSet = 1 * 's'; |
---|
169 | PIDT_reb.MinInput = 200; |
---|
170 | PIDT_reb.MaxInput = 400; |
---|
171 | PIDT_reb.MinOutput = 0; |
---|
172 | PIDT_reb.MaxOutput = 1; |
---|
173 | |
---|
174 | SPECIFY |
---|
175 | PIDT_reb.SetPoint = (58+273); |
---|
176 | |
---|
177 | INITIAL |
---|
178 | |
---|
179 | GUESS |
---|
180 | |
---|
181 | DEVICES |
---|
182 | PIDL_reb as PID; |
---|
183 | |
---|
184 | SET |
---|
185 | PIDL_reb.PID_Select = "Ideal_AW"; |
---|
186 | PIDL_reb.Action = "Direct"; |
---|
187 | PIDL_reb.Mode = "Automatic"; |
---|
188 | PIDL_reb.Clip = "Clipped"; |
---|
189 | PIDL_reb.alpha = 1; |
---|
190 | PIDL_reb.beta = 1; |
---|
191 | PIDL_reb.bias = 0; |
---|
192 | PIDL_reb.derivTime = 0 * 's'; |
---|
193 | PIDL_reb.intTime = 20 * 's'; |
---|
194 | PIDL_reb.gain = 5; |
---|
195 | PIDL_reb.gamma = 1; |
---|
196 | PIDL_reb.tau = 1 * 's'; |
---|
197 | PIDL_reb.tauSet = 1 * 's'; |
---|
198 | PIDL_reb.MinInput = 0.1; |
---|
199 | PIDL_reb.MaxInput = 0.8; |
---|
200 | PIDL_reb.MinOutput = 0; |
---|
201 | PIDL_reb.MaxOutput = 1; |
---|
202 | |
---|
203 | SPECIFY |
---|
204 | PIDL_reb.SetPoint = 0.5; |
---|
205 | |
---|
206 | INITIAL |
---|
207 | |
---|
208 | GUESS |
---|
209 | |
---|
210 | DEVICES |
---|
211 | PIDT_cond as PID; |
---|
212 | |
---|
213 | SET |
---|
214 | PIDT_cond.PID_Select = "Ideal_AW"; |
---|
215 | PIDT_cond.Action = "Reverse"; |
---|
216 | PIDT_cond.Mode = "Automatic"; |
---|
217 | PIDT_cond.Clip = "Clipped"; |
---|
218 | PIDT_cond.alpha = 0.2; |
---|
219 | PIDT_cond.beta = 1; |
---|
220 | PIDT_cond.bias = 0.5; |
---|
221 | PIDT_cond.derivTime = 10 * 's'; |
---|
222 | PIDT_cond.intTime = 100 * 's'; |
---|
223 | PIDT_cond.gain = 5; |
---|
224 | PIDT_cond.gamma = 1; |
---|
225 | PIDT_cond.tau = 1 * 's'; |
---|
226 | PIDT_cond.tauSet = 1 * 's'; |
---|
227 | PIDT_cond.MinInput = 250; |
---|
228 | PIDT_cond.MaxInput = 380; |
---|
229 | PIDT_cond.MinOutput = 0; |
---|
230 | PIDT_cond.MaxOutput = 1; |
---|
231 | |
---|
232 | SPECIFY |
---|
233 | PIDT_cond.SetPoint = (273+45); |
---|
234 | |
---|
235 | INITIAL |
---|
236 | |
---|
237 | GUESS |
---|
238 | |
---|
239 | DEVICES |
---|
240 | V4 as heat_flow; |
---|
241 | |
---|
242 | SET |
---|
243 | V4.MinHeatFlow = -3000 * 'kW'; |
---|
244 | V4.MaxHeatFlow = 0 * 'kW'; |
---|
245 | |
---|
246 | SPECIFY |
---|
247 | |
---|
248 | INITIAL |
---|
249 | |
---|
250 | GUESS |
---|
251 | |
---|
252 | DEVICES |
---|
253 | PIDL_cond as PID; |
---|
254 | |
---|
255 | SET |
---|
256 | PIDL_cond.PID_Select = "Ideal_AW"; |
---|
257 | PIDL_cond.Action = "Direct"; |
---|
258 | PIDL_cond.Mode = "Automatic"; |
---|
259 | PIDL_cond.Clip = "Clipped"; |
---|
260 | PIDL_cond.alpha = 1; |
---|
261 | PIDL_cond.beta = 1; |
---|
262 | PIDL_cond.bias = 0; |
---|
263 | PIDL_cond.derivTime = 0 * 's'; |
---|
264 | PIDL_cond.intTime = 20 * 's'; |
---|
265 | PIDL_cond.gain = 2; |
---|
266 | PIDL_cond.gamma = 1; |
---|
267 | PIDL_cond.tau = 1 * 's'; |
---|
268 | PIDL_cond.tauSet = 1 * 's'; |
---|
269 | PIDL_cond.MinInput = 0; |
---|
270 | PIDL_cond.MaxInput = 1; |
---|
271 | PIDL_cond.MinOutput = 0; |
---|
272 | PIDL_cond.MaxOutput = 1; |
---|
273 | |
---|
274 | SPECIFY |
---|
275 | PIDL_cond.SetPoint = 0.5; |
---|
276 | |
---|
277 | INITIAL |
---|
278 | |
---|
279 | GUESS |
---|
280 | |
---|
281 | CONNECTIONS |
---|
282 | feed.Outlet to Column_KC.FeedTray; |
---|
283 | Column_KC.VapourDistillate to STR1.Inlet; |
---|
284 | Column_KC.LiquidDistillate to V1.Inlet; |
---|
285 | V1.Outlet to STR2.Inlet; |
---|
286 | Column_KC.BottomProduct to V2.Inlet; |
---|
287 | V2.Outlet to STR3.Inlet; |
---|
288 | V3.HeatFlow to Column_KC.HeatToReboiler; |
---|
289 | PIDL_reb.Output to V2.FlowFraction; |
---|
290 | Column_KC.LI_reb to PIDL_reb.Input; |
---|
291 | PIDT_reb.Output to V3.HeatFlowFraction; |
---|
292 | Column_KC.TI_reb to PIDT_reb.Input; |
---|
293 | V4.HeatFlow to Column_KC.HeatToCondenser; |
---|
294 | PIDT_cond.Output to V4.HeatFlowFraction; |
---|
295 | Column_KC.TI_cond to PIDT_cond.Input; |
---|
296 | Column_KC.LI_cond to PIDL_cond.Input; |
---|
297 | PIDL_cond.Output to V1.FlowFraction; |
---|
298 | |
---|
299 | OPTIONS |
---|
300 | Dynamic = true; |
---|
301 | TimeStep = 0.01; |
---|
302 | TimeEnd = 100; |
---|
303 | TimeUnit = 's'; |
---|
304 | Integration = "original"; |
---|
305 | NLASolver( |
---|
306 | File = "sundials", |
---|
307 | RelativeAccuracy = 1e-2, |
---|
308 | AbsoluteAccuracy = 1e-6, |
---|
309 | MaxIterations = 100 |
---|
310 | ); |
---|
311 | DAESolver( |
---|
312 | File = "sundials", |
---|
313 | RelativeAccuracy = 1e-2, |
---|
314 | AbsoluteAccuracy = 1e-6, |
---|
315 | EventAccuracy = 1e-2 |
---|
316 | ); |
---|
317 | end |
---|