a quasi-newton algorithm for solving multi phase equilibrium flash problems

22
Downloaded By: [Virginia Tech./University Libraries] At: 20:05 22 July 2007 Chem. Eng. Cornmun. Vol. 8, pp. 305-326 0 Gordon and Breach. Science Publishers Inc.. 1981 0098-644518 1 /1)804-0305506.50/0 Printed in the U SA. A QUASI-NEWTON ALGORITHM FOR SOLVING MULTIPHASE EQUILIBRIUM FLASH PROBLEMS R.L. FOURNIER Department of Chemical Engineering. The University of Toledo, Toledo. Ohio 43606 USA J.F. BOSTON Energy Laboratory Massachusetts Institute of Technology. Cambridge, M A 021 39 USA (Received Jan. 23. 1980; in final form Sepr. 25. 1980) A new algorithm has heen developed for solving the multicomponent vapor-liquid-liquid equilibrium flash problem. The alg:orithm is an extension of the "inside-out" approach proposed by Boston and Britt for the vapor-liquid equilibrium flash problem. Conventional llash algorithms use temperature, pressure, composition, and phase fraction as the problem independent variables. I n the inside-out approach a new set of independent variables is introduced i n place o f the conventional variables. The new variables are chosen to be as independent as possible of the conventional variables and as free as possible of mutual interaction. Complex phase equilibrium models are used only to generate parameters for a simple equilibrium ratio model. These parameters become the problem independent v;wiables. The Quasi-Newton method of Broyden is employed to promote convergence o f these variables. The algorithm first obtains a solution for the vapor-liquid equilibrium flash. By examining the liquid phase, a heuristic algorithm is employed which quickly locates a two liquid phase composition region of reduced total system free energy when the original liquid is unstable. The solution of the vapor-liquid-liquid equilibrium flash is initiated only when this occurs. The performance of the algorithm is demonstrated by a number of problems which exhibit varying degrees of nonideality. A frequently used process unit is the vapor-liquid equilibrium flash. The flash is a process unit in which the effluent vapor is in equilibrium with one or more effluent liquid streams. The equilibrium flash is used not only to simulate an actual Rash tank, but may be used to determine unknown conditions of effluent streams and heat duties of other types of process units. Examples would be a valve, heat exchanger, reactor, compressor, etc. The possible existence of two or more liquid phases occurring simultaneously must frequently be considered in process design. The occurrence of two or more liquid phases may affect both capacity and efficiency in such operations as distillation or the pumping of liquid process streams. Thus the ability to predict the occurrence of phase instability and to handle the resulting vapor-multi-liquid equilibrium would be beneficial in computer-aided process design. The two liquid phase case is by far the most common case. Previous algorithms for

Upload: daniel-medeiros

Post on 21-Apr-2015

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

Chem. Eng. Cornmun. Vol. 8, pp. 305-326 0 Gordon and Breach. Science Publishers Inc.. 1981 0098-644518 1 /1)804-0305506.50/0 Printed in the U S A .

A QUASI-NEWTON ALGORITHM FOR SOLVING MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

R.L. FOURNIER

Department of Chemical Engineering. The University of Toledo, Toledo. Ohio 43606 U S A

J.F. BOSTON

Energy Laboratory Massachusetts Institute of Technology.

Cambridge, M A 021 39 U S A (Received Jan. 23. 1980; in final form Sepr. 25. 1980)

A new algorithm has heen developed for solving the multicomponent vapor-liquid-liquid equilibrium flash problem. The alg:orithm is an extension of the "inside-out" approach proposed by Boston and Britt for the vapor-liquid equilibrium flash problem.

Conventional llash algorithms use temperature, pressure, composition, and phase fraction as the problem independent variables. I n the inside-out approach a new set of independent variables is introduced in place o f the conventional variables. The new variables are chosen to be as independent as possible of the conventional variables and as free as possible of mutual interaction. Complex phase equilibrium models are used only to generate parameters for a simple equilibrium ratio model. These parameters become the problem independent v;wiables. The Quasi-Newton method of Broyden is employed to promote convergence o f these variables.

The algorithm first obtains a solution for the vapor-liquid equilibrium flash. By examining the liquid phase, a heuristic algorithm is employed which quickly locates a two liquid phase composition region of reduced total system free energy when the original liquid is unstable. The solution of the vapor-liquid-liquid equilibrium flash is initiated only when this occurs.

The performance of the algorithm is demonstrated by a number of problems which exhibit varying degrees of nonideality.

A frequently used process unit is the vapor-liquid equilibrium flash. The flash is a process unit in which the effluent vapor is in equilibrium with one or more effluent liquid streams. The equilibrium flash is used not only to simulate an actual Rash tank, but may be used to determine unknown conditions of effluent streams and heat duties of other types of process units. Examples would be a valve, heat exchanger, reactor, compressor, etc.

The possible existence of two or more liquid phases occurring simultaneously must frequently be considered in process design. The occurrence of two or more liquid phases may affect both capacity and efficiency in such operations as distillation or the pumping of liquid process streams. Thus the ability to predict the occurrence of phase instability and to handle the resulting vapor-multi-liquid equilibrium would be beneficial in computer-aided process design.

The two liquid phase case is by far the most common case. Previous algorithms for

Page 2: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

306 R.L. FOURNIER AND J.F. BOSTON

solving it have been unreliable and inefficient, except when the user has sufficient prior knowledge to specify when a three phase solution will exist and has good initial liquid phase composition estimates. The main purpose of the present work is to develop a new algorithm which is significantly more reliable and efficient.

Following a statement of the problem definition for a three phase flash system and a discussion of thermodynamic stability criteria, a new vapor-liquid-liquid equilibrium flash algorithm is proposed. Although the algorithm as presented is restricted to two liquid phases it may readily be extended to handle additional liquid phases. The new algorithm is used in conjunction with a new vapor-liquid equilibrium flash algorithm proposed by Boston and Britt,' of which this algorithm is an extension, and a liquid phase stability test algorithm proposed by Shah.'

The general strategy is to first obtain a solution to the vapor-liquid equilibrium flash. A heuristic algorithm developed by Shah2 is then employed which tests for stability by examining the liquid phase from this solution. When this liquid phase is unstable, the algorithm quickly locates a two liquid phase composition region of reduced total system free energy. When this occurs, the new vapor-liquid-liquid equilibrium flash algorithm is employed. If a two liquid phase composition region cannot be found to have a lower free energy than the original single liquid phase, then the vapor-liquid equilibrium solution is assumed to be valid.

The above approach has been found to have a high degree of reliability in correctly predicting either a two or three phase flash solution.

PROBLEM DESCRIPTION

The two phase flash problem description has been discussed by Boston and Britt.' Following a similar approach, the three phase flash problem will be described in this section.

Figure 1 schematically depicts the single stage, multicomponent, vapor-liquid- liquid equilibrium flash. It is evident that, for an N component system, a total of 4N + 8 variables are required to completely define the state of this system. They are z, x', x", y, F, L', L", V, T, P, Q, and H,. Some of these may be specified and the remaining determined from the describing equations.

Typically, in a simulator environment, the composition, flow rate, and condition of the feed are known. It is desired to determine the compositions, conditions, and flow rates of the vapor and liquid effluent streams. For the system of Fig. 1, if the feed composition, flow rate, and enthalpy are specified, then there remain 3N + 6 variables to be determined. The number of these variables which may be specified is obtainable by counting the number of independent describing equations.

The five types of equations required to completely describe the three phase flash are:

Phase Equilibrium:

Page 3: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

I

Z , F, HF -

t, x . L , f . P I1 I1 - - x . L , T , P

FIGURE 1 Schematic diagram of vapor-liquid-liquid equilibrium flash

Component Mass Balance:

x j L 1 + x j ' ~ " + y i V = z , F ( i = l , 2 , . . . , N )

Total Mass Balance:

L' + L" + V = F

Enthalpy Balance:

H:L' + H ~ L " + H V V = FH, + Q (4)

Constitutive:

It may be show11 that when Eqs. (2). ( 3 ) , and ( 5 ) are satisfied, the conditions Z ,X! = 1, ~ , x , ! ' - 1, and Zi y, =; I are also satisfied.

Equations 1 through 5 comprise, for an N component system, a total of 3N + 4 equations. From above it was shown that a total of 3N + 6 variables are required to completely describe I.he system. There remain two degrees of freedom in specifying the

Page 4: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

R.L. FOURNIER AND J.F. BOSTON

TABLE l

Types of single-stage vapor-liquid-liquid equilibrium flashes

Flash Specified Calculated TY pe Quantities Quantities

I Q. P T, V 11 Q. T V. P

Ill Q, v T, P I v V. T v

P. Q V. P T. Q

v I T. P V. Q All cases:

z, F. H, specified x', x", y. La, L" calculated

system. If L', L", x', x", and y are chosen to be calculated quantities, then the two degrees of freedom may be selected from amongst the four remaining variables: V, T , P, and Q.

Any two of these quantities may be specified arbitrarily, and the other two may be determined to satisfy the system describing equations. The six types of flash calcula- tions that represent all possible combinations of the specified quantities are listed in Table I.

STABILITY

For a system of constant mass, temperature, and pressure, the extremum principle provides the following criterion for stability, the Gibbs free energy of the system must have its lowest possible value. The solution of the describing equations for a vapor-liquid equilibrium flash does not require that the system Gibbs free energy have its lowest possible value. It is entirely possible that a vapor in equilibrium with more than a single liquid phase could produce an even lower Gibbs free energy for the specified flash conditions. For the purpose of this work only vapor-liquid and vapor-liquid-liquid systems are considered. As mentioned earlier, the overall approach is to first obtain a solution to the vapor-liquid equilibrium flash. The problem is to devise a method which can reliably determine whether the vapor-liquid equilibrium flash solution is stable. I f it is stable, there is no need for further calculations, if unstable, then a three phase flash solution is required.

The equilibrium of a vapor with a liquid requires equality of temperature, pressure, and specie chemical potential between the phases. Also, equilibrium only allows differential mass transfer across the phase interface. To show that the two phase solution is unstable it is necessary to find an alternative system possessing a lower system free energy than the two phase system. This alternative system is restricted in that it must be at the same temperature and pressure as the original system and there can be no gross mass transfer across the original vapor-liquid interface.

In the vapor phase all components are completely miscible and it would not be

Page 5: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

case: specified T.P (Type V I )

Case 11: Specified P, n (Type I )

FIGURE 2 Vapor-liquid equilibrium stability lest

possible to reduce its free energy by any means other than by transferring mass across the phase interface. Therefore the free energy of the vapor phase in the alternative system would be thc same as the original system. It is entirely possible to imagine the physical splitting of the liquid phase into two liquid phases. If it is possible to form a two liquid phase mixture with a free energy less than the original liquid phase, then the original liquid phase is unstable. It then follows that the vapor-liquid equilibrium is unstable since the alternative system would have a lower Gibbs free energy than the original system. Figure 2 explains more clearly the above concept. Two cases are given, the first corresponding to the type VI flash and the second the type I flash. Similar arguments pertain to the other flash types.

For case I imagine the physical separation of the vapor and liquid phases. Clearly the T, P, and H of slate 2 should be the same as the vapor-liquid equilibrium of state 1. By some method, in state 3 the liquid is split into two distinct liquid phases. Although the enthalpy of state 3 may be different, the temperature and pressure are still the same. If the free energy of the alternative system, state 3, is less than the original vapor-liquid equilibrium system of state I , then state I is unstable and cannot exist. Therefore the vapor-liquid-liquid equilibrium system of state 4 would be predicted. It

Page 6: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

R.L. FOURNIER AND J.F. BOSTON

C a l c u l a t e f r e e energy o f mixing f o r s i n g l e l i q u i d phase g' m

Generate i n i t l a l s p l i t between phase I and I 1 f o r a l l components

C a l c u l a t e A u s i n g equation ( 6 )

S o l v e 8 - 0 f o r 6 by equat ion ( 7 )

I I1 C a l c u l a t e 2 , 2 u s i n g equat ion ( 8 ) and ( 9 )

C a l c u l a t e f r e e energy o f mixing f o r tu, phase mixture where:

If g" > g ' and no. i t e r . ( 10 g o t o s t e p 8 m m

If g" > g ' and no. i t e r . > m m .

10 term " s t a b l e "

I f g" < g ' term "unstable" m m

C a l c u l a t e A from equat ion ( 6 )

Assume new X and re turn t o s t e p I

FIGURE 3 Liquid phase stability test algorithm

is important to notc that it is not necessary for the vapor and liquid phases of state 3 to be in equilibrium. All that is required for state I to be unstable is that there exists a statc 3 with a lower free energy. State 4 arises when the phases of state 3 are returned to a statc of equilibrium. If state I was shown to be unstable, then state 4 will exist. Although the equilibrium at states I and 4 have the same temperature and pressure their enthalpics are necessarily different. Case I1 follows a similar argument except that since pressure and enthalpy are specified the temperatures of states I and 4 may be dilferent.

The above heuristic approach, developed by Shah2 has been proven to have a high dcgrcc of reliability in predicting the stability of two phase flash solutions. It is applicable to any of the flash types discussed earlier since the Gibbs free energy of states 2 and 3 are compared at the same temperature and pressure.

Figure 3 outlines the liquid stability algorithm proposed by Shah.* The algorithm continues until one of the conditions in step 7 is satisfied. It is important to note that even though the iteration variable set, A, may not be converged, if any two liquid phase mixture is found with a lower free energy of mixing, then the single liquid phase is unstable. The iteration variable set was defined as:

Page 7: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQlJlLlBRlUM FLASH PROBLEMS 31 1

and 0 was defined from the constitutive requirement on liquid phase mole fractions. In terms of x, A, :and the liquid phase ratio, 0.0 may be written as:

The liquid mole fractions are obtained from the following rearrangement of the component mass bdance and phase equilibrium equations:

xl' = x, exp X,/(P + ( I - P ) exp Xi) (9)

In step 2 of Fig. 3 initial estimates of x' and x" are required to determine initial estimates of and in step 3. Shah2 developed an eficient procedure for determining initial splits based only on the given single phase x and infinite dilution activity coefficients.

Figure 4 diagrams the new multiphase flash algorithm. The algorithm first obtains a solution to the two phase flash. By testing the liquid phase for stability the algorithm determines whether or not the two phase flash solution is stable. I f i t is unstable than a three phase flash solution is sought. This approach differs from the conventional approach discussed by Henley and Rosen' and outlined in Fig. 5. This approach is based on the assumption that if a mathematical solution can be found to the three phase flash problem, it will be the solution that is physically achieved rather than the solution to the two phase problem. Although this approach is relatively simple there are several disadvantages. In moderately or highly nonideal systems the K's are strong functions of composition. Therefore poor initial estimates of them may lead to the two phase solution. There is no way of determining whether the two phase solution is the correct solution or whether it is a trivial solution caused by poor initial x' and x" estimates. The only recourse would be to perform another simulation using different

1 . Perform Two Phase F l a s h C a l c u l a t i o n Using Method

o f Boston and B r i t t .

2. Test R e s u l t i n g Liquid Phase f o r S t a b i l i t y Us ing

Algorithm by Shah.

3. If Liquid Phase i s Unstable Perform Three Phase F l a s h

C a l c u l a t i o n Using.Method of Present Study.

FIGURE 4 General multiphase flash algorithm

Page 8: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

I I 1 1 . Assume 2 , X , and 1

2. Search f o r a three phase s o l u t i o n t o t h e

s p e c i f i e d f l a s h problem

3. I f t h r e e phase algorithm converges t o B - 0 o r 1 ,

a c c e p t t h i s a s v a l i d t m phase s o l u t i o n ,

end assume three phase s o l u t i o n does not e x i s t

4. I f no s o l u t i o n is found f o r t h e three phase problem.

s e a r c h f o r s o l u t i o n t o the tu, phase problem

FIGURE 5 Conventional approach to three phase flash calculations

cstimatcs of x' and x" to determine i f the two phase solution is valid. In some cases the initial composition estimates may be obtained from solubility data or a previous simulation. Another disadvantage is the wasted computations if the three phase solution cannot be found. Clearly the describing equations for the two phase flash are simpler than thosc of the three phase flash. Finally, the approach requires prior knowledge'about the system to be flashed. The user of this approach must determine for which systems a thrcc phase solution may result. This could lead to both errors in process design and wasted computations.

N E W THREE PHASE INSIDE O U T FLASH ALGORITHM

Boston and Britt' have recently described a radically different approach for solving two phasc flash problems. In their approach the primitive variables x, y, T, P, and a become dcpcndent rather than independent variables. Quantities related to thermody- namic properties, which are normally treated as dependent variables, become the independent variables in their approach. The objective is to use as iteration variables quantities that are as free as possible of mutual interaction and are largely indepen- dent of the primitive variables. In this section a new algorithm is proposed for three phasc flash calculations. As in the two phase flash algorithm developed by Boston and Britt,' new variables are introduced that depend only weakly on the primitive variables.

In discussing Rash calculations it is convenient to focus attention on the type I flash. This flash type includes those features that are most important in discussing computa- tional algorithms since it requires solution of the enthalpy balance simultaneously with the mass balance and phase equilibrium equations. Also, the temperature is unknown.

In the new algorithm there are two primary convergence loops. The inner loop

Page 9: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTlPHASE EQUILIBRIUM FLASH PROBLEMS 313

consisting of two nested iteration variables and the outer loop comprised of 2N + 2 variables. The main variables of the outer loop are referred to as volatility parameters, and are defined as:

where K' and K" are equilibrium ratios for liquid phases I and 11 respectively. K , is defined as a reference equilibrium ratio defined as:

where p is the liquid phase ratio and w' and w" are component weighting factors for phases I and I l respectively, where:

p ww) + ( 1 - (3) w:' = 1

It is important to note that the weighting factors dictate the relative effect of each component on the Kb model defined by Eq. (12).*

For a type I flash, temperature is unknown. Therefore Kb would depend on temperature. The following model may be used to express the temperature dependence of K,:

I'n ( K , ) = A + B - - - ( b ;*I The coefficienls A and B i n the Kb model may be determined by evaluating K' and K" a t two temperature levels, T and T', while holding x', x", and y constant. The respective values of K , and K ; are obtained from the defining Eq. (12). Thus A and B a re given by:

Thus the 2N + 2 variables u', u", A, and B form the outer loop iteration variable set.

'An appendix containing the derivations of the equations presented in this section are available from the authors.

Page 10: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

314 R.L. FOURNIER A N D J.F. BOSTON

The inner loop consists of converging two variables defined as:

and:

The variables R and S are unique combinations of temperature, through Kb, and liquid and vapor phase ratio. This unique combination eliminates the need for switching roles depending on whether the system is narrow- or wide-boiling.

The variables R a n d S are related through the liquid phase ratio 0, it may be shown that:

Since 0 by definition must be greater than or equal to zero and less than or equal to one it follows that S is bounded for a given R:

In Eq. (1 7) i T V - 0 then R - 0 and if L = 0 then R - 1. Therefore:

represents the bounds on the variable R. A new variable p is defined in terms of the component vapor rate and the variable R.

Therefore:

By combining the Component Mass Balance and Phase Equilibrium equations, rearranging and solving for pi, the result is:

Pi - A I - R + S I I - R - S I

(23)

R + -7 + - 2 ~ : e"' 2K: e""

The liquid and vapor mole fractions are then available from the p:

Page 11: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

From the constitutive requirement on liquid phase compositions a new function 0 was defined as:

which when written in terms of R, S , u', u" becomes:

L

I - R + S I - R - S R + 2K:e"! + 2 K: e":'

Another function t) is introduced and defined as:

From Eq. (19) may be written in terms of R and S . When this is substituted for P into Eq. (29), along with the expressions for compositions, the result is that Kb may be solved for directly in terms of R, S, P, u', u". Thus:

The liquid and vapor rates may be determined by solving the overall mass balance and Eq. (1 8) simultaneously. From Eq. (22):

and:

Page 12: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

316 R.L. FOURNIER AND J.F. BOSTON

The form of the enthalpy balance equation used is based on the "constant composition" approach discussed by H ~ l l a n d . ~ In this approach the Component Mass Balance is substituted into the Enthalpy Balance to eliminate either the vapor or liquid mole fractions. The following expressions were used for the vapor and liquid enthal- pics:

where:

and H;, is the pure component vapor enthalpy, H;, is the pure component liquid cnthalpy, AH: is the pure component latent heat. In the example problems, the ideal gas enthalpy was used for H;, and Watson's equation was used for AH:. Thus the enthalpy balance becomes:

Figure 6 outlines the new algorithm for the type I three phase flash calculation. In step 1 the initial estimate of y may be obtained from the two phase flash solution. The x1 and x" are obtained from the liquid phase stability algorithm. Also the converged T from the two phase flash solution may be used as the initial estimate for the three phase flash.

For a given set of u', u", A, and B, along with an assumed R, a value of S may be determined to satisfy Eq. (27). In this implementation Newton's method was used to drive Eq. (28) to convergence. For a given value of R, S must be bounded as expressed by Eq. (20). The constraint on S ensures that either a two or three phase flash solution will result. Having determined S, P is calculated from which x', x", and y may be determined. K, is then updated from which a new Testimate is obtained by solving Eq. (14) for T. Thus the enthalpy balance error may be determined. R is then updated and the procedure repeated until the enthalpy balance error is within a prescribed tolerance.

After convergence of the inner loop occurs the x', x", y, and T may be used to calculate K', K", and K, in step 8 using the actual equilibrium ratio models and the defining equation for K,. In steps 9 and 10 the u', ul', A, and B a r e updated using the Quasi-Newton method of Broyden.'

In implementing this algorithm B is only updated in the outer loop once. When B is updated;two evaluations of K' and K" are required, whereas if u', u", and A are updated, a single evaluation is required. Additionally, B is much less temperature and composition dependent than u', u", and A.

The previous discussion on the new three phase flash algorithm was limited to the type I flash. The other flash types of Table I may be readily accommodated by simple modifications to the algorithm. Boston and Britt' in their discussion on other two

Page 13: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

I I1 I 11 C a l c u l a t e 5 , 5 , Kb, A . 0, !! , 2

S e t - Kb, assume R

Solve 0 - 0 f o r S u s i n g equat ion ( 2 8 )

I I1 C a l c d a t e 1, 2 . 2 , 11, Kb, V, L1, L1l, T u s i n g equat ions

( 2 3 ) through ( 2 6 ) . ( 3 0 ) through ( 3 3 ) and ( 1 4 ) r e s p e c t i v e l y

C a l c u l a t e 9 from equat ion ( 3 6 )

Ibsume new R and re turn t o s t e p 4 u n t i l $ < E I I C a l c u l a t e XI. slI, and Kb from equat ion ( 1 2 )

- 1 -11 - C a l c u l a t e 2 , , A , (and B f i r s t i t e r a t i o n o n l y )

I I1 Assume new v a l u e s o f 2 . , A and re turn t o s t e p 3

FIGURE 6 Type I adiabatic three phase flash. new inside-out method

phase flash types developed additional Kb models to reflect the dependence of K, on P or on P and T. This is required for flash types I1 and 111 where the calculated quantities are V , Pand T, P respectively.

Flash type I I requires a K, model in terms of P rather than T. The following Kb model may be adopted for this flash type:

In ( K , P ) = A + B, In ( P I P * ) ( 3 7 )

where P* is a reference pressure. The primary pressure dependence derives from the fact that, at low and medium pressures, K i p is nearly independent of P. The secondary dependence is a correction for systems in which the pressure is sufficiently high that this simple pressure dependence does not hold.

With this model, flash type I 1 can be handled simply by solving Eq. ( 3 7 ) for P

Page 14: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

318 R.L. FOURNIER A N D J.F. BOSTON

instead of Eq. (14) for T i n step 5 of Fig. 6. Additionally, one assumes P in step 1 which would be the converged value from the two phase flash calculation.

Flash type Il l requires that the R loop be split into two consecutive loops, each of which depends on a single variable. T o model the dependence of Kb on T and P, a combination of Eqs. (14) and (37) may be used:

In(K$) - A + B, ( - - - :) + Bp In (PIP*)

Steps 5-7 of Fig. 6 should be replaced with the following modified procedure:

5. Calculate p, h 6. Assume new R and return to step 4 until I h - v I < t

7. Calculate Kb, X I , x" , y, L', L"

7a. Assume T

7b. Calculate P from Kb model

7c. Calculate enthalpy balance error fi

7d. Assume new Tand return to step 7b until 1 $ 1 < e

Steps 8 ,9 , and I0 of Fig. 6 remain unchanged. In types IV and V the enthalpy balance is employed only to calculate q. Steps 5-7 of

Fig. 6 may be replaced for the type IV flash with:

5. Calculate p, h 6. Assume new R and return to step 4 until I v - v I < t

7. Calculate Kb, P, x ' , x u ' , and y

Note that in step 7, P i s updated using Eq. (37). Steps 8 ,9 , and I 0 remain unchanged. After the outer loop is converged, q may then be calculated using Eq. (36).

For the type V flash steps 5-7 may be replaced with:

5. Calculate p, i/ 6. Assume new R a n d return to step 4 until I k - V 1 < e

7. Calculate Kb. T, x ' , x", y

where T is updated using Eq. (14). Steps 8, 9, and 10 remain unchanged. The bubble and dew point special cases require no R iterations since a - 0 implies

R - 0 and a - 1 implies R - 1. In type VI there is no T o r P variation and hence no Kb model is needed. Kb is set to

unity in the inner loop and as a result the outer loop iteration variables become simply

Page 15: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS 319

K 1 and K". As in the type IV and V flash cases q is only calculated after convergence of the outer loop is attained. Steps 5-7 are replaced with:

5. Calculate p, Kb 6. Assume new R and return to step 4 until I Kb - 1 I < c

7. Calcula~e x', x", y

The multiphase flash algorithm of Fig. 4 may be readily extended to those special cases where more than two liquid phases are in equilibrium with the vapor phase. Although the two liquid phase case is by far the most common, it is entirely possible to have as many liquid phases as there are components present.

If the possibility exists that a four, five or more phase flash may exist the following procedure could be used. Having obtained the three phase flash solution the liquid phase stability test algorithm would be used to examine the stability of each individual liquid phase. Clearly if either of the liquid phases or both liquid phases are unstable then the three phase flash solution would be unstable. If only one of the two liquid phases is unstable then a four phase flash would be performed since only three liquid phases were predicted from the stability test. However, if both liquid phases are unstable then four liquid phases would be predicted and a five phase flash would be performed. This procedure would be repeated until all the liquid phases for a given flash were shown to be stable or the number of liquid phases equals the number of components present. It is important to note that no modifications are required to the liquid phase stability test algorithm since the stability of any multiphase flash may be determined by examining the stability of each individual liquid phase.

Limiting the discussion to the type I flash recall that for a three phase flash the 3 N + 4 variables are p, R, and S in the inner loop and A, B, ul, and ul' in the outer loop. Similarly, an ( M + 1) phase flash, where M is the number of liquid phases, would require for the inner loop the variables p, R, S , , S,, . . . , and S ,-,. The outer loop would require in addition to A and B M N volatility parameters u', u", . . . , uM. The additional S variables would be determined by simultaneously satisfying the (M - I) conscitutive requirements on liquid phase mole fractions. These could be generalized as:

and the S variables would be defined as:

Thep, would be determined from an expression similar to Eq. (23). In the inner loop a model for K, would be required and would arise from a generalization of Eq. (29). The

Page 16: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

320 R.L. FOURNIER A N D J.F. BOSTON

variable R would once again be used as the main iteration variable of the inner loop driving the enthalpy balance error to zero. In the outer loop MN volatility parameters of the rorm:

would be required. Finally, the defining equation for K, would be:

for M - 1, I I, . . . , where pj is defined as:

EXAMPLE PROBLEMS

The performance of the new multiphase flash algorithm will be illustrated using several example problems. The example problems consist of one type I and three type V I flash cases.

Example 1 is the type I flash of a mixture of chloroform, water, and acetone. The feed mole fraction composition was .40 chloroform, .40 water, and .20 acetone. The cnthalpy of the feed was -4838.47 cal/mole and the flash pressure was 1 atm. The vapor phase was'considered to be ideal and the liquid phase activity coefficients were obtained from the Uniquac equation.'

For the two phase flash calculation the outer loop converged in seven iterations and is summarized in able 11. The RMS error is the Root-Mean-Square of the difference between the assumed values and corresponding calculated values of the outer loop iteration variables. The calculations continue until the RMS error is less than 0.001.

The stability test algorithm determined that the two phase flash solution was unstable. The single liquid phase of the two phase flash solution had a Gibbs free energy of mixing of -247.85 cal/mole whereas a two liquid phase mixture formed from the single liquid phase had a free energy of - 3 19.02 cal/mole.

For the three phase flash calculation the outer loop, summarized in Table 111, converged in six iterations. The initial temperature estimate was obtained from the two phase flash solution. In this example, the second liquid phase was formed primarily from the original liquid phase of the two phase flash solution. This evident by comparing the final vapor fractions of the two and three phase flash solutions, 0.4000 and 0.3916, respectively.

Page 17: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

TABLE Il

Example I: Outer loop iteration summary, two phase flash calculation

Iteration &

Initial 6.968 1 I 1.6601 2 1.0029 3 1.0347 4 1.0088 5 ,9947 6 ,9865 7 ,9849

RMS a Error

- - .3532 - ,3819 ,2659 .3889 ,0720 ,3930 ,0420 ,3975 ,0135 ,3997 ,0020 ,4000 .0001

TABLE Ill

Example I : Outer loop iteration summary, three phase flash calculation

RMS Iteration Kb 'PK R S u B Error

Example 2

In their discussion on three phase flash calculations Henley and Rosen3 considered the type VI flash of a mixture of ethanol, benzene, and water. The feed mole fraction composition was .23 ethanol, .27 benzene, and S O water. The flash temperature and pressure was 336.85OK and 1 atm respectively. The vapor phase was ideal and the liquid phase activity coefficients were given by the three-suffix Margules equation.

The multiphase flash algorithm was also applied to this problem. The outer loop iterations for the two phase flash calculations are tabulated in Table IV. The stability test algorithm determined that the two phase flash was unstable. The single liquid phase of the two phase flash solution had a free energy of mixing of -182.6620 cal/mole compared to - 182.6622 cal/mole for a two liquid phase mixture. The three phase flash calculations are summarized in Table V.

Henley and Rosen (3) discussed another type VI flash of this system where the temperature was spccified as 352.1S°K, rather than 33635°K. They once again started their calculations by performing the three phase flash. However, they could not find a three phase flash solution and concluded that a two phase flash solution would be correct. When this case was performed using the multiphase flash algorithm the stability test algorithm determined that the two phase flash solution was stable.

Page 18: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

R.L. FOURNIER A N D J.F. BOSTON

Therefore, no three phase flash calculation would be required. Tables VI and VII tabulate the outer loop iterations for both the two and three phase flash calculations. The three phase flash was only performed to demonstrate that a two phase flash solution would result.

TABLE IV

Example 2: Outer loop iteration summary, two phase Rash calculation

Iteration R b ) RMS Error

TABLE V

Example 2: Outer lodp iteration summary three phase Rash calculation

iteration' R(a) S @ RMS Error

I ,4422 ,4919 ,9409 ,0183 2 ,4261 ,4487 ,9258 ,0126 3 ,4072 ,4850 ,9091 ,0059 4 ,3936 ,4824 ,8978 ,0014 5 .3894 .48 15 ,8943 .Om2

TABLE VI

Example 2: Outer Iwp iteration summary, two phase Rash calculation

Iteration R b ) RMS Error

I ,8478 ,1980 2 ,8476 ,0567 3 .8484 .004 1 4 ,8484 ,000 1

TABLE VII

Example 2: Outer loop iteration summary, three phase Rash calculation

Iteration S B RMS Error

I ,8484 ,1516 1 .OOOO ,4991 2 3484 ,1516 1 .OOOO ,2234 3 ,8484 ,1516 1 .OOOO ,0076 4 ,8484 ,1516 1 .OOOO .I021 5 ,8484 ,1516 1 .BOO0 ,0004

Page 19: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

Example 3

Example 3 is the type VI flash of a mixture of propylene, diisopropylether, isopropa- nol, and water. The feed consisted of .70 mole fraction propylene, . I0 diisopropylether, .05 isopropanol, and . I5 water. The flash temperature and pressure were respectively 377.59"K and 40.83 atm. The vapor phase fugacity coefficient was given by the Chueh-Prausnitz modified Redlich-Kwong equation,' liquid phase activity coeffi- cients were given by a four-suffix Margules equation: and the pure component liquid fugacity was obtained using the Chao-Seader method? The outer loop iterations for the two and three phase flash calculations are tabulated in Tables VIII and IX, respective1 y.

This example clearly demonstrates the performance of the stability test algorithm. Note the tremendous change in vapor fraction between the two and three phase flash solutions, 0.8725 and 0.2414, respectively. The second liquid phase was formed primarily from the vapor phase of the two phase flash solution. The stability test algorithm calc:ulated a free energy of mixing of -60.032 cal/mole for the liquid phase of the two phase flash solution and a free energy of -60.052 cal/mole for a two liquid phase mixture. It is interesting to note that the liquid phase ratio of the two liquid phase mixture obtained from the stability test algorithm was 0.9996. Thus it is not surprising that the second liquid phase arose primarily from the vapor phase; what is important however, is that the stability test algorithm correctly predicted the three phase flash solution, despite the fact that the original liquid phase of the two phase flash solution was nearly stable.

TABLE VlIl

Example 3: Outer loop iteration summary, two phase flash calculation

Iteration R(a) RMS Error

TABLE IX

Example 3: Outer loop iteration summary, three phase flash calculation

Iteration R(a) S 0 RMS Error

Page 20: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

R.L. FOURNIER A N D J.F. BOSTON

CONCLUSIONS

The new multiphase flash algorithm was found to be very reliable in correctly predicting either a two or three phase flash solution. This approach combined the new two phase flash algorithm of Boston and Britt,' the stability test algorithm by Shah,' and the new three phase flash algorithm into a general multiphase flash algorithm. Previous algorithms for solving either two or three phase flash problems relied on the user to specify the number of phases a t equilibrium. This approach is both unreliable and inefficient except in those cases where the user has sufficient prior knowledge to specify the number of phases at equilibrium and has good initial composition estimates. In the new approach the two phase flash solution is found first. Only if this solution is found to be unstable is a three phase flash solution sought. This approach eliminates both user error and wasted computations.

NOTATIONS

Kb model coefficients

Total molar flow rate of feed

Component molar flow rate in feed

Total Gibbs free energy

Feed enthalpy

Liquid enthalpy

ldeal gas enthalpy of liquid phase

Vapor enthalpy

ldeal gas enthalpy of vapor phase

Pure component latent heat

Vapor-liquid equilibrium ratio

Weighted average equilibrium ratio

Reference value of K,

Total molar flow rate of liquid phase

Component molar flow rate in liquid phase

Number of liquid phases

Number of conlponents

Absolute system pressure

Modified component molar flow rate

Rate of heat flow into flash, excluding feed stream (positive for heat in)

Q/ F Iteration variable for inner loop

Page 21: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

MULTIPHASE EQUILIBRIUM FLASH PROBLEMS

Iteration variable for inner loop

Absolute system temperature

~ c f e r e n c e temperature

Volatility parameter

Total molar flow rate of vapor phase

Component molar flow rate in vapor phase

Kb model weighting factor

Component mole fraction in liquid phase

Component mole fraction in vapor phase

Component mole fraction in feed

Greek Letters

a V I F , vapor phase ratio

f l L'/(L1 + L"), liquid phase ratio

Y Activity coefficient e Convergence tolerance

V . 0 Constitutive functions

X Natural logarithm of component activity coefficient ratios

# Enthalpy balance error

Subscriprs

i j k Component indices

Superscripts

I, I1 Liquid phase indices * Reference quantity

m Infinite dilution

Other Symbols

Calculated quantity -

Vector

REFERENCES

I. Boston. J.F., Britt. H.I., Compurers and Chem. Engr.. 2, 109 (1978). 2. Shah, V., PhD Dissertation, University of Toledo. 1980.

Page 22: A Quasi-newton Algorithm for Solving Multi Phase Equilibrium Flash Problems

Dow

nloa

ded

By:

[Virg

inia

Tec

h./U

nive

rsity

Lib

rarie

s] A

t: 20

:05

22 J

uly

2007

3 26 R.L. FOURNIER AND J.F. BOSTON

3. Henley. E.J.. Rosen. E.M.. "Material and Energy Balance Computations," John Wiley and Sons, Inc., USA (1 969).

4. Holland. C.D.. "Fundamentals and Modeling of Separation Processes." Prentice-Hall. Inc.. New Jersey (1975).

5. Broyden. C.G., Mafhemafics of Compurarion. 19,577 (1965). 6 . Abrams. D.S.. Prausnitz. J.M.. AlChE Journal. 21 (I). 116 (1975). 7. Chueh. P.L.. Prausnitz, J.M.. I & EC Fundamentals. Vol. 6, No. 4. Nov. 1967. 8. Hala. Pick. Fried, and Vilim. "Vapor-Liquid Equilibrium," Pergamon Press Ltd.. 1967. 9. Chao. KC.. Seadcr, J.D., AlChE Journol. 7,598 (1961).