1 |
#LyX 1.4.1 created this file. For more info see http://www.lyx.org/ |
2 |
\lyxformat 245 |
3 |
\begin_document |
4 |
\begin_header |
5 |
\textclass book |
6 |
\language english |
7 |
\inputencoding auto |
8 |
\fontscheme default |
9 |
\graphics default |
10 |
\paperfontsize default |
11 |
\spacing single |
12 |
\papersize a4paper |
13 |
\use_geometry false |
14 |
\use_amsmath 2 |
15 |
\cite_engine basic |
16 |
\use_bibtopic false |
17 |
\paperorientation portrait |
18 |
\secnumdepth 3 |
19 |
\tocdepth 3 |
20 |
\paragraph_separation indent |
21 |
\defskip medskip |
22 |
\quotes_language english |
23 |
\papercolumns 1 |
24 |
\papersides 2 |
25 |
\paperpagestyle default |
26 |
\tracking_changes false |
27 |
\output_changes true |
28 |
\end_header |
29 |
|
30 |
\begin_body |
31 |
|
32 |
\begin_layout Chapter |
33 |
Multi-phase equilibrium |
34 |
\begin_inset LatexCommand \index{equilibrium} |
35 |
|
36 |
\end_inset |
37 |
|
38 |
libraries |
39 |
\begin_inset LatexCommand \label{cha:physprops} |
40 |
|
41 |
\end_inset |
42 |
|
43 |
|
44 |
\end_layout |
45 |
|
46 |
\begin_layout Standard |
47 |
This chapter describes the models we provide to compute thermodynamic properties |
48 |
\begin_inset LatexCommand \index{thermodynamic properties} |
49 |
|
50 |
\end_inset |
51 |
|
52 |
for multi-phase |
53 |
\begin_inset LatexCommand \index{multi-phase} |
54 |
|
55 |
\end_inset |
56 |
|
57 |
, multi-component |
58 |
\begin_inset LatexCommand \index{multi-component} |
59 |
|
60 |
\end_inset |
61 |
|
62 |
vapor/liquid mixtures |
63 |
\begin_inset LatexCommand \index{vapor/liquid mixtures} |
64 |
|
65 |
\end_inset |
66 |
|
67 |
where we assume equilibrium exists among co-existing phases. |
68 |
|
69 |
\end_layout |
70 |
|
71 |
\begin_layout Section |
72 |
A description of the libraries |
73 |
\end_layout |
74 |
|
75 |
\begin_layout Standard |
76 |
In this section we describe the three libraries, |
77 |
\family typewriter |
78 |
phases.a4l |
79 |
\family default |
80 |
, |
81 |
\family typewriter |
82 |
components.a4l |
83 |
\family default |
84 |
and |
85 |
\family typewriter |
86 |
thermodynamics.a4l |
87 |
\family default |
88 |
. |
89 |
These libraries contain many models, but the end user is only interested |
90 |
in a few of them. |
91 |
Our intention is that these few should be very simple to use, with the |
92 |
complexities buried inside the models. |
93 |
\end_layout |
94 |
|
95 |
\begin_layout Standard |
96 |
\begin_inset Marginal |
97 |
status collapsed |
98 |
|
99 |
\begin_layout Standard |
100 |
first the phase definitions |
101 |
\end_layout |
102 |
|
103 |
\end_inset |
104 |
|
105 |
The first contains the models we use to define the phases we allow for a |
106 |
mixture (i.e., vapor, liquid, vapor/liquid, liquid/liquid and vapor/liquid/liquid |
107 |
) |
108 |
\begin_inset LatexCommand \ref{id:#id(pgfId-1010487)} |
109 |
|
110 |
\end_inset |
111 |
|
112 |
|
113 |
\begin_inset Foot |
114 |
status collapsed |
115 |
|
116 |
\begin_layout Standard |
117 |
It should be noted that, while the models will correctly set up the data |
118 |
structures for the liquid/liquid and vapor/liquid/liquid options, we do |
119 |
not really support these alternatives at this time. |
120 |
\end_layout |
121 |
|
122 |
\end_inset |
123 |
|
124 |
|
125 |
\noun off |
126 |
. |
127 |
\end_layout |
128 |
|
129 |
\begin_layout Standard |
130 |
\begin_inset Marginal |
131 |
status collapsed |
132 |
|
133 |
\begin_layout Standard |
134 |
then the components and their data |
135 |
\end_layout |
136 |
|
137 |
\end_inset |
138 |
|
139 |
The second library contains the models having all the component physical |
140 |
properties for the components we include with ASCEND -- e.g., there are property |
141 |
values for heat capacity |
142 |
\begin_inset LatexCommand \index{heat capacity} |
143 |
|
144 |
\end_inset |
145 |
|
146 |
, heat of vaporization |
147 |
\begin_inset LatexCommand \index{heat of vaporization} |
148 |
|
149 |
\end_inset |
150 |
|
151 |
, accentric factor |
152 |
\begin_inset LatexCommand \index{accentric factor} |
153 |
|
154 |
\end_inset |
155 |
|
156 |
and so forth for water, methanol, carbon dioxide, etc. |
157 |
There is also the very extensive list of group contribution |
158 |
\begin_inset LatexCommand \index{group contribution} |
159 |
|
160 |
\end_inset |
161 |
|
162 |
data we need to use the UNIFAC |
163 |
\begin_inset LatexCommand \index{UNIFAC} |
164 |
|
165 |
\end_inset |
166 |
|
167 |
method. |
168 |
\end_layout |
169 |
|
170 |
\begin_layout Standard |
171 |
\begin_inset Marginal |
172 |
status collapsed |
173 |
|
174 |
\begin_layout Standard |
175 |
and finally the mixture thermodynamic models |
176 |
\end_layout |
177 |
|
178 |
\end_inset |
179 |
|
180 |
The third provides the models we use to compute multi-component mixture |
181 |
thermodynamic properties for phases, such as ideal gas |
182 |
\begin_inset LatexCommand \index{ideal gas} |
183 |
|
184 |
\end_inset |
185 |
|
186 |
, Pitzer |
187 |
\begin_inset LatexCommand \index{Pitzer} |
188 |
|
189 |
\end_inset |
190 |
|
191 |
, UNIFAC, and Wilson |
192 |
\begin_inset LatexCommand \index{Wilson} |
193 |
|
194 |
\end_inset |
195 |
|
196 |
. |
197 |
The final model in this library is the one to compute equilibrium conditions |
198 |
for multi-component, multi-phase systems. |
199 |
We provide both a constant relative volatility |
200 |
\begin_inset LatexCommand \index{relative volatility} |
201 |
|
202 |
\end_inset |
203 |
|
204 |
and a rigorous phase equilibrium model, with the ability to switch interactivel |
205 |
y between which one to use. |
206 |
Thus one can first assume constant relative volatility to have a better |
207 |
chance to converge and then switch to the version that makes the chemical |
208 |
potential |
209 |
\begin_inset LatexCommand \index{chemical potential} |
210 |
|
211 |
\end_inset |
212 |
|
213 |
equal for a component in all phases. |
214 |
\end_layout |
215 |
|
216 |
\begin_layout Subsection |
217 |
The |
218 |
\family typewriter |
219 |
phases.a4l |
220 |
\family default |
221 |
|
222 |
\begin_inset LatexCommand \index{phases.a4l} |
223 |
|
224 |
\end_inset |
225 |
|
226 |
library |
227 |
\end_layout |
228 |
|
229 |
\begin_layout Standard |
230 |
\begin_inset Marginal |
231 |
status open |
232 |
|
233 |
\begin_layout Standard |
234 |
need to create only instances of phases_data |
235 |
\end_layout |
236 |
|
237 |
\end_inset |
238 |
|
239 |
The |
240 |
\family typewriter |
241 |
Phases.a4l |
242 |
\family default |
243 |
library, see Figure |
244 |
\begin_inset LatexCommand \ref{fig:physprops.phases.a4l} |
245 |
|
246 |
\end_inset |
247 |
|
248 |
|
249 |
\noun off |
250 |
, has only one model in it, phases_data |
251 |
\noun default |
252 |
|
253 |
\begin_inset LatexCommand \index{phases\_data} |
254 |
|
255 |
\end_inset |
256 |
|
257 |
|
258 |
\begin_inset Foot |
259 |
status collapsed |
260 |
|
261 |
\begin_layout Standard |
262 |
In this and following figures, we represent each model as a rectangle. |
263 |
On the upper left is the name of the model. |
264 |
In |
265 |
\begin_inset LatexCommand \ref{fig:physprops.phases.a4l} |
266 |
|
267 |
\end_inset |
268 |
|
269 |
|
270 |
\noun on |
271 |
Figure 1-1 |
272 |
\noun off |
273 |
, the model is phases_data. |
274 |
On the left side we list in order the parameters for the model. |
275 |
These are shared objects |
276 |
\begin_inset LatexCommand \index{shared objects} |
277 |
|
278 |
\end_inset |
279 |
|
280 |
a model containing an instance of phases_data will pass to that instance. |
281 |
An example would bepd IS_A phases_data(V, 'Pitzer_vapor_mixture', 'none', |
282 |
'none')We list the parts defined locally within a model on the right side |
283 |
of the rectangle, including instances of models, atoms and sets. |
284 |
The slanted double-headed arrow indicates a set; thus, phases and other_phases |
285 |
are sets in phases_data.In |
286 |
\begin_inset LatexCommand \ref{fig:physprops.thermoLib} |
287 |
|
288 |
\end_inset |
289 |
|
290 |
|
291 |
\noun on |
292 |
Figure 1-3 |
293 |
\noun off |
294 |
we show lines connecting a model, call it A, to a part within another model, |
295 |
call it B.part. |
296 |
The connection is to the sides of both. |
297 |
This type of connection says B.part is an instance of model A. |
298 |
We also show connections from the bottom of one model, call it C, to the |
299 |
top of another, call it D; with this connection we indicate that the lower |
300 |
model D is a refinement |
301 |
\begin_inset LatexCommand \index{refinement} |
302 |
|
303 |
\end_inset |
304 |
|
305 |
of the upper model C. |
306 |
\end_layout |
307 |
|
308 |
\end_inset |
309 |
|
310 |
|
311 |
\noun off |
312 |
. |
313 |
The user creates an instance of this model, specifying which phases are |
314 |
to exist for a stream or holdup and which thermodynamic model the system |
315 |
should use to compute mixture properties for each phase. |
316 |
Compiling this instance then sets up the data structures required to characteri |
317 |
ze those phases for the system. |
318 |
\end_layout |
319 |
|
320 |
\begin_layout Standard |
321 |
For example, suppose we want to model a flowsheet consisting of a single |
322 |
flash unit. |
323 |
Suppose further that we want to allow the feed to the flash unit to be |
324 |
vapor, liquid or vapor/liquid (i.e., 2 phase). |
325 |
The product streams from the flash unit will be a vapor phase mixture and |
326 |
a liquid phase mixture. |
327 |
We would define three instances of the phases_data model, one for each |
328 |
type of phase condition we wish to model. |
329 |
You can find the following statements in the model |
330 |
\family typewriter |
331 |
testflashmodel |
332 |
\family default |
333 |
|
334 |
\begin_inset LatexCommand \index{testflashmodel} |
335 |
|
336 |
\end_inset |
337 |
|
338 |
in the library |
339 |
\family typewriter |
340 |
flash.a4l |
341 |
\family default |
342 |
|
343 |
\begin_inset LatexCommand \index{flash.a4l} |
344 |
|
345 |
\end_inset |
346 |
|
347 |
. |
348 |
\end_layout |
349 |
|
350 |
\begin_layout LyX-Code |
351 |
pdV IS_A phases_data('V', 'ideal_vapor_mixture', |
352 |
\end_layout |
353 |
|
354 |
\begin_layout LyX-Code |
355 |
'none', 'none'); |
356 |
\end_layout |
357 |
|
358 |
\begin_layout LyX-Code |
359 |
pdL IS_A phases_data('L', 'none', |
360 |
\end_layout |
361 |
|
362 |
\begin_layout LyX-Code |
363 |
'UNIFAC_liquid_mixture', 'none'); |
364 |
\end_layout |
365 |
|
366 |
\begin_layout LyX-Code |
367 |
pdVL IS_A phases_data('VL', 'ideal_vapor_mixture', |
368 |
\end_layout |
369 |
|
370 |
\begin_layout LyX-Code |
371 |
'UNIFAC_liquid_mixture','none'); |
372 |
\end_layout |
373 |
|
374 |
\begin_layout Standard |
375 |
When compiled, |
376 |
\family typewriter |
377 |
pdV |
378 |
\family default |
379 |
, |
380 |
\family typewriter |
381 |
pdL |
382 |
\family default |
383 |
and |
384 |
\family typewriter |
385 |
pdVL |
386 |
\family default |
387 |
contain the data structures the thermodynamic models require to model a |
388 |
vapor, liquid and vapor/liquid stream |
389 |
\begin_inset LatexCommand \index{stream} |
390 |
|
391 |
\end_inset |
392 |
|
393 |
(or holdup |
394 |
\begin_inset LatexCommand \index{holdup} |
395 |
|
396 |
\end_inset |
397 |
|
398 |
). |
399 |
\end_layout |
400 |
|
401 |
\begin_layout Standard |
402 |
\begin_inset Marginal |
403 |
status collapsed |
404 |
|
405 |
\begin_layout Standard |
406 |
the phase indicators and types |
407 |
\end_layout |
408 |
|
409 |
\end_inset |
410 |
|
411 |
The first parameter is a character that indicates the phase option desired |
412 |
- |
413 |
\family typewriter |
414 |
'M' |
415 |
\family default |
416 |
, |
417 |
\family typewriter |
418 |
'V' |
419 |
\family default |
420 |
, |
421 |
\family typewriter |
422 |
'L' |
423 |
\family default |
424 |
, |
425 |
\family typewriter |
426 |
'VL' |
427 |
\family default |
428 |
, |
429 |
\family typewriter |
430 |
'LL' |
431 |
\family default |
432 |
and |
433 |
\family typewriter |
434 |
'VLL' |
435 |
\family default |
436 |
. |
437 |
|
438 |
\family typewriter |
439 |
'M' |
440 |
\family default |
441 |
is for a material only stream (no thermodynamic properties are to be computed), |
442 |
|
443 |
\family typewriter |
444 |
'V' |
445 |
\family default |
446 |
is for vapor and |
447 |
\family typewriter |
448 |
'L' |
449 |
\family default |
450 |
for liquid. |
451 |
This model always expects the user to supply in the last three parameters |
452 |
an ordered list giving the three single phase mixture models to be used: |
453 |
vapor, liquid1, liquid2. |
454 |
For a non-existent phase |
455 |
\begin_inset LatexCommand \index{non-existent phase} |
456 |
|
457 |
\end_inset |
458 |
|
459 |
, the user should supply 'none' as the model. |
460 |
If there is only one liquid phase, liquid2 will not exist. |
461 |
The allowed models we can use to estimate multi-component phase mixture |
462 |
properties are in the third of the libraries we describe in this chapter, |
463 |
|
464 |
\family typewriter |
465 |
thermodynamics.a4l |
466 |
\family default |
467 |
|
468 |
\begin_inset LatexCommand \index{thermodynamics.a4l} |
469 |
|
470 |
\end_inset |
471 |
|
472 |
, which we discuss shortly in Section |
473 |
\begin_inset LatexCommand \ref{ssec:physprops.thermoLib} |
474 |
|
475 |
\end_inset |
476 |
|
477 |
|
478 |
\noun off |
479 |
. |
480 |
\end_layout |
481 |
|
482 |
\begin_layout Standard |
483 |
\begin_inset Float figure |
484 |
wide false |
485 |
sideways false |
486 |
status open |
487 |
|
488 |
\begin_layout Standard |
489 |
|
490 |
\noun off |
491 |
\begin_inset Graphics |
492 |
filename howto-physpropsFig1.eps |
493 |
width 90col% |
494 |
|
495 |
\end_inset |
496 |
|
497 |
|
498 |
\end_layout |
499 |
|
500 |
\begin_layout Caption |
501 |
Phases.a4l |
502 |
\begin_inset LatexCommand \index{Phases.a4l} |
503 |
|
504 |
\end_inset |
505 |
|
506 |
models |
507 |
\begin_inset LatexCommand \label{fig:physprops.phases.a4l} |
508 |
|
509 |
\end_inset |
510 |
|
511 |
|
512 |
\end_layout |
513 |
|
514 |
\end_inset |
515 |
|
516 |
|
517 |
\end_layout |
518 |
|
519 |
\begin_layout Subsection |
520 |
The |
521 |
\family typewriter |
522 |
components.a4l |
523 |
\family default |
524 |
|
525 |
\begin_inset LatexCommand \index{components.a4l} |
526 |
|
527 |
\end_inset |
528 |
|
529 |
library |
530 |
\end_layout |
531 |
|
532 |
\begin_layout Standard |
533 |
In this library (see Figure |
534 |
\begin_inset LatexCommand \ref{fig:physprops.components.a4l} |
535 |
|
536 |
\end_inset |
537 |
|
538 |
|
539 |
\noun off |
540 |
) we provide the actual physical property data for the components supplied |
541 |
with ASCEND. |
542 |
The data we provide is that found in the tables at the back of Reid |
543 |
\begin_inset LatexCommand \index{Reid} |
544 |
|
545 |
\end_inset |
546 |
|
547 |
, Prausnitz |
548 |
\begin_inset LatexCommand \index{Prausnitz} |
549 |
|
550 |
\end_inset |
551 |
|
552 |
and Poling |
553 |
\begin_inset LatexCommand \index{Poling} |
554 |
|
555 |
\end_inset |
556 |
|
557 |
, The Properties of Vapors |
558 |
\noun default |
559 |
& |
560 |
\noun off |
561 |
Liquids, 4th Ed, McGraw-Hill |
562 |
\begin_inset LatexCommand \index{McGraw-Hill} |
563 |
|
564 |
\end_inset |
565 |
|
566 |
, New York (1986). |
567 |
For a few of the components, we have also identified their UNIFAC groups |
568 |
\begin_inset LatexCommand \index{UNIFAC groups} |
569 |
|
570 |
\end_inset |
571 |
|
572 |
. |
573 |
We include a few Wilson binary mixture parameters |
574 |
\begin_inset LatexCommand \index{Wilson binary mixture parameters} |
575 |
|
576 |
\end_inset |
577 |
|
578 |
. |
579 |
\end_layout |
580 |
|
581 |
\begin_layout Standard |
582 |
\begin_inset Marginal |
583 |
status collapsed |
584 |
|
585 |
\begin_layout Standard |
586 |
need to create only instances of components_data |
587 |
\end_layout |
588 |
|
589 |
\end_inset |
590 |
|
591 |
The purpose of this library is similar to the |
592 |
\family typewriter |
593 |
phases.a4l |
594 |
\family default |
595 |
library. |
596 |
We wish to provide an easy-to-use model that will set up the data structures |
597 |
for the components in a mixture that the thermodynamic models will use |
598 |
when estimating mixture physical properties. |
599 |
All the user has to do is create an instance of the bottom-most model |
600 |
\family typewriter |
601 |
components_data |
602 |
\family default |
603 |
, passing into it a list of the components in the mixture and the name of |
604 |
one of them which is to serve as the reference component. |
605 |
This model, having parts which are instances of the others present in this |
606 |
library, then compiles into the needed data structures. |
607 |
\end_layout |
608 |
|
609 |
\begin_layout Standard |
610 |
An example of use is found in the model |
611 |
\family typewriter |
612 |
testflashmodel |
613 |
\family default |
614 |
in the library |
615 |
\family typewriter |
616 |
flash.a4l |
617 |
\family default |
618 |
|
619 |
\begin_inset LatexCommand \index{flash.a4l} |
620 |
|
621 |
\end_inset |
622 |
|
623 |
: |
624 |
\end_layout |
625 |
|
626 |
\begin_layout LyX-Code |
627 |
cd IS_A components_data(['n_pentane','n_hexane', |
628 |
\end_layout |
629 |
|
630 |
\begin_layout LyX-Code |
631 |
'n_heptane'],'n_heptane'); |
632 |
\end_layout |
633 |
|
634 |
\begin_layout Standard |
635 |
When compiled |
636 |
\family typewriter |
637 |
cd |
638 |
\family default |
639 |
has in it a data structure containing the physical properties for the three |
640 |
species listed. |
641 |
\end_layout |
642 |
|
643 |
\begin_layout Standard |
644 |
\begin_inset Marginal |
645 |
status collapsed |
646 |
|
647 |
\begin_layout Standard |
648 |
reference component |
649 |
\end_layout |
650 |
|
651 |
\end_inset |
652 |
|
653 |
The choice of which species to use as the reference component |
654 |
\begin_inset LatexCommand \index{reference component} |
655 |
|
656 |
\end_inset |
657 |
|
658 |
is up to the user. |
659 |
Usually a good choice is one that is plentiful in the mixture, but that |
660 |
need not be so. |
661 |
|
662 |
\end_layout |
663 |
|
664 |
\begin_layout Standard |
665 |
\begin_inset Float figure |
666 |
wide false |
667 |
sideways false |
668 |
status open |
669 |
|
670 |
\begin_layout Standard |
671 |
\begin_inset Graphics |
672 |
filename howto-physpropsFig2.eps |
673 |
width 100col% |
674 |
|
675 |
\end_inset |
676 |
|
677 |
|
678 |
\end_layout |
679 |
|
680 |
\begin_layout Caption |
681 |
components.a4l |
682 |
\begin_inset LatexCommand \index{components.a4l} |
683 |
|
684 |
\end_inset |
685 |
|
686 |
models |
687 |
\begin_inset LatexCommand \label{fig:physprops.components.a4l} |
688 |
|
689 |
\end_inset |
690 |
|
691 |
|
692 |
\end_layout |
693 |
|
694 |
\end_inset |
695 |
|
696 |
|
697 |
\end_layout |
698 |
|
699 |
\begin_layout Standard |
700 |
\begin_inset Marginal |
701 |
status collapsed |
702 |
|
703 |
\begin_layout Standard |
704 |
adding a new component |
705 |
\end_layout |
706 |
|
707 |
\end_inset |
708 |
|
709 |
One can add more components to this library as follows: |
710 |
\end_layout |
711 |
|
712 |
\begin_layout Enumerate |
713 |
add the name of the new component to the list of supported_components at |
714 |
the beginning of the model |
715 |
\family typewriter |
716 |
td_thermodynamic_constants |
717 |
\family default |
718 |
(part of the |
719 |
\family typewriter |
720 |
WHERE |
721 |
\family default |
722 |
statement that causes the system to output a diagnostic if someone subsequently |
723 |
misspells the name of a component) |
724 |
\end_layout |
725 |
|
726 |
\begin_layout Enumerate |
727 |
add the component data as a |
728 |
\family typewriter |
729 |
CASE |
730 |
\family default |
731 |
to the |
732 |
\family typewriter |
733 |
SELECT |
734 |
\family default |
735 |
statement in |
736 |
\family typewriter |
737 |
|
738 |
\newline |
739 |
td_thermodynamic_constants |
740 |
\family default |
741 |
(for an example, look at how it is done for 'methanol') |
742 |
\end_layout |
743 |
|
744 |
\begin_layout Standard |
745 |
\begin_inset Marginal |
746 |
status collapsed |
747 |
|
748 |
\begin_layout Standard |
749 |
adding UNIFAC group identifiers |
750 |
\end_layout |
751 |
|
752 |
\end_inset |
753 |
|
754 |
Put the UNIFAC group identifiers |
755 |
\begin_inset LatexCommand \index{UNIFAC group identifiers} |
756 |
|
757 |
\end_inset |
758 |
|
759 |
for the new component into the set subgroups. |
760 |
To illustrate, this statement for methanol is: |
761 |
\end_layout |
762 |
|
763 |
\begin_layout LyX-Code |
764 |
subgroups:== ['CH3', 'OH']; |
765 |
\end_layout |
766 |
|
767 |
\begin_layout Standard |
768 |
You can find all the UNIFAC group identifiers possible in the model |
769 |
\family typewriter |
770 |
UNIFAC_constants |
771 |
\family default |
772 |
|
773 |
\begin_inset LatexCommand \index{UNIFAC\_constants} |
774 |
|
775 |
\end_inset |
776 |
|
777 |
. |
778 |
Then fill in the vector |
779 |
\family typewriter |
780 |
nu |
781 |
\family default |
782 |
with a value for each of these groups (to indicate how many such groups |
783 |
are in the molecule). |
784 |
To illustrate, the values for methanol are: |
785 |
\end_layout |
786 |
|
787 |
\begin_layout LyX-Code |
788 |
nu['CH3']:==1; |
789 |
\end_layout |
790 |
|
791 |
\begin_layout LyX-Code |
792 |
nu['OH']:==1; |
793 |
\end_layout |
794 |
|
795 |
\begin_layout Standard |
796 |
If you are entering the component without identifying its UNIFAC groups, |
797 |
then enter the subgroups statement and define it as empty -- i.e., write |
798 |
\end_layout |
799 |
|
800 |
\begin_layout LyX-Code |
801 |
subgroups:== [ ]; |
802 |
\end_layout |
803 |
|
804 |
\begin_layout Standard |
805 |
There should then be no entry for nu (see the |
806 |
\family typewriter |
807 |
CASE |
808 |
\family default |
809 |
for hydrogen, for example). |
810 |
An activity coefficient estimated by the UNIFAC method will be unity for |
811 |
such a component. |
812 |
\end_layout |
813 |
|
814 |
\begin_layout Standard |
815 |
\begin_inset Marginal |
816 |
status collapsed |
817 |
|
818 |
\begin_layout Standard |
819 |
adding Wilson parameters |
820 |
\end_layout |
821 |
|
822 |
\end_inset |
823 |
|
824 |
To add Wilson parameters |
825 |
\begin_inset LatexCommand \index{Wilson parameters} |
826 |
|
827 |
\end_inset |
828 |
|
829 |
, first fill in the names of the other components for which you are adding |
830 |
data into the set |
831 |
\family typewriter |
832 |
wilson_set |
833 |
\family default |
834 |
. |
835 |
For example, this set for methanol might be: |
836 |
\end_layout |
837 |
|
838 |
\begin_layout LyX-Code |
839 |
wilson_set:== ['H2O','(CH3)2CO','CH3OH']; |
840 |
\end_layout |
841 |
|
842 |
\begin_layout Standard |
843 |
Then fill in lambda and energy parameters into the arrays |
844 |
\family typewriter |
845 |
lambda |
846 |
\family default |
847 |
and |
848 |
\family typewriter |
849 |
del_ip |
850 |
\family default |
851 |
, one for each of the other components. |
852 |
Again, to illustrate, these arrays for methanol would be: |
853 |
\end_layout |
854 |
|
855 |
\begin_layout LyX-Code |
856 |
lambda['H2O']:==0.43045; |
857 |
\end_layout |
858 |
|
859 |
\begin_layout LyX-Code |
860 |
lambda['(CH3)2CO']:==0.77204; |
861 |
\end_layout |
862 |
|
863 |
\begin_layout LyX-Code |
864 |
lambda['CH3OH']:==1.0; |
865 |
\end_layout |
866 |
|
867 |
\begin_layout LyX-Code |
868 |
del_ip['(CH3)2CO']:==2.6493E+002 {J/g_mole}; |
869 |
\end_layout |
870 |
|
871 |
\begin_layout LyX-Code |
872 |
del_ip['H2O']:==1.1944E+002 {J/g_mole}; |
873 |
\end_layout |
874 |
|
875 |
\begin_layout LyX-Code |
876 |
del_ip['CH3OH']:==0.0 {J/g_mole}; |
877 |
\end_layout |
878 |
|
879 |
\begin_layout Standard |
880 |
Finally for each of these other components, go to its |
881 |
\family typewriter |
882 |
CASE |
883 |
\family default |
884 |
statement, add the name of the new component to its wilson_set and then |
885 |
add statements to set the corresponding lambda and energy data. |
886 |
BEN, IS THIS RIGHT????If you are not adding any Wilson data, enter the |
887 |
statement: |
888 |
\end_layout |
889 |
|
890 |
\begin_layout LyX-Code |
891 |
wilson_set:== [ ]; |
892 |
\end_layout |
893 |
|
894 |
\begin_layout Subsection |
895 |
The |
896 |
\family typewriter |
897 |
thermodynamics.a4l |
898 |
\family default |
899 |
|
900 |
\begin_inset LatexCommand \index{thermodynamics.a4l} |
901 |
|
902 |
\end_inset |
903 |
|
904 |
library |
905 |
\begin_inset LatexCommand \label{ssec:physprops.thermoLib} |
906 |
|
907 |
\end_inset |
908 |
|
909 |
|
910 |
\end_layout |
911 |
|
912 |
\begin_layout Standard |
913 |
\begin_inset Marginal |
914 |
status collapsed |
915 |
|
916 |
\begin_layout Standard |
917 |
create instances only of phase_partials and thermodynamics |
918 |
\end_layout |
919 |
|
920 |
\end_inset |
921 |
|
922 |
Figure |
923 |
\begin_inset LatexCommand \ref{fig:physprops.thermoLib} |
924 |
|
925 |
\end_inset |
926 |
|
927 |
|
928 |
\noun off |
929 |
shows all the models in this library and how they are related to each other. |
930 |
There are two models in this library that the user has to worry about: |
931 |
|
932 |
\family typewriter |
933 |
\noun default |
934 |
phase_partials |
935 |
\family default |
936 |
\noun off |
937 |
|
938 |
\begin_inset LatexCommand \index{phase\_partials} |
939 |
|
940 |
\end_inset |
941 |
|
942 |
and |
943 |
\family typewriter |
944 |
\noun default |
945 |
thermodynamics |
946 |
\family default |
947 |
\noun off |
948 |
. |
949 |
The user creates one instance of thermodynamics for every stream or holdup |
950 |
in a process model. |
951 |
Each instance, when compiled has parts which are instances of the other |
952 |
models in this library and which are create the equations to compute the |
953 |
thermodynamic properties for a multi-component, multi-phase mixture. |
954 |
\end_layout |
955 |
|
956 |
\begin_layout Standard |
957 |
However, the user must pass each instance of a thermodynamics model an array |
958 |
of instances of |
959 |
\family typewriter |
960 |
phase_partials |
961 |
\family default |
962 |
, one for each phase in the mixture. |
963 |
One |
964 |
\family typewriter |
965 |
phase_partials |
966 |
\family default |
967 |
model must exist for each phase in each stream or holdup in the process |
968 |
model as it provides the equations modeling that phase. |
969 |
|
970 |
\end_layout |
971 |
|
972 |
\begin_layout Standard |
973 |
\begin_inset Note Note |
974 |
status collapsed |
975 |
|
976 |
\begin_layout Standard |
977 |
Need to explain UNIFAC, Pitzer etc, since these terms are not familiar to |
978 |
the Mechanical Engineer, and no details are provided as to which is appropriate |
979 |
for which types of problems. |
980 |
\end_layout |
981 |
|
982 |
\begin_layout Standard |
983 |
Also, it would be useful to know how to model a homogenous two-phase stream |
984 |
of gas/liquid mixture of a single component. |
985 |
\end_layout |
986 |
|
987 |
\begin_layout Standard |
988 |
Also, the documentation needs a 'hello world' example of how to use the |
989 |
properties correlation, eg how to compute the enthalpy of water at room |
990 |
temperature / atmospheric pressure. |
991 |
\end_layout |
992 |
|
993 |
\end_inset |
994 |
|
995 |
|
996 |
\end_layout |
997 |
|
998 |
\begin_layout Standard |
999 |
Each of the models in the array of |
1000 |
\family typewriter |
1001 |
phase_partials |
1002 |
\family default |
1003 |
must be refined to be one of the possible models for computing properties |
1004 |
for a single phase mixture, i.e., one of the models lying below the |
1005 |
\family typewriter |
1006 |
phase_paritals |
1007 |
\family default |
1008 |
model in Figure |
1009 |
\begin_inset LatexCommand \ref{fig:physprops.thermoLib} |
1010 |
|
1011 |
\end_inset |
1012 |
|
1013 |
|
1014 |
\noun off |
1015 |
: |
1016 |
\family typewriter |
1017 |
\noun default |
1018 |
ideal_vapor_mixture |
1019 |
\family default |
1020 |
\noun off |
1021 |
|
1022 |
\begin_inset LatexCommand \index{ideal\_vapor\_mixture} |
1023 |
|
1024 |
\end_inset |
1025 |
|
1026 |
, |
1027 |
\family typewriter |
1028 |
\noun default |
1029 |
Pitzer_vapor_mixture |
1030 |
\family default |
1031 |
\noun off |
1032 |
|
1033 |
\begin_inset LatexCommand \index{Pitzer\_vapor\_mixture} |
1034 |
|
1035 |
\end_inset |
1036 |
|
1037 |
, |
1038 |
\family typewriter |
1039 |
\noun default |
1040 |
UNIFAC_liquid_mixture |
1041 |
\family default |
1042 |
\noun off |
1043 |
|
1044 |
\begin_inset LatexCommand \index{UNIFAC\_liquid\_mixture} |
1045 |
|
1046 |
\end_inset |
1047 |
|
1048 |
or |
1049 |
\family typewriter |
1050 |
\noun default |
1051 |
Wilson_liquid_mixture |
1052 |
\family default |
1053 |
\noun off |
1054 |
|
1055 |
\begin_inset LatexCommand \index{Wilson\_liquid\_mixture} |
1056 |
|
1057 |
\end_inset |
1058 |
|
1059 |
. |
1060 |
\end_layout |
1061 |
|
1062 |
\begin_layout Standard |
1063 |
\begin_inset Float figure |
1064 |
wide false |
1065 |
sideways false |
1066 |
status open |
1067 |
|
1068 |
\begin_layout Standard |
1069 |
|
1070 |
\noun off |
1071 |
\begin_inset Graphics |
1072 |
filename howto-physpropsFig3.eps |
1073 |
lyxscale 50 |
1074 |
width 100col% |
1075 |
|
1076 |
\end_inset |
1077 |
|
1078 |
|
1079 |
\end_layout |
1080 |
|
1081 |
\begin_layout Caption |
1082 |
Models in thermodynamic.a4l |
1083 |
\begin_inset LatexCommand \label{fig:physprops.thermoLib} |
1084 |
|
1085 |
\end_inset |
1086 |
|
1087 |
|
1088 |
\end_layout |
1089 |
|
1090 |
\end_inset |
1091 |
|
1092 |
|
1093 |
\end_layout |
1094 |
|
1095 |
\begin_layout Standard |
1096 |
The information in an instance of a |
1097 |
\family typewriter |
1098 |
phases_data |
1099 |
\family default |
1100 |
model allows us to construct this array of |
1101 |
\family typewriter |
1102 |
phase_partials |
1103 |
\family default |
1104 |
. |
1105 |
We extract the following code from the library |
1106 |
\family typewriter |
1107 |
stream_holdup.a4l |
1108 |
\family default |
1109 |
|
1110 |
\begin_inset LatexCommand \index{stream\_holdup.a4l} |
1111 |
|
1112 |
\end_inset |
1113 |
|
1114 |
to illustrate how we have created such a model, given a |
1115 |
\family typewriter |
1116 |
phases_data |
1117 |
\family default |
1118 |
model. |
1119 |
\end_layout |
1120 |
|
1121 |
\begin_layout LyX-Code |
1122 |
MODEL select_mixture_type |
1123 |
\begin_inset LatexCommand \index{select\_mixture\_type} |
1124 |
|
1125 |
\end_inset |
1126 |
|
1127 |
( |
1128 |
\end_layout |
1129 |
|
1130 |
\begin_layout LyX-Code |
1131 |
cd WILL_BE components_data; |
1132 |
\end_layout |
1133 |
|
1134 |
\begin_layout LyX-Code |
1135 |
type WILL_BE symbol_constant; |
1136 |
\end_layout |
1137 |
|
1138 |
\begin_layout LyX-Code |
1139 |
) REFINES sh_base; |
1140 |
\end_layout |
1141 |
|
1142 |
\begin_layout LyX-Code |
1143 |
phase IS_A phase_partials(cd); |
1144 |
\end_layout |
1145 |
|
1146 |
\begin_layout LyX-Code |
1147 |
SELECT (type) |
1148 |
\end_layout |
1149 |
|
1150 |
\begin_layout LyX-Code |
1151 |
CASE 'ideal_vapor_mixture': |
1152 |
\end_layout |
1153 |
|
1154 |
\begin_layout LyX-Code |
1155 |
phase IS_REFINED_TO ideal_vapor_mixture(cd); |
1156 |
\end_layout |
1157 |
|
1158 |
\begin_layout LyX-Code |
1159 |
CASE 'Pitzer_vapor_mixture': |
1160 |
\end_layout |
1161 |
|
1162 |
\begin_layout LyX-Code |
1163 |
phase IS_REFINED_TO Pitzer_vapor_mixture(cd); |
1164 |
\end_layout |
1165 |
|
1166 |
\begin_layout LyX-Code |
1167 |
CASE 'UNIFAC_liquid_mixture': |
1168 |
\end_layout |
1169 |
|
1170 |
\begin_layout LyX-Code |
1171 |
phase IS_REFINED_TO UNIFAC_liquid_mixture(cd); |
1172 |
\end_layout |
1173 |
|
1174 |
\begin_layout LyX-Code |
1175 |
CASE 'Wilson_liquid_mixture': |
1176 |
\end_layout |
1177 |
|
1178 |
\begin_layout LyX-Code |
1179 |
phase IS_REFINED_TO Wilson_liquid_mixture(cd); |
1180 |
\end_layout |
1181 |
|
1182 |
\begin_layout LyX-Code |
1183 |
OTHERWISE: |
1184 |
\end_layout |
1185 |
|
1186 |
\begin_layout LyX-Code |
1187 |
END SELECT; |
1188 |
\end_layout |
1189 |
|
1190 |
\begin_layout LyX-Code |
1191 |
boundwidth IS_A bound_width; |
1192 |
\end_layout |
1193 |
|
1194 |
\begin_layout LyX-Code |
1195 |
... |
1196 |
\end_layout |
1197 |
|
1198 |
\begin_layout LyX-Code |
1199 |
... |
1200 |
\end_layout |
1201 |
|
1202 |
\begin_layout LyX-Code |
1203 |
... |
1204 |
\end_layout |
1205 |
|
1206 |
\begin_layout LyX-Code |
1207 |
|
1208 |
\end_layout |
1209 |
|
1210 |
\begin_layout LyX-Code |
1211 |
END select_mixture_type; |
1212 |
\end_layout |
1213 |
|
1214 |
\begin_layout LyX-Code |
1215 |
|
1216 |
\end_layout |
1217 |
|
1218 |
\begin_layout LyX-Code |
1219 |
MODEL stream( ....... |
1220 |
\end_layout |
1221 |
|
1222 |
\begin_layout LyX-Code |
1223 |
... |
1224 |
\end_layout |
1225 |
|
1226 |
\begin_layout LyX-Code |
1227 |
... |
1228 |
\end_layout |
1229 |
|
1230 |
\begin_layout LyX-Code |
1231 |
... |
1232 |
\end_layout |
1233 |
|
1234 |
\begin_layout LyX-Code |
1235 |
|
1236 |
\end_layout |
1237 |
|
1238 |
\begin_layout LyX-Code |
1239 |
FOR j IN phases CREATE |
1240 |
\end_layout |
1241 |
|
1242 |
\begin_layout LyX-Code |
1243 |
smt[j] IS_A select_mixture_type(cd, pd.phase_type[j]); |
1244 |
\end_layout |
1245 |
|
1246 |
\begin_layout LyX-Code |
1247 |
END FOR; |
1248 |
\end_layout |
1249 |
|
1250 |
\begin_layout LyX-Code |
1251 |
FOR j IN phases CREATE |
1252 |
\end_layout |
1253 |
|
1254 |
\begin_layout LyX-Code |
1255 |
phase[j] ALIASES smt[j].phase; |
1256 |
\end_layout |
1257 |
|
1258 |
\begin_layout LyX-Code |
1259 |
END FOR; |
1260 |
\end_layout |
1261 |
|
1262 |
\begin_layout LyX-Code |
1263 |
state IS_A thermodynamics(cd, pd, phase, equilibrated); |
1264 |
\end_layout |
1265 |
|
1266 |
\begin_layout LyX-Code |
1267 |
... |
1268 |
\end_layout |
1269 |
|
1270 |
\begin_layout LyX-Code |
1271 |
... |
1272 |
\end_layout |
1273 |
|
1274 |
\begin_layout LyX-Code |
1275 |
... |
1276 |
\end_layout |
1277 |
|
1278 |
\begin_layout LyX-Code |
1279 |
... |
1280 |
\end_layout |
1281 |
|
1282 |
\begin_layout Standard |
1283 |
\begin_inset Marginal |
1284 |
status collapsed |
1285 |
|
1286 |
\begin_layout Standard |
1287 |
cannot directly embed SELECT statements in FOR loops |
1288 |
\end_layout |
1289 |
|
1290 |
\end_inset |
1291 |
|
1292 |
We had to be a bit tricky, but we hope we have not been so devious that |
1293 |
you cannot understand what we have done if we explain it to you here. |
1294 |
Look first at the code we extracted from the model stream. |
1295 |
The models |
1296 |
\family typewriter |
1297 |
cd |
1298 |
\family default |
1299 |
and |
1300 |
\family typewriter |
1301 |
pd |
1302 |
\family default |
1303 |
are instances of a |
1304 |
\family typewriter |
1305 |
components_data |
1306 |
\family default |
1307 |
and a |
1308 |
\family typewriter |
1309 |
phases_data |
1310 |
\family default |
1311 |
model respectively. |
1312 |
If we look inside |
1313 |
\family typewriter |
1314 |
pd |
1315 |
\family default |
1316 |
, we will find it contains an array called |
1317 |
\family typewriter |
1318 |
phase_type |
1319 |
\family default |
1320 |
, with one entry for each phase that gives the type (name) of the model |
1321 |
to be used to set up the equations for that phase. |
1322 |
ASCEND does not allow |
1323 |
\family typewriter |
1324 |
SELECT |
1325 |
\family default |
1326 |
statements |
1327 |
\begin_inset LatexCommand \index{SELECT statements. embedded in FOR} |
1328 |
|
1329 |
\end_inset |
1330 |
|
1331 |
to be embedded directly within a |
1332 |
\family typewriter |
1333 |
FOR |
1334 |
\family default |
1335 |
loop -- thus we need a bit of deviousness. |
1336 |
For each phase j we create |
1337 |
\family typewriter |
1338 |
smt[j] |
1339 |
\family default |
1340 |
as an instance of a |
1341 |
\family typewriter |
1342 |
select_mixture_type |
1343 |
\family default |
1344 |
model. |
1345 |
We parameterize the |
1346 |
\family typewriter |
1347 |
select_mixture_type |
1348 |
\family default |
1349 |
with the components data |
1350 |
\family typewriter |
1351 |
cd |
1352 |
\family default |
1353 |
and the type (name) |
1354 |
\family typewriter |
1355 |
pd.phase_type[j] |
1356 |
\family default |
1357 |
of the model to be used to generate its equations. |
1358 |
Then we embed the select statement within the |
1359 |
\family typewriter |
1360 |
select_mixture_type |
1361 |
\family default |
1362 |
model, something ASCEND does allow. |
1363 |
\end_layout |
1364 |
|
1365 |
\begin_layout Standard |
1366 |
The model |
1367 |
\family typewriter |
1368 |
select_mixture_type |
1369 |
\family default |
1370 |
appears first in this code. |
1371 |
It uses the type (name) it is passed to select and then to instance the |
1372 |
desired refinement of the |
1373 |
\family typewriter |
1374 |
phase_partials |
1375 |
\family default |
1376 |
model. |
1377 |
|
1378 |
\end_layout |
1379 |
|
1380 |
\begin_layout Standard |
1381 |
Returning to the code extracted from the flash model, the second |
1382 |
\family typewriter |
1383 |
FOR |
1384 |
\family default |
1385 |
loop creates the desired array by aliasing the array element |
1386 |
\family typewriter |
1387 |
phase[j] |
1388 |
\family default |
1389 |
with the phase model created within the corresponding |
1390 |
\family typewriter |
1391 |
smt |
1392 |
\family default |
1393 |
instance. |
1394 |
\end_layout |
1395 |
|
1396 |
\begin_layout Standard |
1397 |
\begin_inset Marginal |
1398 |
status open |
1399 |
|
1400 |
\begin_layout Standard |
1401 |
disappearing phases |
1402 |
\begin_inset LatexCommand \index{disappearing phases} |
1403 |
|
1404 |
\end_inset |
1405 |
|
1406 |
|
1407 |
\end_layout |
1408 |
|
1409 |
\end_inset |
1410 |
|
1411 |
The multi-phase model handles the case where a phase disappears by using |
1412 |
a complementarity |
1413 |
\begin_inset LatexCommand \index{complementarity} |
1414 |
|
1415 |
\end_inset |
1416 |
|
1417 |
formulation. |
1418 |
This formulation relaxes the constraint for a phase that its mole fractions |
1419 |
must sum to unity when it disappears. |
1420 |
Thus the vapor/liquid model will correctly alter the model to handle the |
1421 |
situation when the mixture becomes a superheated vapor or a subcooled liquid. |
1422 |
\end_layout |
1423 |
|
1424 |
\begin_layout Standard |
1425 |
We are now ready to create an instance of a thermodynamics model. |
1426 |
When compiled this instance contains all the equations needed to estimate |
1427 |
the phase conditions for a multi-phase, multi-component mixture assuming |
1428 |
equilibrium exists among the phases. |
1429 |
The following line of code, extracted from the stream model referred to |
1430 |
above, illustrates its use: |
1431 |
\end_layout |
1432 |
|
1433 |
\begin_layout LyX-Code |
1434 |
state IS_A thermodynamics(cd, pd, phase, equilibrated); |
1435 |
\end_layout |
1436 |
|
1437 |
\begin_layout Standard |
1438 |
where |
1439 |
\family typewriter |
1440 |
cd |
1441 |
\family default |
1442 |
is an instance of a |
1443 |
\family typewriter |
1444 |
components_data model |
1445 |
\family default |
1446 |
, |
1447 |
\family typewriter |
1448 |
pd |
1449 |
\family default |
1450 |
of a |
1451 |
\family typewriter |
1452 |
phases_data |
1453 |
\family default |
1454 |
model, |
1455 |
\family typewriter |
1456 |
phase |
1457 |
\family default |
1458 |
an array of instances of |
1459 |
\family typewriter |
1460 |
phase_partials |
1461 |
\family default |
1462 |
, and |
1463 |
\family typewriter |
1464 |
equilibrated |
1465 |
\family default |
1466 |
a |
1467 |
\family typewriter |
1468 |
boolean |
1469 |
\family default |
1470 |
variable. |
1471 |
When |
1472 |
\family typewriter |
1473 |
equilibrated |
1474 |
\family default |
1475 |
is |
1476 |
\family typewriter |
1477 |
FALSE |
1478 |
\family default |
1479 |
, the model will generate the equations assuming constant relative volatilities |
1480 |
(the user must estimate these volatilities). |
1481 |
When |
1482 |
\family typewriter |
1483 |
TRUE |
1484 |
\family default |
1485 |
, the model generates the equations assuming the chemical potentials for |
1486 |
a component are equal in all phases. |
1487 |
\end_layout |
1488 |
|
1489 |
\begin_layout Section |
1490 |
Using the thermodynamics models |
1491 |
\end_layout |
1492 |
|
1493 |
\begin_layout Standard |
1494 |
There are several libraries of models that use the libraries we have just |
1495 |
described. |
1496 |
The first library to examine is |
1497 |
\family typewriter |
1498 |
stream_holdup.a4l |
1499 |
\family default |
1500 |
. |
1501 |
This library contains steady-state models for a stream and a holdup. |
1502 |
The following gives the parameter list for a user to create an instance |
1503 |
of a stream. |
1504 |
\end_layout |
1505 |
|
1506 |
\begin_layout Subsection |
1507 |
Streams |
1508 |
\begin_inset LatexCommand \index{streams} |
1509 |
|
1510 |
\end_inset |
1511 |
|
1512 |
and holdups |
1513 |
\begin_inset LatexCommand \index{holdups} |
1514 |
|
1515 |
\end_inset |
1516 |
|
1517 |
|
1518 |
\end_layout |
1519 |
|
1520 |
\begin_layout LyX-Code |
1521 |
MODEL stream ( |
1522 |
\end_layout |
1523 |
|
1524 |
\begin_layout LyX-Code |
1525 |
cd WILL_BE components_data; |
1526 |
\end_layout |
1527 |
|
1528 |
\begin_layout LyX-Code |
1529 |
pd WILL_BE phases_data; |
1530 |
\end_layout |
1531 |
|
1532 |
\begin_layout LyX-Code |
1533 |
equilibrated WILL_BE boolean; |
1534 |
\end_layout |
1535 |
|
1536 |
\begin_layout LyX-Code |
1537 |
) REFINES sh_base; |
1538 |
\end_layout |
1539 |
|
1540 |
\begin_layout Standard |
1541 |
The model |
1542 |
\family typewriter |
1543 |
sh_base |
1544 |
\family default |
1545 |
is a dummy model to tie all models into this library back to a common root |
1546 |
model. |
1547 |
The user need do nothing because of this refinement. |
1548 |
What you should note is that all you need to do to create a stream is create |
1549 |
a |
1550 |
\family typewriter |
1551 |
components_data |
1552 |
\family default |
1553 |
model and a |
1554 |
\family typewriter |
1555 |
phases_data |
1556 |
\family default |
1557 |
model. |
1558 |
One supplies the boolean variable |
1559 |
\family typewriter |
1560 |
equilibrated |
1561 |
\family default |
1562 |
as a variable that one can set interactively or in a method or a script |
1563 |
when running the model to decide how to model equilibrium, as we have discussed |
1564 |
above. |
1565 |
A holdup is equally as easy to model. |
1566 |
\end_layout |
1567 |
|
1568 |
\begin_layout Subsection |
1569 |
Flash units |
1570 |
\begin_inset LatexCommand \index{flash units} |
1571 |
|
1572 |
\end_inset |
1573 |
|
1574 |
and variants thereof |
1575 |
\end_layout |
1576 |
|
1577 |
\begin_layout Standard |
1578 |
From streams and holdups, we can move on to unit operation models. |
1579 |
The library |
1580 |
\family typewriter |
1581 |
flash.a4l |
1582 |
\family default |
1583 |
provide us with a flash model. |
1584 |
The parameter list for the flash model is: |
1585 |
\end_layout |
1586 |
|
1587 |
\begin_layout LyX-Code |
1588 |
MODEL vapor_liquid_flash |
1589 |
\begin_inset LatexCommand \index{vapor\_liquid\_flash} |
1590 |
|
1591 |
\end_inset |
1592 |
|
1593 |
( |
1594 |
\end_layout |
1595 |
|
1596 |
\begin_layout LyX-Code |
1597 |
Qin WILL_BE energy_rate; |
1598 |
\end_layout |
1599 |
|
1600 |
\begin_layout LyX-Code |
1601 |
equilibrated WILL_BE boolean; |
1602 |
\end_layout |
1603 |
|
1604 |
\begin_layout LyX-Code |
1605 |
feed WILL_BE stream; |
1606 |
\end_layout |
1607 |
|
1608 |
\begin_layout LyX-Code |
1609 |
vapout WILL_BE stream; |
1610 |
\end_layout |
1611 |
|
1612 |
\begin_layout LyX-Code |
1613 |
liqout WILL_BE stream; |
1614 |
\end_layout |
1615 |
|
1616 |
\begin_layout LyX-Code |
1617 |
) WHERE ( |
1618 |
\end_layout |
1619 |
|
1620 |
\begin_layout LyX-Code |
1621 |
feed, vapout, liqout WILL_NOT_BE_THE_SAME; |
1622 |
\end_layout |
1623 |
|
1624 |
\begin_layout LyX-Code |
1625 |
feed.cd, vapout.cd, liqout.cd WILL_BE_THE_SAME; |
1626 |
\end_layout |
1627 |
|
1628 |
\begin_layout LyX-Code |
1629 |
vapout.pd.phase_indicator == 'V'; |
1630 |
\end_layout |
1631 |
|
1632 |
\begin_layout LyX-Code |
1633 |
liqout.pd.phase_indicator == 'L'; |
1634 |
\end_layout |
1635 |
|
1636 |
\begin_layout LyX-Code |
1637 |
(feed.pd.phase_indicator IN ['V','L','VL','VLL']) == TRUE; |
1638 |
\end_layout |
1639 |
|
1640 |
\begin_layout LyX-Code |
1641 |
) REFINES flash_base; |
1642 |
\end_layout |
1643 |
|
1644 |
\begin_layout Standard |
1645 |
Again we see that to create a flash unit, we need to create the variable |
1646 |
|
1647 |
\family typewriter |
1648 |
Qin |
1649 |
\family default |
1650 |
for the heat input to the unit, a boolean |
1651 |
\family typewriter |
1652 |
equilibrated |
1653 |
\family default |
1654 |
and three streams, |
1655 |
\family typewriter |
1656 |
feed |
1657 |
\family default |
1658 |
, |
1659 |
\family typewriter |
1660 |
vapout |
1661 |
\family default |
1662 |
and |
1663 |
\family typewriter |
1664 |
liqout |
1665 |
\family default |
1666 |
. |
1667 |
The three streams must all be different streams. |
1668 |
They must have the same components in them. |
1669 |
The stream |
1670 |
\family typewriter |
1671 |
vapout |
1672 |
\family default |
1673 |
must be a vapor stream and the stream |
1674 |
\family typewriter |
1675 |
liqout |
1676 |
\family default |
1677 |
a liquid stream. |
1678 |
The |
1679 |
\family typewriter |
1680 |
feed |
1681 |
\family default |
1682 |
stream can be of any kind. |
1683 |
\end_layout |
1684 |
|
1685 |
\begin_layout Standard |
1686 |
Hopefully with the above information, creating a flash unit should not now |
1687 |
seem particularly difficult. |
1688 |
\end_layout |
1689 |
|
1690 |
\begin_layout Standard |
1691 |
If you examine this library further, you will see it contains models which |
1692 |
are variations of the flash unit for: |
1693 |
\family typewriter |
1694 |
detailed_tray |
1695 |
\family default |
1696 |
, |
1697 |
\family typewriter |
1698 |
tray |
1699 |
\family default |
1700 |
, |
1701 |
\family typewriter |
1702 |
feed_tray |
1703 |
\family default |
1704 |
, |
1705 |
\family typewriter |
1706 |
total_condenser |
1707 |
\family default |
1708 |
and |
1709 |
\family typewriter |
1710 |
simple_reboiler |
1711 |
\family default |
1712 |
. |
1713 |
\end_layout |
1714 |
|
1715 |
\begin_layout Subsection |
1716 |
Distillation columns |
1717 |
\begin_inset LatexCommand \index{Distillation columns} |
1718 |
|
1719 |
\end_inset |
1720 |
|
1721 |
|
1722 |
\end_layout |
1723 |
|
1724 |
\begin_layout Standard |
1725 |
We provide two libraries that allow you to model distillation columns: |
1726 |
\family typewriter |
1727 |
column.a4l |
1728 |
\family default |
1729 |
|
1730 |
\begin_inset LatexCommand \index{column.a4l} |
1731 |
|
1732 |
\end_inset |
1733 |
|
1734 |
and |
1735 |
\family typewriter |
1736 |
collocation.a4l |
1737 |
\family default |
1738 |
|
1739 |
\begin_inset LatexCommand \index{collocation.a4l} |
1740 |
|
1741 |
\end_inset |
1742 |
|
1743 |
. |
1744 |
The library |
1745 |
\family typewriter |
1746 |
column.a4l |
1747 |
\family default |
1748 |
first models a tray stack and then a simple column using that model. |
1749 |
A third model extracts the profiles for pressure, temperature, a parameter |
1750 |
that indicates the deviation from constant molar overflow conditions, total |
1751 |
vapor and liquid flows and component compositions against tray number. |
1752 |
This information may then be used for plotting these profiles using the |
1753 |
ASCEND plotting capability. |
1754 |
\end_layout |
1755 |
|
1756 |
\begin_layout Standard |
1757 |
The library |
1758 |
\family typewriter |
1759 |
collocation.a4l |
1760 |
\family default |
1761 |
provides collocation models for simple columns. |
1762 |
With collocation models, one models composition profiles as smooth functions |
1763 |
of tray number in a column section. |
1764 |
Columns with a large number of trays are modeled with relatively small |
1765 |
collocation models. |
1766 |
Also the number of trays becomes a continuous variable, aiding in optimization |
1767 |
studies where the number of trays in each section is to be computed. |
1768 |
\end_layout |
1769 |
|
1770 |
\begin_layout Subsection |
1771 |
Dynamic unit models |
1772 |
\end_layout |
1773 |
|
1774 |
\begin_layout Standard |
1775 |
ASCEND contains models for simulating the dynamic behavior of units. |
1776 |
Their use is described in Chapter |
1777 |
\begin_inset LatexCommand \vref{cha:ivp} |
1778 |
|
1779 |
\end_inset |
1780 |
|
1781 |
. |
1782 |
\end_layout |
1783 |
|
1784 |
\begin_layout Section |
1785 |
Discussion |
1786 |
\end_layout |
1787 |
|
1788 |
\begin_layout Standard |
1789 |
We have presented a description of the libraries that allow one to model |
1790 |
the equations providing thermodynamic properties for multi-component, multi-pha |
1791 |
se mixtures when one assume equilibrium exists among co-existing phases. |
1792 |
With this description, we hope that these models become much less difficult |
1793 |
to use. |
1794 |
We end this chapter by describing other libraries that build on the property |
1795 |
estimation libraries, models for streams and holdups, for flash units and |
1796 |
variations thereof, and for columns. |
1797 |
\end_layout |
1798 |
|
1799 |
\end_body |
1800 |
\end_document |