source: branches/new_gui/sample/stage_separators/Sample_Column_Control_Diagram~.mso @ 891

Last change on this file since 891 was 891, checked in by gerson bicca, 13 years ago

samples for pressure changers

File size: 7.2 KB
Line 
1#*----------------------------------------------
2* FlowSheet generated automaticaly by EMSO-GUI
3*----------------------------------------------*#
4
5using "streams";
6using "stage_separators/column";
7using "controllers/PIDs";
8using "mixers_splitters/splitter";
9using "pressure_changers/valve";
10using "pressure_changers/pump";
11using "controllers/heat_flow";
12using "stage_separators/condenser";
13using "stage_separators/reboiler";
14
15FlowSheet Sample_Column_Control_Diagram
16        PARAMETERS
17        PP as Plugin(Brief="Physical Properties",
18                Type="PP",
19                Components = ["propylene","propane"],
20                LiquidModel = "PR",
21                VapourModel = "PR"
22        );
23        NComp as Integer;
24        SET
25        NComp = PP.NumberOfComponents;
26
27        DEVICES
28        feed as simple_source;
29
30        SET
31        feed.ValidPhases = "Vapour-Liquid";
32
33        SPECIFY
34        feed.MolarComposition(1) = 0.4;
35        feed.MolarComposition(2) = 0.6;
36        feed.F = 612.4 * 'kmol/h';
37        feed.T_Cdeg = 50 * 'K';
38        feed.P = 2068 * 'kPa';
39
40        INITIAL
41
42        GUESS
43
44        DEVICES
45        Column_T1 as Section_Column;
46
47        SET
48        Column_T1.FeedTrayLocation(1) = 11;
49        Column_T1.NumberOfTrays = 14;
50        Column_T1.LiquidSideStreamLocation = 2;
51        Column_T1.VapourSideStreamLocation = 2;
52        Column_T1.WeirLength = 20.94 * 'in';
53        Column_T1.WeirHeight = 0.125 * 'ft';
54        Column_T1.TrayLiquidPasses = 1;
55        Column_T1.HeatSupply = 0 * 'kW';
56        Column_T1.AerationFraction = 0.4;
57        Column_T1.DryPdropCoeff = 6;
58        Column_T1.INITIALIZATION.TopTemperature = 321 * 'K';
59        Column_T1.INITIALIZATION.BottomTemperature = 328 * 'K';
60        Column_T1.INITIALIZATION.LevelFraction = 0.8;
61
62        SPECIFY
63        Column_T1.VapourDrawOffFlow = 0 * 'kmol/h';
64        Column_T1.LiquidDrawOffFlow = 0 * 'kmol/h';
65
66        INITIAL
67
68        GUESS
69
70        DEVICES
71        LiquidOut as simple_sink;
72
73        SET
74
75        SPECIFY
76
77        INITIAL
78
79        GUESS
80
81        DEVICES
82        PIDT_condenser as PID;
83
84        SET
85        PIDT_condenser.PID_Select = "Ideal_AW";
86        PIDT_condenser.Action = "Reverse";
87        PIDT_condenser.Mode = "Automatic";
88        PIDT_condenser.Clip = "Clipped";
89        PIDT_condenser.alpha = 0.2;
90        PIDT_condenser.beta = 1;
91        PIDT_condenser.bias = 0.5;
92        PIDT_condenser.derivTime = 10 * 's';
93        PIDT_condenser.intTime = 100 * 's';
94        PIDT_condenser.gain = 5;
95        PIDT_condenser.gamma = 1;
96        PIDT_condenser.tau = 1 * 's';
97        PIDT_condenser.tauSet = 1 * 's';
98        PIDT_condenser.MinInput = 250;
99        PIDT_condenser.MaxInput = 380;
100        PIDT_condenser.MinOutput = 0;
101        PIDT_condenser.MaxOutput = 1;
102
103        SPECIFY
104        PIDT_condenser.SetPoint = (273+45);
105
106        INITIAL
107
108        GUESS
109
110        DEVICES
111        PIDT_reboiler as PID;
112
113        SET
114        PIDT_reboiler.PID_Select = "Ideal_AW";
115        PIDT_reboiler.Action = "Reverse";
116        PIDT_reboiler.Mode = "Automatic";
117        PIDT_reboiler.Clip = "Clipped";
118        PIDT_reboiler.alpha = 0.2;
119        PIDT_reboiler.beta = 1;
120        PIDT_reboiler.bias = 0.2;
121        PIDT_reboiler.derivTime = 1 * 's';
122        PIDT_reboiler.intTime = 10 * 's';
123        PIDT_reboiler.gain = 3;
124        PIDT_reboiler.gamma = 1;
125        PIDT_reboiler.tau = 1 * 's';
126        PIDT_reboiler.tauSet = 1 * 's';
127        PIDT_reboiler.MinInput = 200;
128        PIDT_reboiler.MaxInput = 400;
129        PIDT_reboiler.MinOutput = 0;
130        PIDT_reboiler.MaxOutput = 1;
131
132        SPECIFY
133        PIDT_reboiler.SetPoint = (58+273);
134
135        INITIAL
136
137        GUESS
138
139        DEVICES
140        PIDL_reboiler as PID;
141
142        SET
143        PIDL_reboiler.PID_Select = "Ideal_AW";
144        PIDL_reboiler.Action = "Direct";
145        PIDL_reboiler.Mode = "Automatic";
146        PIDL_reboiler.Clip = "Clipped";
147        PIDL_reboiler.alpha = 1;
148        PIDL_reboiler.beta = 1;
149        PIDL_reboiler.bias = 0;
150        PIDL_reboiler.derivTime = 0 * 's';
151        PIDL_reboiler.intTime = 20 * 's';
152        PIDL_reboiler.gain = 5;
153        PIDL_reboiler.gamma = 1;
154        PIDL_reboiler.tau = 1 * 's';
155        PIDL_reboiler.tauSet = 1 * 's';
156        PIDL_reboiler.MinInput = 0.1;
157        PIDL_reboiler.MaxInput = 0.8;
158        PIDL_reboiler.MinOutput = 0;
159        PIDL_reboiler.MaxOutput = 1;
160
161        SPECIFY
162        PIDL_reboiler.SetPoint = 0.5;
163
164        INITIAL
165
166        GUESS
167
168        DEVICES
169        splitter_S1 as splitter_column;
170
171        SET
172
173        SPECIFY
174        splitter_S1.RefluxRatio = 20;
175
176        INITIAL
177
178        GUESS
179
180        DEVICES
181        Valve_Distillate as valve_flow;
182
183        SET
184        Valve_Distillate.MinFlow = 0 * 'kmol/h';
185        Valve_Distillate.MaxFlow = 400 * 'kmol/h';
186
187        SPECIFY
188
189        INITIAL
190
191        GUESS
192
193        DEVICES
194        distillate_stream as sink;
195
196        SET
197
198        SPECIFY
199
200        INITIAL
201
202        GUESS
203
204        DEVICES
205        pump_P1 as pump2;
206
207        SET
208
209        SPECIFY
210        pump_P1.Pincrease = 14 * 'kPa';
211
212        INITIAL
213
214        GUESS
215
216        DEVICES
217        Valve_Bottom as valve_flow;
218
219        SET
220        Valve_Bottom.MinFlow = 0 * 'kmol/h';
221        Valve_Bottom.MaxFlow = 600 * 'kmol/h';
222
223        SPECIFY
224
225        INITIAL
226
227        GUESS
228
229        DEVICES
230        PIDL_condenser as PID;
231
232        SET
233        PIDL_condenser.PID_Select = "Ideal_AW";
234        PIDL_condenser.Action = "Direct";
235        PIDL_condenser.Mode = "Automatic";
236        PIDL_condenser.Clip = "Clipped";
237        PIDL_condenser.alpha = 1;
238        PIDL_condenser.beta = 1;
239        PIDL_condenser.bias = 0;
240        PIDL_condenser.derivTime = 0 * 's';
241        PIDL_condenser.intTime = 20 * 's';
242        PIDL_condenser.gain = 2;
243        PIDL_condenser.gamma = 1;
244        PIDL_condenser.tau = 1 * 's';
245        PIDL_condenser.tauSet = 1 * 's';
246        PIDL_condenser.MinInput = 0.1;
247        PIDL_condenser.MaxInput = 0.8;
248        PIDL_condenser.MinOutput = 0;
249        PIDL_condenser.MaxOutput = 1;
250
251        SPECIFY
252        PIDL_condenser.SetPoint = 0.5;
253
254        INITIAL
255
256        GUESS
257
258        DEVICES
259        heat_condenser as heat_flow;
260
261        SET
262        heat_condenser.MinHeatFlow = -300 * 'kW';
263        heat_condenser.MaxHeatFlow = 0 * 'kW';
264
265        SPECIFY
266
267        INITIAL
268
269        GUESS
270
271        DEVICES
272        heat_reboiler as heat_flow;
273
274        SET
275        heat_reboiler.MinHeatFlow = 0 * 'kW';
276        heat_reboiler.MaxHeatFlow = 450 * 'kW';
277
278        SPECIFY
279
280        INITIAL
281
282        GUESS
283
284        DEVICES
285        vapour_s1 as simple_sink2;
286
287        SET
288
289        SPECIFY
290
291        INITIAL
292
293        GUESS
294
295        DEVICES
296        condenser_C1 as condenser;
297
298        SET
299        condenser_C1.Orientation = "horizontal";
300        condenser_C1.Heads = "elliptical";
301        condenser_C1.Diameter = 2 * 'm';
302        condenser_C1.Lenght = 4 * 'm';
303        condenser_C1.Initial_Temperature = 320 * 'K';
304        condenser_C1.Initial_Composition(1) = 0.7;
305        condenser_C1.Initial_Composition(2) = 0.3;
306
307        SPECIFY
308        condenser_C1.OutletVapour.F = 0 * 'kmol/h';
309
310        INITIAL
311
312        GUESS
313
314        DEVICES
315        reboiler_R1 as reboiler;
316
317        SET
318        reboiler_R1.Orientation = "vertical";
319        reboiler_R1.Heads = "elliptical";
320        reboiler_R1.Diameter = 2 * 'm';
321        reboiler_R1.Lenght = 6 * 'm';
322        reboiler_R1.Initial_Temperature = 335 * 'K';
323        reboiler_R1.Initial_Composition(1) = 0.01;
324        reboiler_R1.Initial_Composition(2) = 0.99;
325
326        SPECIFY
327
328        INITIAL
329
330        GUESS
331
332        CONNECTIONS
333        splitter_S1.Distillate to Valve_Distillate.Inlet;
334        Valve_Distillate.Outlet to distillate_stream.Inlet;
335        splitter_S1.Reflux to pump_P1.Inlet;
336        Valve_Bottom.Outlet to LiquidOut.Inlet;
337        PIDL_reboiler.Output to Valve_Bottom.FlowFraction;
338        PIDL_condenser.Output to Valve_Distillate.FlowFraction;
339        PIDT_condenser.Output to heat_condenser.HeatFlowFraction;
340        PIDT_reboiler.Output to heat_reboiler.HeatFlowFraction;
341        pump_P1.Outlet to Column_T1.LiquidInlet;
342        feed.Outlet to Column_T1.FeedTray;
343        Column_T1.VapourOutlet to condenser_C1.InletVapour;
344        condenser_C1.OutletLiquid to splitter_S1.Inlet;
345        heat_condenser.HeatFlow to condenser_C1.InletQ;
346        condenser_C1.TI to PIDT_condenser.Input;
347        condenser_C1.LI to PIDL_condenser.Input;
348        condenser_C1.OutletVapour to vapour_s1.Inlet;
349        Column_T1.LiquidOutlet to reboiler_R1.InletLiquid;
350        reboiler_R1.OutletVapour to Column_T1.VapourInlet;
351        heat_reboiler.HeatFlow to reboiler_R1.InletQ;
352        reboiler_R1.OutletLiquid to Valve_Bottom.Inlet;
353        reboiler_R1.LI to PIDL_reboiler.Input;
354        reboiler_R1.TI to PIDT_reboiler.Input;
355
356        OPTIONS
357        Dynamic = true;
358        TimeStep = 0.1;
359        TimeEnd = 12;
360        TimeUnit = 'h';
361        Integration = "original";
362        NLASolver(
363                File = "sundials",
364                RelativeAccuracy = 1e-2,
365                AbsoluteAccuracy = 1e-6,
366                MaxIterations = 100
367        );
368        DAESolver(
369                File = "sundials",
370                RelativeAccuracy = 1e-2,
371                AbsoluteAccuracy = 1e-6,
372                EventAccuracy = 1e-2
373        );
374end
Note: See TracBrowser for help on using the repository browser.