You are on page 1of 15

13

Fluid Phase Equilibria, 33 (1987) 13-27

Elsevier Science Publishers B.V., Amsterdam -

MULTIPHASE ISENTHALPIC
ALGORITHMS

Printed in The Netherlands

AND ISENTROPIC

FLASH

MICHAEL L. MICHELSEN
Instituttet for Kemiteknik

(Received July 181986;

Bygning 229, DTH, Lundtoftevej 100, DK-2800 Lyngby (Denmark)

accepted in final form October 17, 1986)

ABSTRACT
Michelsen, M.L., 1987. Multiphase isenthalpic and isentropic flash algorithms. Fluid Phase
Equilibria, 33: 13-27.

Algorithms for calculation of multiphase equilibria at given pressure and enthalpy or


entropy using a single Equation of State as the thermodynamic model are described. The
algorithms are extensions of earlier work on specified pressure and temperature and likewise
uses stability analysis for generation of initial estimates and minimization procedures for
calculating phase splits corresponding to a fixed number of phases. The extension of the
isothermal flash algorithm to specifications of enthalpy and entropy results in a more
complex procedure which essentially maintains the efficiency of the algorithm for the
isothermal case. Special precautions required for specification of enthalpy and entropy are
described.

INTRODUCTION

Flash calculation at specified pressure and enthalpy (the isenthalpic flash)


or pressure and entropy (the isentropic flash) have received much less
attention than flash calculation at specified pressure and temperature (the
isothermal flash). In addition, current procedures for isenthalpic flash calculation (see, e.g., Boston and Britt, 1979; Prausnitz et al., 1980) are, judging
from the example prescribed, mainly developed for two-phase systems,
where different models are used for the fluid phases. This study describes
how the stepwise procedure of Michelsen (1982a, 1982b) for the isothermal
flash, based an alternate use of stability analysis and phase split calculations, can be adapted for general multiphase adiabatic and isentropic flash
calculations with mixtures described by a single equation of state. We shall
assume familiarity with this earlier work and limit the present treatment to
situations where a different approach is required, using specification of
pressure and enthalpy as an example.
0378-3812/87/$03.50

0 1987 Elsevier Science Publishers B.V.

14
STABILITY

ANALYSIS

The procedure suggested by Michelsen (1982a) for stability analysis at


fixed T and P is used. With specified mixture composition, pressure and
enthalpy an initial determination of the temperature, at which the mixture as
a single phase matches the specified enthalpy, is required.
Figure 1 shows enthalpy in dependence of temperature for a mixture of
50% methane and 50% ethane at 60 Atm. The SRK-equation (Soave, 1972)
is used to calculate all thermodynamic properties, and the reference for
enthalpy is chosen such that the enthalpy for an ideal gas equals zero at
0C. Ideal gas heat capacities are represented by 4th degree temperature
polynomials (Reid et al., 1977).
It is observed that enthalpy increases monotonically with temperature for
this mixture, which at all temperatures exhibits only a single root for the
compressibility factor equation. Hence the temperature corresponding to
any specified enthalpy is easily located.

H/R

210

(K)

220

230

240

250

260

270
T(K)

Fig. 1. Molar enthalpy


and ethane at 60 Atm.

in dependence

of temperature

for an equimolar

mixture

of methane

15
H/R

(K)

-500

-1000

-1500
210

220

230;

240

250

260

270

280
T(K)

Fig. 2. Molar enthalpy in dependence of temperature for an equimolar mixture of methane


and ethane at 30 Atm.

The enthalpy/temperature
variation for the same mixture at 30 Atm. is
shown in Fig. 2. Now three roots for the compressibility factor are found in
the interval 223.7 K < T < 240.1 K, yielding the two branches of the curve
corresponding to the liquid-like and the vapour-like root, respectively. At
temperatures below T * = 233.0 K the liquid state has the lower Gibbs
energy, and above T * the vapour phase is the more stable. At the transition
temperature T = T* the enthalpies of the two phases are H/R = - 1165 K
and H/R = - 455 K, respectively.
If the specified enthalpy is outside this interval, determination of the
corresponding temperature is straightforward, and for a specification in the
interval (- 1165 to - 455 K) the transition temperature is used as the initial
temperature estimate for the subsequent phase split calculation. In this latter
situation the system is known to form (at least) two phases at equilibrium,
and stability analysis is not required.
Therefore, the outcome of the initial temperature search is either a
temperature, at which P-T stability analysis can be performed, or the

16

transition temperature T *, where the mixture is known to be unstable. In


case of instability we use as initial esmpmitisn &mates for the new phases
either feed composition and the incipient phase composition from stability
analysis or (at T*) two phases of identical composition but with different
molar volumes.
In the pre$ent study T* was determined to a relative accuracy of 10e6
using Newtons method, This very accurate determination is probably not
necessary, and it is likely that gy temperature yielding two states with
enthalpies that bracket the specified enthalgy can be used.
SIMPLIFIED

PHASE SPLIT CALClJLATKRd

We shall refer to the procedure described in this section as the direct


substitution method since it is very similar to the well known direct
substitution (or successive substitution) method for the isothermal flash. In
particular, bQth methods implicitly assume ideal behaviour in the fluid
phases, and this asgumption permits a reduction of the number of dependent
variables to M for an M-pha8e system for the isenthalpic flash.
We consider 1 mole of feed of composition z and take as independent
variables M - 1 phase mole fractions ( flj being the number of moles in
phase j per mole of feed), in addition to the M-th variable, temperature.
Defining equilibrium factors by

(1)

Kij = Yij/YiM

where yti is the mole fraction of component


material balances
YiM

i in phase j, we obtain from

i/Si >

(2)

with
M-l

si=l+

4(Ku-l)

j=l

(3)

M - 1 independent equations are obtained from the condition that mole


fractions must sum to unity, i.e.

The equilibrium factors must satisfy

(5)
where 9, is the fugacity coefficient of component i in phase j.

17

If W%&ssume that fugacity coefficients for the individual phases depend


on temperature only, it is evident that only A4 independent variables are
required for evaluation of the gj. In addition the phase mole numbers nij are
given by
j =
1,2,
...) (A4 - 1)
nij=Bj_Yb
=Pj(Zi/li)KijY
(6)
M-l

withp,=l-

niM = P,tfyi,b,f = i/liPM?

C Pj

(7)

j=l
M

it is readily verified, that c nij = zi, irrespective of the values of the pj

and

j=l

and the K,.


The remaining equation is the enthalpy balance, which can be written
g, =

(8)

H - Hspec
=
i=l

j=l

where h, is the partial molar enthalpy of component i in phase j.


The partial molar enthalpy can be evaluated from the temperature derivative of the fugacity coefficients
Aij = i, ideal - RT*a In +ij/aT
where hi idealis the ideal gas enthalpy of component i. In addition

(9)

hQ - hiM = RT*( 3 In &&IT - 8 In cpij/aT) = RT*a In K,/aT


(10)
The set of M equations is solved by the Newton-Raphson
Method. The
elements of the Jacobian matrix are given by
=

a8j/aP,

agk/a/3j

&,(K,-l)(K,-l)/~;(j,k=l,2,...,(M-1))

i=l

01)
and
agj/aT=

l/(RT2)agM/Wj=

E z,(K&l In K,/U-((K,

- l)/&)T

*)/li

i=l
(12)

where
M-l
7:

In K,/aT

2 flkqka
k=l

(13)

Finally,
%+I
w=

&,c,
k=l

k+ f

&,+

i=l k-l

where CP, k is the molar heat capacity of phase k.

18

The last term is rewritten

Since f
( h,

nik = zi, the last term equals zero, and substituting

eqn. (10) for

k=l

- hiM) we arrive after some algebra at

%Vf
m
= E B,C~,,+RT~Zi/t(~~*-((~~,/si)

(14

i=l

k=l
M-l

where 7:* = c

PkKik(a In K,/~IIT)~

05)

k-l

The iterations proceed as follows, given an initial phase distribution


and an initial temperature T(O):
(1) Evaluate bj = i

n$y)

n r), j = 1, 2, .... M. For each phase, calculate In +ij

i=l

and a ln+,/aT
and the phase heat capacities. Evaluate K$), functions gj,
j=l,2 , .... M and the Jacobian matrix.
(2) Solve the set of M equations for pj and AT.
(3) Take fi; = /Ij + Afij, j = 1, 2, .... M, and In K; = lnK$) +
(a In K,SO/aT)AT and determine new phase mole numbers n@ from eqns.
(6) and (7). Take T () = T(O)+ AT and return to step (1)
For an ideal mixture convergence is quadratic, and for non-ideal mixtures
convergence is only linear with the rate of convergence determined by the
degree of nonlinearity. Convergence properties can be analysed qualitatively
as described in Michelsen (1982b). The essential result of this analysis is that
the convergence properties for the isenthalpic flash closely resemble those
for the isothermal flash, with two eigenvalues approaching 1 at the critical
point. Similarly, convergence will take place only to a stationary point which
is a local maximum in entropy.
The existence of eigenvalues of unit magnitude at the critical point and
consequently slow convergence in the critical region indicates that acceleration is advantageous. We advocate the use of the General Dominant
Eigenvalue Method (GDEM) of Crowe and Nishio (1975), using GDEM
with two terms after each five steps of direct substitution. The vector of
variables used for the extrapolation is the set of (M - 1) *N In K,, and the
temperature.
Figure 3 shows the iteration course for unaccelerated direct substitution
for the 5-component mixture listed in Table 1 at P = 50 Atm., H,,,,/R
=
-800 K. For comparison the iteration course for the same mixture at

19
A log lel

15

10

20

Iteration no.

!!K

-6 --

Fig. 3. Error (in phase fraction) vs. iteration number for isenthalpic flash of the Scomponent
mixture in Table 1.

TABLE I
Composition

of example Scomponent

mixture

Component

Mole fraction

CI

0.66
0.03
0.01
0.05
0.25

c2

C3
CO2
H2S

log lel

10

15

20

Iteration no.
c

-2-- <

-4--

-1,

-6--

-E-

Fig. 4. Error (in phase fraction) vs. iteration number for isothermal flash of the 5-component
mixture in Table 1.

20

-a 1
Fig. 5. Error (in phase fraction) vs. iteration number for isenthalpic flash of the 5-component
mixture in Table 1, using GDEM for acceleration.

specified P and T with a temperature identical to that obtained as the


solution for the isenthalpic problem (T = 233.37 K) is given in Fig. 4. It is
observed that the plots of the logarithm of the error (in phase mole fraction)
vs. the iteration count are linear and of almost identical slope. Finally Fig. 5
shows the error plot for the isenthalpic calculation of Fig. 3 using GDEM
acceleration.
Each individual iteration requires evaluation of the component fugacity
coefficients and their temperature derivatives and, in addition, the phase
heat capacities. It is frequently possible to obtain satisfactory convergence
using approximate values for the heat capacities (e.g., the easily evaluated
ideal gas heat capacity), but the rate of convergence can be adversely
affected, in particular in the critical region. A reasonable compromise is to
evaluate residual heat capacities at the beginning of each acceleration cycle
only, i.e., once for every five iterations.
SPECIAL PROBLEMS

In most cases the temperature T co) found in the initial stability analysis
differs from the final equilibrium temperature by less than 30 K. In certain
situations, however, a much larger deviation is observed, and special precautions are required. One example is given in Table 2, where initial and final
temperatures are listed in dependence of the specified enthalpy for an
equimolar mixture of isobutane and water at P = 10 Atm.
The tremendous difference between T(O) and Tceqn) is due to a peculiarity
of the thermodynamic model. The system at equilibrium contains a phase
consisting of essentially pure water, for which the enthalpy is negative and
numerically large. In the (hypothetical) feed mixture of water and isobutane,

21
TABLE 2
Initial aad equilibrium temperature in dependence of specified enthalpy for an equimolar
mixture of isobutane and water at 10 Atm

Hspec
/R

T(o)

T(W)

WI

(W

No. of phases
at equilibrium

-2400
- 2600
- 2800
-3000
-3200

249
214
179
144
111

367
348
338
338
338

2 (LV
2 (LV
3 (LLV
3 (LLV)
3 (LLV)

however, the partial molar enthalpy of water is much higher than the molar
enthalpy of pure water at the same temperature. The reason is that the
magnitude of the enthalpy is essentially determined by the temperature
derivative of the a-parameter of the SRK-equation, and in mixture with
isobutane the binary interaction coefficient of about 0.5 strongly reduces the
value of a.
Some estimate for the mixture equilibrium temperature is usually available and, e.g., for the case of an enthalpy specification of H&R
= - 2600
K, one would not suspect an equilibrium temperature lower than, say, 150
K. If a lower limit for the equilibrium temperature, T,,, can be specified we
recommend that stability analysis is performed at T,,, whenever H( T,,) >
H Spec.
If the mixture is unstable, a crude phase split is performed. For the
water-isobutane mixture this will result in two phases of essentially pure
water (ice) and pure isobutane, respectively, and with an enthalpy H,(T,,)
< Hspec Hence the phase split calculation can be continued from 7,,
taking the phase compositions from the phase split at T,, as initial
estimate.
For our mixture at H,,,/R = -2600 K, only a few iterations are
required to arrive at the equilibrium state, a liquid phase of essentially pure
water and a vapour phase rich in isobutane.
Changing the specification to Hs.JR = - 3000 K introduces a new
problem: now it becomes impossible to determine a two-phase solution with
the specified enthalpy. Below about 338 K the two phases are liquid, with a
total enthalpy lower than the specification and above 338 K we obtain a
liquid phase (water) and a vapour phase (isobutane) with a total enthalpy
higher than the specification. As a consequence the direct substitution
procedure leads to strong oscillations in temperature.
Such problems can be expected whenever a single phase is very narrowboiling. The indication for this phenomenon is the strong temperature
oscillations during the phase split calculation, and the suggested remedy is

22

to search for an additional phase. The phase, which oscillates between liquid
and vapour state, is split into two phases of initially equaly amount and
composition, for which during subsequent iterations the high density root of
the compressibility equation is selected for the one phase and the low
density root for the other. For the isobutane-water mixture the final result
at H,,,,/R = - 3000 K is three phases, liquid water, liquid isobutane and a
vapour rich in isobutane.
This approach for selecting the compressibility factor contrasts with that
used for the isothermal flash, where the root yielding the lower Gibbs energy
is always chosen. However, it enables us to manage situations with very
close-boiling phases, including even pure components.
SECOND ORDER CONVERGENCE METHODS

The majority of two-phase problems and many multiphase problems are


readily solved using the accelerated direct substitution procedure with one to
three acceleration steps. The difficult cases comprise near critical mixtures,
and mixtures with multiple liquid phases, where these are not highly
immiscible. For such systems final convergence is better achieved using a
second order convergence method.
Newtons method is easy to implement and requires that in addition to
the thermodynamic property evaluations used for direct substitution that
partial composition derivatives of fugacity coefficients are evaluated. The
most important disadvantage of Newtons method is that convergence
cannot be guaranted from arbitrary initial estimates, and even the initial
estimates obtained using direct substitution prior to the application of
Newtons method may be unsatisfactory.
This disadvantage can be overcome provided the equilibrium calculation
can be formulated as a minimization problem, like the isothermal flash,
which can be solved by minimizing the Gibbs energy. The isenthalpic and
the isentropic flash can both be formulated as constrained minimization
problems, namely
Min( - S) subject to H = Hspec

(16)

for the isenthalpic flash, and


Min H subject to S = SSPec,

(17)

for the isentropic flash.


In contrast, using molar amounts nti in M - 1 phases as the independent
variables, the isothermal flash is an unconstrained minimization problem.
The essential advantage of the minimization formulation is that the value
of the objective function can be used as a measure of progress during the

23

iterative solution. For constrained minimizations it is, however, necessary to


satisfy the constraints to evaluate the objective function. This could be
accomplished, e.g., by treating the system temperature as a dependent
variable, which for a given phase distribution is adjusted to satisfy the
constraint. Additional computation would thus be required, and it is more
advantageous to treat the temperature as an independent variable rather
than as a dependent variable by transforming the minimization to an
unstrained problem. To accomplish this, we show that the objective functions, eqns. (16) and (17) can be augmented in a simple manner such that at
a minimum of the augmented objective function (1) also the original
objective function is minimized and (2) the constraint is satisfied.
A tempting choice of the augmented objective function for the isenthalpic
flash is

(H - TH,,,) = G- TKpec

Q=-S+

(18)

We observe that (treating molar flows in phase M as dependent


-

aQ

an, =

variables)

0%

+(Pij-PiM)

and

aQ
-=
aT

+S=-+I-Hs,,ec)

-+(G-H,,)-

At a stationary point of Q (derivatives with respect to all independent


variables equal to zero) the equality of chemical potentials condition for
equilibrium, as well as the constraint, are satisfied.
Unfortunately, Q is not minimal at the stationary point, since

(21)
i.e., the Hessian is not positive definite.
We therefore add a term proportional
thalpy

+(H-H,,,)2=

Q *=Q+

to the squared deviation in en-

G-* ++#w&,,)2

(24

where (Yis a constant.


It is readily verified that a stationary point of Q is also a stationary point
of Q *. In addition

*
( I
a'Q

u2

SP

=(za-l)S

(23)

24

and it can be shown that a minimum of eqn. (16) corresponds to a minimum


of eqn. (23) provided that we choose (Y> Q (Michelsen, 1982c). Choosing a
large value of (Y corresponds to strongly emphasizing satisfaction of the
constraint, while a value of a close to 0.5 entails a slight risk of locating
minima of eqn. (23) which are not minima of eqn. (16). Michelsens
recommended choice is (Y= 1.
For the isentropic flash, the corresponding augmented objective function
is
Q *=G+TS,,,+a~(S-S,,,)2
P

Our proposed second order convergence method is therefore to use the


method of Murray (1972) for unconstrained minimization, with the objective
functions eqns. (20) and (24). Terms proportional to (H - Hs.e,)2 (or
(S - S,,))
can be neglected in the gradient, and terms proportional to
H - Hspec (or S - %rec) can be neglected in the Hessian without adverse
effects on the convergence properties. Hence no additional derivatives, as
compared with Newtons method, are required.
As initial estimates for the minimization, the set of conditions yielding the
smallest value of the objective function during the direct substitution procedure are used. Usually this will correspond to the outcome of the last
acceleration step, but occasionally, when acceleration fails, an earlier iterate
is chosen.
EXAMPLES

To describe the performance of the suggested method we have selected


three difficult examples investigated earlier for the isothermal flash (Michelsen, 1982b). In addition to the feed mixture listed in Table 3, we specify
pressure and enthalpy corresponding to the final solution for the previous
examples. The resulting equilibrium phase compositions hence become iden-

TABLE 3
Composition

of example 6-component

mixture

Component

Mole fraction

N*
CI

0.3040
0.5479
0.0708
0.0367
0.0208
0.0198

c2
c3

n-C*
n-C,

25
TABLE 4
Intermediate and final temperature and phase distribution
for the 6-component mixture of Table 3

for isenthalpic flash calculation

Phases present

No. of Murray
iterations

(b) ::

Temperature
(K)
151.22
150.53
150.90
153.65

LV
LLV
(c) L

151.66
151.70
171.77

LL
LLV

169.00
169.00

(a) L
L\c

(a) P=40.0 Atm, H&R


= -1470.75
K
(b) P=40.0Atm, F&/R=
- 1451.94 K
(c) P = 60.5
Atm, H&R
= -1304.53 K

tical to those given earlier (Michelsen, 1982b), and in Table 4a-c only
temperature and the number of Murray iterations required for the intermediate and the final equilibrium calculations are presented.
Comparison with the earlier results show that roughly an identical number of iterations is required for the P-T and the P-H specifications. The
computing time for the isenthalpic flash exceeds that of the isothermal flash
by about 40%, due to the requirement for evaluation of temperature derivatives and to the special precautions required for determining the temperature.
THE ISENTROPIC CASE

With specification of entropy and pressure the procedure is very similar


to that for the isenthalpic calculation. Convergence properties for direct
substitution are essentially identical for the two specifications, and even the
elements of the Jacobian become identical, if we take g, = T( S - S,,,,).
For the three examples above, the computing time and the number of
Murray iterations for specified P and S equal those for specified P and H.
The temperature excursions observed with the isobutane-water example are,
however, somewhat less severe.
CONCLUSION

The algorithms described earlier (Michelsen, 1982b, c) for isothermal


flash calculations using alternately stability analysis and phase split calcula-

26

tion by minimization can be adapted to specification of pressure and


enthalpy-entropy.
The computational efficiency for the isenthalpic and
isentropic calculations is comparable with that for the isothermal case,
considering that additional thermodynamic properties are required. The
algorithms, however, become somewhat more complex due to the requirements for an initial temperature determination and for the need to be able
to handle very close-boiling phases, where small changes in temperature
involve drastic changes in enthalpy or entropy.
The very general approach with no initial assumptions about the nature of
the individual components or about the final phase distribution clearly has a
price. This is evident from the isobutane-water
example where rather
elaborate procedures are required to obtain the solution to a rather simple
problem. More efficient algorithms, based on principles similar to those
described here can certainly be developed for problems where some advance
knowledge of the expected behaviour of the equilibrium state is available.
LIST OF SYMBOLS

cP

El
H spec
hij

i
j, k
Kij
M
N
n ij

P
R
S
s SpEX
T
Yij
i

heat capacity
discrepancy function, eqns. (4) and (8)
mixture enthalpy
specified enthalpy
partial molar enthalpy of component i, phase j
component index
phase indices
equilibrium factor for component i in phase j
total number of phases
total number of components
number of moles of component i in phase j
pressure (Atm.)
gas constant
mixture entropy
specified entropy
temperature (K)
mole fraction of component i in phase j
mole fraction of component i in feed

Greek letters

;.
SJ

parameter of objective function eqn. (22)


phase mole fraction of phase j
sum defined by eqn. (3)

27

Qi

Pij
ri *
7.1**

fugacity coefficient of component i in phase j


chemical potential of component i in phase j
sum defined by eqn. (13)
sum defined by eqn. (15)

REFERENCES
Boston, J.F. and Britt, H.I., 1978. A radically different formulation
and solution of the
single-stage flash problem. Comput. Chem. Eng., 2: 109-122.
Crowe, A.M. and Nishio, M., 1975. Convergence promotion in the simulation of chemical
processes - the general dominant eigenvalue method. AIChE J., 21, 528-533.
Michelsen, M.L., 1982a. Minimization methods for flash calculation. Part I: General considerations. Report SEP 8205, Instituttet for Kemiteknik.
Michelsen, M.L., 1982b. The isothermal flash problem. I. Stability analysis. Fluid Phase
Equilibria, 8: 1-19.
Michelsen, M.L., 1982~. The isothermal flash problem. II. Phase-split
calculation. Fluid
Phase Equilibria, 8: 21-40.
Murray, W., 1972. Second derivative methods. In: W. Murray (Editor), Methods for Unconstrained Optimization, Academic Press, London.
Prausnitz, J.M., Anderson, T., Grens, E., Eckert, C., Hsieh, H. and OConnell, J., 1980.
Computer Calculations for Multicomponent
Vapor-Liquid
and Liquid-Liquid
Equilibria.
Prentice-Hall, New Jersey, Chapter 7.
Reid, R.C., Prausnitz, J.M. and Sherwood, T.K., 1977. The Properties of Gases and Liquids.
McGraw-Hill, New York.
Soave, G., 1972. Equilibrium constants from a modified Redlich-Kwong
equation of state.
Chem. Eng. Sci., 27: 1197-1203.