/[ascend]/trunk/models/reactor.a4l
ViewVC logotype

Contents of /trunk/models/reactor.a4l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2729 - (show annotations) (download) (as text)
Sat Dec 7 07:34:28 2013 UTC (10 years, 6 months ago) by jpye
File MIME type: text/x-ascend
File size: 19354 byte(s)
add 'on_load' method (still need to look at dynamic solution in .a4s file)
fix whitespace for tw=4.
1 REQUIRE "ivpsystem.a4l";
2 (* => modified version of system.a4l, basemodel.a4l *)
3 REQUIRE "stream_holdup.a4l";
4 (* => stream_holdup.a4l, thermodynamics.a4l, components.a4l, phases.a4l,
5 * atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
6 REQUIRE "kinetics.a4l";
7 (* => kinetics,a4l, atoms.a4l, measures.a4l, system.a4l, basemodel.a4l *)
8 PROVIDE "reactor.a4l";
9
10 (*
11 * reactor.a4l
12 * by Duncan Coffey
13 * May 1998
14 * Part of the ASCEND Library
15 * $Date: 1998/06/20 15:12:06 $
16 * $Revision: 1.3 $
17 * $Author: ballan $
18 * $Source: /afs/cs.cmu.edu/project/ascend/Repository/models/reactor.a4l,v $
19 *
20 * This file is part of the ASCEND Modeling Library.
21 *
22 * Copyright (C) 1998 Duncan Coffey
23 *
24 * The ASCEND Modeling Library is free software; you can redistribute
25 * it and/or modify it under the terms of the GNU General Public
26 * License as published by the Free Software Foundation; either
27 * version 2 of the License, or (at your option) any later version.
28 *
29 * The ASCEND Modeling Library is distributed in hope that it
30 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
31 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32 * See the GNU General Public License for more details.
33 *
34 * You should have received a copy of the GNU General Public License
35 * along with this program. If not, see <http://www.gnu.org/licenses/>.
36 *)
37
38 (*
39 * Requires an empty ascend system.
40 *)
41
42
43 (* ***********************************+************************************ *)
44 (* ******************** Reactor ********************* *)
45 (* ***********************************+************************************ *)
46
47 MODEL single_phase_cstr(
48 input WILL_BE stream;
49 output WILL_BE stream;
50 kinetics WILL_BE base_kinetics;
51 t WILL_BE solver_var;
52 dynamic WILL_BE boolean;
53 ode_offset WILL_BE ode_counter;
54 obs_offset WILL_BE obs_counter;
55 )WHERE(
56 input.cd, output.cd WILL_BE_THE_SAME;
57 kinetics.reac_T, output.T WILL_BE_THE_SAME;
58 (input.pd.phase_indicator IN ['V','L','VL','VLL']) == TRUE;
59 (output.pd.phase_indicator IN ['V','L']) == TRUE;
60 )REFINES cmumodel;
61
62 cd ALIASES input.cd;
63 equilibrated ALIASES output.equilibrated;
64 FOR i IN kinetics.nr CREATE
65 rate[i] ALIASES kinetics.rate[i];
66 END FOR;
67 state ALIASES output.Details.state;
68
69 dM_dt,dMi_dt[cd.other_components] IS_A molar_rate;
70 M,Mi[cd.components] IS_A mole;
71 dU_dt IS_A energy_rate;
72 U IS_A energy;
73 Qin IS_A energy_rate;
74 FOR i IN cd.components CREATE
75 x[i] ALIASES state.y[i];
76 conc[i] ALIASES kinetics.conc[i];
77 END FOR;
78 Volume IS_A volume;
79 vol_rate IS_A volume_rate;
80 res_time IS_A time;
81 flowscale IS_A molar_rate_scale;
82 H_flowscale IS_A energy_rate_scale;
83
84 (* Define what the differential equations are for the system. *)
85 FOR i IN cd.other_components CREATE
86 dMi_dt[i]/flowscale = (input.f[i]+Volume*kinetics.production[i]-output.f[i])
87 / flowscale;
88 END FOR;
89
90 dM_dt/flowscale = (input.flow-output.flow
91 + SUM[Volume*kinetics.production[i] | i IN cd.components])/flowscale;
92
93 dU_dt/H_flowscale = (input.H_flow + Qin - output.H_flow)/H_flowscale;
94
95 U/H_flowscale = (state.H-state.P*state.V)*M/H_flowscale;
96
97 Volume = M*state.V;
98
99 vol_rate = input.flow*input.state.V;
100
101 res_time = Volume/vol_rate;
102
103 FOR i IN cd.components CREATE
104 x[i]=Mi[i]/M;
105 conc[i] = Mi[i]/Volume;
106 END FOR;
107
108 boundwidth IS_A bound_width;
109
110 METHODS
111 METHOD check_self;
112 IF (output.flow < 1e-4 {mole/s}) THEN
113 STOP {output flow dried up in reactor};
114 END IF;
115 IF (input.flow < 1e-4 {mole/s}) THEN
116 STOP {input flow fries up in reactor};
117 END IF;
118 IF (abs(input.flow+SUM[Volume*kinetics.production[i] | i
119 IN cd.components]-output.flow)/flowscale > 1.0e-4) THEN
120 STOP {reactor violates overall mass-balance};
121 END IF;
122 RUN state.check_self;
123 END check_self;
124
125 METHOD check_all;
126 RUN input.check_self;
127 RUN output.check_self;
128 RUN check_self;
129 END check_all;
130
131 METHOD default_self;
132 boundwidth :=10;
133 flowscale := input.Details.flowscale;
134 H_flowscale := input.Details.H_flowscale;
135 dMi_dt[cd.other_components] :=0 {mole/sec};
136 dMi_dt[cd.other_components].lower_bound :=-1e100 {mole/sec};
137 dM_dt :=0 {mole/sec};
138 dM_dt.lower_bound :=-1e100 {mole/sec};
139 dU_dt :=0 {J/sec};
140 equilibrated :=FALSE;
141 dynamic :=FALSE;
142 t :=0 {s};
143 ode_offset :=1;
144 obs_offset :=1;
145 RUN state.default_self;
146 END default_self;
147
148 METHOD default_all;
149 Qin := 0 {watt};
150 RUN input.default_self;
151 RUN output.default_self;
152 RUN kinetics.default_self;
153 RUN default_self;
154 END default_all;
155
156 METHOD bound_self;
157 state.boundwidth := boundwidth;
158 RUN state.bound_self;
159 END bound_self;
160
161 METHOD bound_all;
162 input.boundwidth := boundwidth;
163 output.boundwidth := boundwidth;
164 RUN input.bound_self;
165 RUN output.bound_self;
166 RUN bound_self;
167 END bound_all;
168
169 METHOD scale_self;
170 flowscale := input.flow;
171 H_flowscale := input.H_flow;
172 RUN state.scale_self;
173 END scale_self;
174
175 METHOD scale_all;
176 RUN input.scale_self;
177 RUN output.scale_self;
178 RUN scale_self;
179 END scale_all;
180
181 METHOD seqmod;
182 RUN state.specify;
183 FREE state.y[cd.components];
184 FIX dMi_dt[cd.other_components];
185 FREE Mi[cd.other_components];
186 FIX dM_dt;
187 FREE M;
188 FIX dU_dt;
189 FREE U;
190 FIX Volume;
191 IF(dynamic = TRUE) THEN
192 FIX Mi[cd.other_components];
193 FREE dMi_dt[cd.other_components];
194 FIX M;
195 FREE dM_dt;
196 FIX U;
197 FREE dU_dt;
198 FIX output.flow;
199 FREE Volume;
200 FIX Qin;
201 FREE state.T;
202 ELSE
203 dMi_dt[cd.other_components] :=0 {mole/sec};
204 dM_dt :=0 {mole/sec};
205 dU_dt :=0 {J/sec};
206 END IF;
207 END seqmod;
208
209 METHOD specify;
210 RUN input.specify;
211 RUN seqmod;
212 END specify;
213
214 METHOD set_ode;
215 t.ode_type :=-1;
216 FOR i IN cd.other_components DO
217 dMi_dt[i].ode_type :=2;
218 Mi[i].ode_type :=1;
219 dMi_dt[i].ode_id :=ode_offset;
220 Mi[i].ode_id :=ode_offset;
221 ode_offset :=ode_offset+1;
222 END FOR;
223 dM_dt.ode_type:=2;
224 M.ode_type :=1;
225 dM_dt.ode_id :=ode_offset;
226 M.ode_id :=ode_offset;
227 ode_offset :=ode_offset+1;
228 dU_dt.ode_type:=2;
229 U.ode_type :=1;
230 dU_dt.ode_id :=ode_offset;
231 U.ode_id :=ode_offset;
232 ode_offset :=ode_offset+1;
233 END set_ode;
234
235 METHOD set_obs;
236 Volume.obs_id :=obs_offset+1;
237 state.T.obs_id :=obs_offset+2;
238 state.P.obs_id :=obs_offset+3;
239 input.flow.obs_id :=obs_offset+4;
240 output.flow.obs_id:=obs_offset+5;
241 obs_offset :=obs_offset+6;
242 END set_obs;
243 END single_phase_cstr;
244
245 MODEL multiple_phase_cstr(
246 vapin WILL_BE stream;
247 liqin WILL_BE stream;
248 vapout WILL_BE stream;
249 liqout WILL_BE stream;
250 kinetics WILL_BE base_kinetics;
251 t WILL_BE solver_var;
252 dynamic WILL_BE boolean;
253 ode_offset WILL_BE ode_counter;
254 obs_offset WILL_BE obs_counter;
255 )WHERE(
256 vapin.cd, vapout.cd, liqin.cd, liqout.cd WILL_BE_THE_SAME;
257 vapin, liqin WILL_NOT_BE_THE_SAME;
258 kinetics.reac_T, liqout.T WILL_BE_THE_SAME;
259 vapin.pd.phase_indicator == 'V';
260 liqin.pd.phase_indicator == 'L';
261 vapout.pd.phase_indicator == 'V';
262 liqout.pd.phase_indicator == 'L';
263 )REFINES cmumodel;
264
265 cd ALIASES vapout.cd;
266 P ALIASES liqout.P;
267 T ALIASES liqout.T;
268 equilibrated ALIASES vapout.equilibrated;
269 (* reactor thermo options are derived from product streams *)
270 pdVL IS_A phases_data('VL', vapout.pd.vapor_option,
271 liqout.pd.liquid1_option, 'none');
272
273 (* reactor Vapor-Liquid state comes from thermo of product streams. *)
274 phaseVL[VLphases] ALIASES
275 (vapout.phase['vapor'], liqout.phase['liquid1'])
276 WHERE VLphases IS_A set OF symbol_constant
277 WITH_VALUE ('vapor','liquid1');
278 state IS_A thermodynamics(cd, pdVL, phaseVL, equilibrated);
279
280 x "liquid product composition" ALIASES liqout.state.y;
281 y "vapor product composition" ALIASES vapout.state.y;
282
283 dMi_dt[cd.other_components] IS_A molar_rate;
284 M,Mi[cd.components],Ml,Mv IS_A mole;
285 dM_dt IS_A molar_rate;
286 dU_dt IS_A energy_rate;
287 U IS_A energy;
288 Vol,vol_liq,vol_vap IS_A volume;
289 Qin IS_A energy_rate;
290 flowscale IS_A molar_rate_scale;
291 split_fraction[VLphases] IS_A fraction;
292
293 Liquid_split: (split_fraction['liquid1']*(liqin.flow+vapin.flow
294 + Vol*SUM[kinetics.production[i] | i IN cd.components])-liqout.flow)/flowscale = 0;
295 Vapor_split: (split_fraction['vapor']*(liqin.flow+vapin.flow
296 + Vol*SUM[kinetics.production[i] | i IN cd.components])-vapout.flow)/flowscale = 0;
297
298 (* component material balances *)
299 FOR i IN cd.other_components CREATE
300 dMi_dt[i]/flowscale=(liqin.f[i]+vapin.f[i]+Vol*kinetics.production[i]-vapout.f[i]-liqout.f[i])/flowscale;
301 END FOR;
302 (* overall material balance *)
303 dM_dt/flowscale=(liqin.flow+vapin.flow-vapout.flow-liqout.flow
304 +Vol*SUM[kinetics.production[i] | i IN cd.components])/flowscale;
305
306 FOR i IN cd.components CREATE
307 Mi[i]=Ml*x[i]+Mv*y[i];
308 conc[i] ALIASES kinetics.conc[i];
309 conc[i]=Mi[i]/Vol;
310 END FOR;
311 M=Ml+Mv;
312 Vol=vol_liq+vol_vap;
313 vol_liq=Ml*state.phase['liquid1'].v_y;
314 vol_vap=Mv*state.phase['vapor'].v_y;
315
316 state.phase_fraction['vapor']=Mv/M;
317
318 (* overall energy balance *)
319 H_flowscale IS_A energy_rate_scale;
320
321 dU_dt/H_flowscale=(liqin.H_flow+vapin.H_flow+Qin-vapout.H_flow
322 -liqout.H_flow)/H_flowscale;
323
324 U/H_flowscale = (state.phase['vapor'].h_y*Mv+state.phase['liquid1'].h_y*Ml)
325 /H_flowscale;
326 boundwidth IS_A bound_width;
327
328 METHODS
329 METHOD check_self;
330 IF (vapout.flow < 1e-4 {mole/s}) THEN
331 STOP {vapor output flow dried up in reactor};
332 END IF;
333 IF (vapin.flow < 1e-4 {mole/s}) THEN
334 STOP {vapor input flow fries up in reactor};
335 END IF;
336 IF (liqout.flow < 1e-4 {mole/s}) THEN
337 STOP {liquid output flow dried up in reactor};
338 END IF;
339 IF (liqin.flow < 1e-4 {mole/s}) THEN
340 STOP {liquid input flow fries up in reactor};
341 END IF;
342 IF (abs(vapin.flow+liqin.flow+SUM[Vol*kinetics.production[i] | i
343 IN cd.components]-vapout.flow-liqout.flow)/flowscale > 1.0e-4) THEN
344 STOP {reactor violates overall mass-balance};
345 END IF;
346 RUN state.check_self;
347 END check_self;
348
349 METHOD check_all;
350 RUN vapin.check_self;
351 RUN liqin.check_self;
352 RUN vapout.check_self;
353 RUN liqout.check_self;
354 RUN check_self;
355 END check_all;
356
357 METHOD default_self;
358 boundwidth :=10;
359 flowscale := vapin.Details.flowscale;
360 H_flowscale := vapin.Details.H_flowscale;
361 dMi_dt[cd.other_components] :=0 {mole/sec};
362 dMi_dt[cd.other_components].lower_bound :=-1e100 {mole/sec};
363 dM_dt :=0 {mole/sec};
364 dM_dt.lower_bound :=-1e100 {mole/sec};
365 dU_dt :=0 {J/sec};
366 (* Upper bound of split fraction must be changed to
367 greater than 1 for dynamic simulation *)
368 split_fraction[VLphases].upper_bound :=2;
369 equilibrated :=FALSE;
370 dynamic :=FALSE;
371 t :=0 {s};
372 RUN state.default_self;
373 END default_self;
374
375 METHOD default_all;
376 Qin := 0 {watt};
377 RUN vapin.default_self;
378 RUN liqin.default_self;
379 RUN vapout.default_self;
380 RUN liqout.default_self;
381 RUN kinetics.default_self;
382 RUN default_self;
383 END default_all;
384
385 METHOD bound_self;
386 state.boundwidth := boundwidth;
387 RUN state.bound_self;
388 END bound_self;
389
390 METHOD bound_all;
391 vapin.boundwidth := boundwidth;
392 liqin.boundwidth := boundwidth;
393 vapout.boundwidth := boundwidth;
394 liqout.boundwidth := boundwidth;
395 RUN vapin.bound_self;
396 RUN liqin.bound_self;
397 RUN vapout.bound_self;
398 RUN liqout.bound_self;
399 RUN bound_self;
400 END bound_all;
401
402 METHOD scale_self;
403 flowscale := vapin.flow;
404 H_flowscale := vapin.H_flow;
405 RUN state.scale_self;
406 END scale_self;
407
408 METHOD scale_all;
409 RUN vapin.scale_self;
410 RUN liqin.scale_self;
411 RUN vapout.scale_self;
412 RUN liqout.scale_self;
413 RUN scale_self;
414 END scale_all;
415
416 METHOD seqmod;
417 RUN state.specify;
418 FREE state.y[cd.components];
419 IF equilibrated THEN
420 FREE state.T;
421 ELSE
422 FIX state.T;
423 END IF;
424 FREE state.phase_fraction['vapor'];
425 FIX split_fraction['vapor'];
426 FIX dMi_dt[cd.other_components];
427 FREE Mi[cd.other_components];
428 FIX dM_dt;
429 FREE M;
430 FIX dU_dt;
431 FREE U;
432 FIX Vol;
433 FIX vol_liq;
434 IF dynamic THEN
435 FREE dMi_dt[cd.other_components];
436 FIX Mi[cd.other_components];
437 FREE dM_dt;
438 FIX M;
439 FREE dU_dt;
440 FIX U;
441 FIX Qin;
442 IF equilibrated THEN
443 FREE state.P;
444 ELSE
445 FREE state.T;
446 END IF;
447 FREE vol_liq;
448 FIX liqout.flow;
449 FIX vapout.flow;
450 FREE split_fraction['vapor'];
451 ELSE
452 dMi_dt[cd.other_components] :=0 {mole/sec};
453 dM_dt :=0 {mole/sec};
454 dU_dt :=0 {J/sec};
455 END IF;
456 END seqmod;
457
458 METHOD specify;
459 RUN vapin.specify;
460 RUN liqin.specify;
461 RUN seqmod;
462 END specify;
463
464 METHOD set_ode;
465 t.ode_type :=-1;
466 FOR i IN cd.other_components DO
467 dMi_dt[i].ode_type :=2;
468 Mi[i].ode_type :=1;
469 dMi_dt[i].ode_id :=ode_offset;
470 Mi[i].ode_id :=ode_offset;
471 ode_offset :=ode_offset+1;
472 END FOR;
473 dM_dt.ode_type :=2;
474 M.ode_type :=1;
475 dM_dt.ode_id :=ode_offset;
476 M.ode_id :=ode_offset;
477 ode_offset :=ode_offset+1;
478 dU_dt.ode_type :=2;
479 U.ode_type :=1;
480 dU_dt.ode_id :=ode_offset;
481 U.ode_id :=ode_offset;
482 ode_offset :=ode_offset+1;
483 END set_ode;
484
485 METHOD set_obs;
486 Vol.obs_id :=obs_offset+1;
487 vol_liq.obs_id :=obs_offset+2;
488 state.T.obs_id :=obs_offset+3;
489 state.P.obs_id :=obs_offset+4;
490 vapin.flow.obs_id :=obs_offset+5;
491 liqin.flow.obs_id :=obs_offset+6;
492 vapout.flow.obs_id :=obs_offset+7;
493 liqout.flow.obs_id :=obs_offset+8;
494 obs_offset :=obs_offset+9;
495 END set_obs;
496 END multiple_phase_cstr;
497
498 (*****************************************************************************)
499
500 MODEL test_single_phase_cstr() REFINES cmumodel;
501
502 components IS_A set OF symbol_constant;
503 components :==['n_butane','butene_1','n_octane'];
504 cd IS_A components_data(components,'n_octane');
505 pdV IS_A phases_data('V', 'Pitzer_vapor_mixture', 'none', 'none');
506 pdL IS_A phases_data('L', 'none', 'UNIFAC_liquid_mixture', 'none');
507 equilibrated IS_A boolean;
508 input IS_A stream(cd,pdV,equilibrated);
509 output IS_A stream(cd,pdV,equilibrated);
510 nr IS_A set OF symbol_constant;
511 Kr[nr] IS_A constant;
512 active_energy[nr] IS_A constant;
513 species[nr] IS_A set OF symbol_constant;
514 nu[components][nr] IS_A integer_constant;
515 conc[components] IS_A molar_density;
516 kinetics IS_A element_kinetics(components,nr,Kr,active_energy,output.T,
517 species,nu,conc);
518 dynamic IS_A boolean;
519 t IS_A time;
520 ode_offset IS_A ode_counter;
521 obs_offset IS_A obs_counter;
522
523 reactor IS_A single_phase_cstr(input,output,kinetics,t,dynamic,
524 ode_offset,obs_offset);
525
526 nr :==['forward','backward'];
527 Kr['forward'] :== 0.1 {m^3/mol/s};
528 Kr['backward'] :== 10 {1/s};
529 active_energy['forward'] :== 50 {J/mol};
530 active_energy['backward'] :== 50 {J/mol};
531
532 species['forward'] :==['n_butane','butene_1','n_octane'];
533 species['backward'] :==['n_butane','butene_1','n_octane'];
534 nu['n_butane']['forward'] :==-1;
535 nu['butene_1']['forward'] :==-1;
536 nu['n_octane']['forward'] :==1;
537 nu['n_butane']['backward'] :==1;
538 nu['butene_1']['backward'] :==1;
539 nu['n_octane']['backward'] :==-1;
540
541 METHODS
542 METHOD check_self;
543 RUN reactor.check_self;
544 END check_self;
545
546 METHOD check_all;
547 RUN input.check_self;
548 RUN output.check_self;
549 RUN reactor.check_self;
550 RUN check_self;
551 END check_all;
552
553 METHOD default_self;
554 RUN default_all;
555 END default_self;
556
557 METHOD default_all;
558 RUN reactor.default_all;
559 END default_all;
560
561 METHOD bound_self;
562 END bound_self;
563
564 METHOD bound_all;
565 RUN reactor.bound_all;
566 END bound_all;
567
568 METHOD specify;
569 RUN reactor.specify;
570 END specify;
571
572 METHOD scale_self;
573 RUN reactor.scale_self;
574 END scale_self;
575
576 METHOD scale_all;
577 RUN reactor.scale_all;
578 END scale_all;
579
580 METHOD values;
581 input.f['n_butane'] :=100 {kmol/h};
582 input.f['butene_1'] :=100 {kmol/h};
583 input.f['n_octane'] :=1e-11 {kmol/h};
584 input.T :=300 {K};
585 input.P :=1 {atm};
586 reactor.state.T :=320 {K};
587 reactor.state.P :=1 {atm};
588 END values;
589
590 METHOD on_load;
591 RUN ClearAll;
592 RUN default_all;
593 RUN values;
594 RUN scale_all;
595 RUN specify;
596 END on_load;
597 END test_single_phase_cstr;
598
599 MODEL test_multiple_phase_cstr() REFINES cmumodel;
600
601 components IS_A set OF symbol_constant;
602 components :==['n_butane','butene_1','n_octane'];
603 cd IS_A components_data(components,'n_octane');
604 pdV IS_A phases_data('V', 'Pitzer_vapor_mixture', 'none', 'none');
605 pdL IS_A phases_data('L', 'none', 'UNIFAC_liquid_mixture', 'none');
606 equilibrated IS_A boolean;
607 vapin IS_A stream(cd,pdV,equilibrated);
608 vapout IS_A stream(cd,pdV,equilibrated);
609 liqin IS_A stream(cd,pdL,equilibrated);
610 liqout IS_A stream(cd,pdL,equilibrated);
611 nr IS_A set OF symbol_constant;
612 Kr[nr] IS_A constant;
613 active_energy[nr] IS_A constant;
614 species[nr] IS_A set OF symbol_constant;
615 nu[components][nr] IS_A integer_constant;
616 conc[components] IS_A molar_density;
617 kinetics IS_A element_kinetics(components,nr,Kr,active_energy,liqout.T,
618 species,nu,conc);
619 dynamic IS_A boolean;
620 t IS_A time;
621 ode_offset IS_A ode_counter;
622 obs_offset IS_A obs_counter;
623
624 reactor IS_A multiple_phase_cstr(vapin, liqin, vapout, liqout, kinetics,
625 t, dynamic, ode_offset, obs_offset);
626
627 nr :==['forward','backward'];
628 Kr['forward'] :== 0.1 {m^3/mol/s};
629 Kr['backward'] :== 10 {1/s};
630 active_energy['forward'] :== 50 {J/mol};
631 active_energy['backward'] :== 50 {J/mol};
632
633 species['forward'] :==['n_butane','butene_1','n_octane'];
634 species['backward'] :==['n_butane','butene_1','n_octane'];
635 nu['n_butane']['forward'] :==-1;
636 nu['butene_1']['forward'] :==-1;
637 nu['n_octane']['forward'] :==1;
638 nu['n_butane']['backward']:==1;
639 nu['butene_1']['backward']:==1;
640 nu['n_octane']['backward']:==-1;
641
642 METHODS
643 METHOD check_self;
644 RUN reactor.check_self;
645 END check_self;
646
647 METHOD check_all;
648 RUN reactor.check_all;
649 END check_all;
650
651 METHOD default_self;
652 RUN default_all;
653 END default_self;
654
655 METHOD default_all;
656 RUN reactor.default_all;
657 END default_all;
658
659 METHOD bound_self;
660 RUN bound_all;
661 END bound_self;
662
663 METHOD bound_all;
664 RUN reactor.bound_all;
665 END bound_all;
666
667 METHOD specify;
668 RUN reactor.specify;
669 END specify;
670
671 METHOD scale_self;
672 RUN reactor.scale_self;
673 END scale_self;
674
675 METHOD scale_all;
676 RUN reactor.scale_all;
677 END scale_all;
678
679 METHOD values;
680 vapin.f['n_butane'] :=100 {kmol/h};
681 vapin.f['butene_1'] :=100 {kmol/h};
682 vapin.f['n_octane'] :=1e-10 {kmol/h};
683 vapin.T :=300 {K};
684 vapin.P :=1 {atm};
685 liqin.f['n_butane'] :=100 {kmol/h};
686 liqin.f['butene_1'] :=100 {kmol/h};
687 liqin.f['n_octane'] :=1e-10 {kmol/h};
688 liqin.T :=300 {K};
689 liqin.P :=1 {atm};
690 reactor.state.T :=320 {K};
691 reactor.state.P :=1 {atm};
692 reactor.Vol :=25 {m^3};
693 reactor.vol_liq :=12.5 {m^3};
694 END values;
695
696 METHOD on_load;
697 RUN ClearAll;
698 RUN default_all;
699 RUN values;
700 RUN scale_all;
701 RUN specify;
702 END on_load;
703 END test_multiple_phase_cstr;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22