10
COMPUTATION OF PHASE AND CHEMICAL EQUILIBRIA? JAIME CASTILLO Alfa Industrias, Sector Petroquimico, TorresAdalii 517, Mexico 12, D.F., Mexico and IGNACIO E. GROSSMANNS Department of Chemical Engineering, Carnegie-Mellon University,Pittsburgh, PA 15213, U.S.A. (Receiued 11 September 1980) Abshmct-A new method is proposed for the computation of simultaneousphase and chemical equilibriaby minimiition of the Gibbs energy. A non-linearprogramming approach is used which enables one to determine the number and identity of phases at equilibrium, as well as the compositions of each componentin each phase. Any thermodynamic modelwhichpredicts fugacities can be incorporated easily in this method. Numericalresults of various systems that involve gases, liquidsand solids are presented. Scope-When designing chemical reactors, distillationcolumns or other separation processes, it is often necessary to compute the phase and chemicalequilibrium of the corresponding mixtures that are being handled. Several methods have been proposed for solvingthis problem and an extensive review can be found in Seider et al. [ 11. The earlier methods formulated the phase and chemical equilibriumproblem as a system of non-linear equations,whereas the most recent methodsuse the more powerfulformulation where the Gibbs energy is minim&d, an approach which was hrst suggestedby White et ~1.121. The main shortcoming of these methods is that the numberof phases and/or the identity of the componentsin the mixture at equilibrium need to be known a priori since in general non-negativity constraintson the number of moles cannot be handled. To overcome this dithculty,it has been suggested that those components which attain a very small value of mole numbers during the calculations be removed, restarting the computation with the reduced system. However, except for the case of systems with a gas and pure condensedphases where the test by Oliver et al.[3] can be applied,the procedure lacks mathematical rigour, and hence misleading results can be obtained,particularlyin the case when the number of phases at equilibrium must be determined. Gautam & Seider[4] have proposed recently an algorithmfor determining the number of phases using an evolutionary approach.The calculations are started with a reduced number of phases, and then candidate phases are tested sequentially with prescribed cirteria, so as to decide whether they should be included in the originalsystem, or if some of the phases in the originalsystem should be removed. In this paper, an alternative approach is presented based on a phase elimination technique which circumvents the combinatorial part of the phase and chemical equilibrium problem.The basic idea is to formulate a non-linear programme which correspondsto a system that includesall the phases that are postulated to exist at equilibrium. Since non-negativityconstraints are treated explicitly by a suitable non-linear programming algorithm, the number and identity of phases is determined by simply analyzingthe number of moles of each componentin each phase at the optimumsolution.It is shown that great advantagecan be taken of the mathematical structure of the problemfor solving it efficiently, and provisions are suggested to avoid numerical difhculties that can arise in this formulation.The application of the proposed phase elimination technique is illustratedwith the use of the variable metric projection method of Sargent & Murtagh[S]. Conehrsbns and S -The computation of phase and chemical equilibria has been formulated as a non-linearprogramme. The mathematical structure of this problem can be greatly exploited by using efficientalgorithms that handle directly linear equality and inequalityconstraints. It has been shown that the main source of ill-conditioning in the non-linearprogrammelies in the upbounded gradients at zero concentration,and numerical provisionshave been suggested for tackling this point. It has also been shownthat any thermodynamic methodfor estimating fugacitiescan be incorporated easily since their analyticalderivatives are not required. The results show that the proposed method is a very general and powerful tool for performing phase and chemical equilibriumcalculations,as it can be applied to a great variety of problems, including the cases where it is known or unknown which are the phases that are present at equilibrium. tThis work was performed at the Instituto Mexicano del Petroleo,Mexico City in 1978. $Author to whom correspondence should be addressed.

Computation of phase and chemical equilibria

Embed Size (px)

Citation preview

Page 1: Computation of phase and chemical equilibria

COMPUTATION OF PHASE AND CHEMICAL EQUILIBRIA?

JAIME CASTILLO Alfa Industrias, Sector Petroquimico, Torres Adalii 517, Mexico 12, D.F., Mexico

and

IGNACIO E. GROSSMANNS Department of Chemical Engineering, Carnegie-Mellon University, Pittsburgh, PA 15213, U.S.A.

(Receiued 11 September 1980)

Abshmct-A new method is proposed for the computation of simultaneous phase and chemical equilibria by minimiition of the Gibbs energy. A non-linear programming approach is used which enables one to determine the number and identity of phases at equilibrium, as well as the compositions of each component in each phase. Any thermodynamic model which predicts fugacities can be incorporated easily in this method. Numerical results of various systems that involve gases, liquids and solids are presented.

Scope-When designing chemical reactors, distillation columns or other separation processes, it is often necessary to compute the phase and chemical equilibrium of the corresponding mixtures that are being handled. Several methods have been proposed for solving this problem and an extensive review can be found in Seider et al. [ 11.

The earlier methods formulated the phase and chemical equilibrium problem as a system of non-linear equations, whereas the most recent methods use the more powerful formulation where the Gibbs energy is minim&d, an approach which was hrst suggested by White et ~1.121. The main shortcoming of these methods is that the number of phases and/or the identity of the components in the mixture at equilibrium need to be known a priori since in general non-negativity constraints on the number of moles cannot be handled. To overcome this dithculty, it has been suggested that those components which attain a very small value of mole numbers during the calculations be removed, restarting the computation with the reduced system. However, except for the case of systems with a gas and pure condensed phases where the test by Oliver et al. [3] can be applied, the procedure lacks mathematical rigour, and hence misleading results can be obtained, particularly in the case when the number of phases at equilibrium must be determined.

Gautam & Seider[4] have proposed recently an algorithm for determining the number of phases using an evolutionary approach. The calculations are started with a reduced number of phases, and then candidate phases are tested sequentially with prescribed cirteria, so as to decide whether they should be included in the original system, or if some of the phases in the original system should be removed.

In this paper, an alternative approach is presented based on a phase elimination technique which circumvents the combinatorial part of the phase and chemical equilibrium problem. The basic idea is to formulate a non-linear programme which corresponds to a system that includes all the phases that are postulated to exist at equilibrium. Since non-negativity constraints are treated explicitly by a suitable non-linear programming algorithm, the number and identity of phases is determined by simply analyzing the number of moles of each component in each phase at the optimum solution. It is shown that great advantage can be taken of the mathematical structure of the problem for solving it efficiently, and provisions are suggested to avoid numerical difhculties that can arise in this formulation. The application of the proposed phase elimination technique is illustrated with the use of the variable metric projection method of Sargent & Murtagh[S].

Conehrsbns and S -The computation of phase and chemical equilibria has been formulated as a non-linear programme. The mathematical structure of this problem can be greatly exploited by using efficient algorithms that handle directly linear equality and inequality constraints. It has been shown that the main source of ill-conditioning in the non-linear programme lies in the upbounded gradients at zero concentration, and numerical provisions have been suggested for tackling this point. It has also been shown that any thermodynamic method for estimating fugacities can be incorporated easily since their analytical derivatives are not required.

The results show that the proposed method is a very general and powerful tool for performing phase and chemical equilibrium calculations, as it can be applied to a great variety of problems, including the cases where it is known or unknown which are the phases that are present at equilibrium.

tThis work was performed at the Instituto Mexicano del Petroleo, Mexico City in 1978. $Author to whom correspondence should be addressed.

Page 2: Computation of phase and chemical equilibria

100 J. CAS~LLO and I. E. GROSSMANN

PROBLEM FIMMJLATION For a multicomponent, multiphase system at constant

pressure and temperature, the Gibbs energy G is given by [61

G= x x n:(~O+RZ’InfiL) iSI, kElp

(1)

where n: and j! are the number of moles and the fugacity of component i in phase &, cl? is the chemical potential of component i in the ideal gas state at the temperature of the system and unit pressure, Z, is the index set of the NC components, and Z,, the index set of the NP phases in the system.

It is convenient to consider at the above reference state that the Gibbs energy content of the elemental species is zero, as then (1) can be written as

G = ,z kz n”(AGi’ t RT In f!i”, (2) c P

where AG[ is the Gibbs energy of formation of com- ponent i at the temperature of the system.

At equilibrium the function G in (2) will be a minimum[6] with the variables n: satisfying the follow- ing constraints:

(1) Mass bolonce (a) For simultaneous phase and chemical equilibrium,

the conservation of the chemical elements must hold,

w a,g*=b, j=l,2,...NE (3) iE c kE p

where uii is the number of gram-atoms of element j in component i, bi the total number of gram-atoms of element j in the system, and NE the number of elements.

(b) For phase equilibrium only, the conservation of moles of the individual components must hold,

where niT is the total number of moles of component i in the mixture.

(2) Non-negativity condition

n*aO iEG,kEZ,. (5)

In order to compute the phase and chemical equili- brium of a mixture of NC components at a given pressur$ andtemperature, one must determine for an index set Z, of NP possible phases,

(i) The number of phases NP <WI (ii) The index set of the phases Z,,cZP. (iii) The number of moles nr, i E I,, k E Z,,

that minimize the function G in (2) subject to the con- straints (3) or (4) and (5).

It must be pointed out that the main di5culty involved in solving this problem is determining the phases that actually exist at equilibrium. In fact, this is a corn- binatorial &Iem which is illustrated for the case ZP = {l, 2,3,4}, NP = 4 (Fig. 1). Here all possible subsets of phases are represented with a tree, where in each branch a given phase is added to the system. Each node in the tree defines the number and ide_ntity of phases (NP, Z,) of a particular combination of ZP For instance in Fii. 1, node A represents the system with phases 2 and 3, whereas node B represents the system with the four phases. Clearly, at each node of the tree a different non-linear programming problem is defined in terms of the continuous variables nit for a fixed subset ZP

STRA’ITCGIRS FOR SOLVING TEE COMBINATONAL PROBLEM Basically, two types of strategies can be suggested for

tackling the combinatorial part of the phase and chemical equilibrium problem. One is to perform a search in the tree by analyzing a subset of nodes and solving their corresponding non-linear programmes. In this procedure thermodynamic criteria could be used so as to elimiite nodes from the tree. The other strategy consists in wing the non-linear programme of the node where the NP phases are included. In this way the phases that do not exist at equilibrium are eliminated by setting the corresponding number of moles to zero at the solution. With this phase elimination technique, only one sub- problem has to be solved, although it clearly corresponds to the largest non-linear programme in the tree.

It must be noted that with the former strategy the number of subprobiems N, to be solved could eventually be as high as

-

(6)

unless valid and efficient thermodynamic criteria are used, so as to reduce the number of subproblems. Gau-

Fig. 1. Tree representation of all possible combinations of systems with up to four phases

Page 3: Computation of phase and chemical equilibria

Computation of phase and chemical equilibria 101

tam & Seider[4] use a phase-splitting technique which adopts a zero value as then the function G in (2) is not accomplishes this objective, as it requires only partial mathematically defined, and the corresponding gradient solution of some nodes. The strategy proposed in this in (10) is unbounded. This will cause failure in the paper is to solve the_ one subproblem that contains all the evaluation of the Gibbs energy function, and the multi- postulated phases, Z,, as this appears to be a very general pliers in the Kuhn-Tucker conditions (7) and (8) will and an efficient approach, since no thermodynamic cri- become unbounded. Therefore, in order to make possible teria are required and only one non-linear programme the application of current algorithms, some sort of pro- need to be solved. vision must be taken in the neighborhood of n: = 0.

SOLUTIONOFTHENON-LJNEARPROGMMME According to the proposed phase elimination technique

that has been described above, the non-linear programme to be solved is to minimize (2) subject to (3) or (4), and (5), taking I, and Zp as the index sets. At the optimum solution the tirst order necessary conditions as given by the Kuhn-Tucker conditions must be satisfied by the non-linear programme:

One possibility is to perform a second order Taylor approximation of the term In f: at an arbitrary small positive value a, so that the Gibbs energy can be written as

where

(11)

(a) For simultaneous phase and chemical equilibrium,

[ lnf:, fik 2 a

2 *$ a,,n: = b, i = 1,2,. . . NE (7) c

p,knF=O,ptrO,n:zO iEZ,,kE&,.

(b) For phase equilibrium only,

$-SAi-p~=O iEZ,,kE&

kzinili=nT iEZ, 03) I

p;‘n:=O,p:zO,n:zO iEZ,,kE(,

where A, p, are the corresponding Kuhn-Tucker multi- pliers of the material balance and non-negativity con- straints. It will be assumed that a suitable non-linear programming algorithm as those described in [7] will be used for finding a point that satisfies the conditions in (7) or (8).

The subset Zp and ihe variable NP will be determined by those phases k E Zp’ where at least for one component i E Z,, the variable ni has a non-zero value at the opti- mum solution. In other words, a given phase k will not be present at equilibrium when n: =O, for all iE Z,. However, as shown below, numerical di5culties will be encountered for zero values of n:.

In the limit of zero concentration of a given com- ponent the corresponding fugacity is zero. Provided the fugacity coefficient is bounded at this limit it follows that

I’m n: In fi” = 0. it

(9) n-a0

However, at this limit the chemical potential will tend to minus infinity since

When solving the non-linear programme with any of the standard algorithms, it is clear from (2) and (10) that numerical difliculties will arise when a variable n:

In this way w:) will approximate quadratically and monotonically the function lnf: in the region f: < a, so that the terms In f: and n: In f: will be approximated as shown in Fig. 2, where it can be seen that the limit in (9) will hold. Constraint (5) can then be applied without any difficulty as the function G in (11) is defined at any arbitrary point, and its corresponding gradients will remain finite.

Another possibility for circumventing the problems associated with a zero-value of the variable nik is to replace constraint (5) by

(13)

(a 1

a

Fii 2. Quadratic approximation of the terms: In D.

Page 4: Computation of phase and chemical equilibria

102 J. CASIXLLO and I. E. GROSSMANN

where /3 is an arbitrary tolerance with a s_mall positive value. When using (13), a given phase k E f, is assumed to exist at equilibrium if at least for one of the com- ponents i E Z,, ni” > B. This alternative is a much simpler way of avoiding unbounded gradients in the limit of zero concentration, but requires an algorithm which evaluates the objective function only at points that satisfy con- straint (13) as otherwise the Gibbs energy will not be defined for negative values of number of moles.

In order to solve the non-linear programme with either of the two proposed provisions, gradient projection-type algorithms can be used since all the constraints are linear (see Ref. [7]). These algorithms perform very well when analytical gradients of the objective function are pro- vided. Of course, if these gradients were to be obtained directly from (2), it would be very cumbersome to im- plement sophisticated thermodynamic models. For- tunately, because of the mathematical properties of the Gibbs energy function, this task becomes straightforward since the gradient is given by the chemical potential[6],

$=AG!+RT In fi ~EZ,,~EI, (14)

where it is clearly seen that the gradient is given expli- citly in terms of the fugacity, and hence no analytical derivatives of the fugacities are required. Note that if the mod&d form of G in (11) is used, the corresponding gradients will be given by,

-$=AG/+RPD($) iEI,,kE$,. (19

DISCUSSIONOFTEEMEFHOI) There are several points in the proposed method which

are worth mentioning. Firstly, it must be noticed that the method can handle

systems in which vapour, liquid and solid phases are involved, including the particular case when all the pos- tulated phases are known to exist. Clearly, pure conden- sed phases can also be considered without difficulty.

In the case of systems with only an ideal gaseous phase, the non-linear programme will be convex as shown by White et a/.(2], and therefore the local mini- mum solution will be unique. For multiphase non-ideal systems, it is not evident that the same result will hold, although one would expect that in general the con- tribution of the non-ideal terms in the Hessian matrix of the objective function will be rather small. It should be pointed out, however, that since the mathematical representation of a problem with several postulated phases is not necessarily unique, it is possible to have several local minima. For instance, when two liquid phases are considered and one of them is eliminated at the optimum solution, the phase which is left can be represented mathematically with the variables of either phase or with a combination of variables of both phases having the same composition (see Ref. [9]). This case is not much of a problem however, as the various local minima would have the same value of the Gibbs energy function. Nevertheless, the possibility of having local minima with different values of the Gibbs energy cannot be ruled out in general, and in fact it has been shown[8,9], that under some conditions liquid-liquid systems with chemical reaction may exhibit this kind of behaviour. Therefore, in general it cannot be ensured that the numerical solution obtained with the proposed

method corresponds to the global minimum of the Gibbs free energy. Clearly, this point also applies to all pre-q vious methods since there is no rigorous procedure yet for determining the global minimum of a non-linear pro- gramme with multiple minima.

It must be noted, however, that the method presented in this paper will not calculate an incorrect constrained minimum which will lead to an erroneous elimination of phases. This failure arises when, for instance, the method by White et a/.[21 is applied to systems where several phases are postulated to exist at equihbrium[4]. In this case the number of moles that attain values close to zero are removed from the computation procedure to avoid singularities in the jacobian matrix. There is the danger then of eliminating moles of species or phases that could actually become non-zero at the equilibrium solution.

In order to show the importance of handling properly the inequalities in (5) in the non-linear programme for- mulated in this paper, consider the minimization of the convex function in Fig. 3. Here the steepest descent method coupled with optimum step sizes is applied for solving the problem. If A is the initial starting point, the first predicted point is given by B as the size of the predicted step is adjusted so as to satisfy the inequality xl 2 0. If x, is set to zero and eliminated from the optimization, the predicted minimum will lie at point C, which clearly is not the correct solution as it is only a constrained minimum in the subspace defined by x1 =O. However, if x1 is not eliminated from the problem, point C is obtained by projecting the gradient into the con- straint xl = 0. By analyzing the Kuhn-Tucker multiplier of this constraint, x1 would be released so that further steps would be taken so as to obtain point D, the true minimum of this problem. From this example it can be seen that the proposed method will not eliminate phases that do exist at equilibrium due to the explicit handling of the non-negativity constraints in the non-linear pro- gramming algorithm.

As far as the selection of th-stulated phases is concerned, an upper bound of NP would be given by 2NC t 1 if one is considering a general system involving gas, liquid and solid phases. For large values of NC this bound would imply solving a rather large non-linear programme,_but since the user will normally specify the index set I,,, the problem can usually be kept at a reasonable size.

B

C

Fig. 3. Minimization of a function using the steepest descent method with optimum step sizes.

Page 5: Computation of phase and chemical equilibria

Computation of phase and chemical equilibria 103

The proposed method of solution has been implemen- ted in a computer programme. The non-linear program- ming algorithm which has been used is the variable metric projection method of Sargent & Murtagh[5]. This algorithm determines a local minimum solution which satisfies the Kuhn-Tucker conditions, performing local quadratic approximations by using function and gradient values of the objective function and constraints. The algorithm does not require the gradients of the con- straints to be linearly independent, so there is no need to determine the rank of matrix A = [ail] in Eq. (3), as in some other methods. Also, the algorithm does not require a feasible starting point as in the first phase the objective function is replaced by the sum of squares of deviations ofviolated constraints to find a feasible point. Once this point is found, the algorithm wig search for the minimum of the objective function by generating a sequence of points that belong to the feasible region.

A number of thermodynamic models that predict fugacities have been incorporated in the computer pro- gramme, namely, the Soave-RedlichKwong equation of state[lO], the NRTL[ll], Wilson[lZ] and UNIQUAC[13] models for the excess Gibbs energy and the Lewis fugacity rule [14]. The data required by the programme include pressure, temperature, feed composition, the mass balance matrix A = [u,J, the Gibbs energies of formation of the components at the system temperature, and the corresponding parameters of the thermodynamic models.

The proposed method has been tested with various examples using a lower bound for the mole numbers of p = 1 x 10-‘“, as referred to the inequality constraint in (13). In all the cases the starting points for solving the non-linear programme were infeasible, and convergence to the solution was defined to occur when the euclidean norm of the left-hand side in the tirst equations in (7) or (8) was less than 1 x IO-‘.

Example 1 An equimolar mixture of ethanol and acetic acid at

358 K, 1 atm, reaches equilibrium according to the fol- lowing reaction[lS],

EtOH + HAc = EtAc + H,O

where a vapour-liquid system is assumed to exist. The thermodynamic data and models of George[l6]

were used, and the results are shown in Table 1, where it can be seen that only the vapour phase is predicted to exist at equilibrium. The results agree exactly with those

reported by George et aL[17]. The CPU time (UNIVAC- 1106) required for solving this problem was 17 set; in the case when only the vapour phase was assumed to exist at equilibrium the CPU time was reduced to 1 sec.

Example 2 The three phase vapour-liquid-liquid equilibria of the

mixture 34.36% mole benzene, 30.92% mole acetonitrile and 34.72% mole water are computed at different pres- sures and temperatures. The vapour phase was represented by the ideal gas law, and the liquid phase activity coefficients were predicted using the NRTL model, whose parameters are shown in Table 2. Vapour pressures were predicted by the Antoine equation with the coefficients reported in Reid et 0/.[20].

As shown in Table 3, the three phases coexist at equilibrium at 333 K, 0.769atm. When the pressure is increased to 1 atm, the vapour phase is eliminated as can be seen in Table 4. The case when the system is at 300 K, 0.1 atm, is illustrated in Table 5, showing that at equili- brium only one liquid phase is present with the vapour. Note that since the mole fraction of benzene is of the order 0.02% in the liquid phase, this composition is presumably too small to generate phase instability. The CPU times ranged from 8 to 12 sec.

Example 3 Iron (solid) is produced by reducing ferric oxide (solid)

with coke (solid carbon) in a blast furnace at 1363.48 K, 1 atm. The components in the gaseous phase of the reaction are CO, C02, HZ, O2 and H,O. The feed com- position of the mixture is shown in Table 6, and it is assumed that the three solid phases are immiscible and present at equilibrium. The thermodynamic data and models are taken from Balzhiser et aL[18].

The results were obtained in 4 set CPU time, and they are shown in Table 6, where it can be seen that the solid phase of ferric oxide does not exist at equilibrium. In fact, this was also predicted by Balzhiser et al. [ 181, using the method of White et al. 121. However, it must be noted that their calculations had to be stopped when the ferric oxide attained a very small value since non-negativity constraints cannot be handled explicitly. The problem had to be reformulated by eliminating the ferric oxide from the mixture, and the calculations were then res- tarted.

Several examples in which the postulated phases are actually present at equilibrium have been solved, and they are shown in Table 7. The results of the fust two examples, which involve chemical reactions, are presen- ted in Tables 8 and 9, and agree well with those reported by Balzhiser ef al. [ 181, and George et al. [ 171.

In the liquid-liquid equilibrium problems, the binary

Table 1. Chemical equilibrium of an equimolar mixture of ethanol and acetic acid at 358 K, 1 atm

Liquid Phue vapour Phme Peed ccfm.oncnt @oh fraction) @ale fraction) (mole fractions

ltOR 0.075350 0.5

u&c _ 0.075358 0.5

LtAC _ 0.424642 0

82O 0.424642 0

Total Bblcr IO-lo lO.OoOOOo 10.0

Page 6: Computation of phase and chemical equilibria

104 J. CNILU, and I. E. GRCISSMANN

Table 2. NRTL parameters for the system benzene (1). acetonitrile (2), water (3)[23].

Bilvry mraPCtere* 3ooK 333K

T12 693.61 998.2

r21 92.47 65.74

713 3692.44 3883.2

731 3952.2 3849.57

723 415.38 363.57

732 1016.28 1262.4

?2 0.67094 0.80577

%3 0.23906 0.24690

a23 0.20202 0.3565

* 711 in cal/mole, ,qj is dimensionleas

Table 3. Vapour-liquid-liquid equilibrium of the mixture benzene-acetonitrile-water at 333 K, 0.769 atm

vapour Liquid 1 Liquid 2 Peed Colponent Qrmle frmtion) (mole fraction) (mole fraction) (mole fr=tiw_

Belmcne 0.46937 0.00268 0.45336 0.34359

Acetonitrilc 0.28997 0.08008 0.47092 0.3O923

mtar 0.24066 0.91724 0.07572 0.34710

Total Iblas 0.34253 0.25661 0.40446 1.00360

Table 4. Vapour-liquid-liquid equilibrium of the mixture benzene-acetonitrilewater at 333 K, 1 atm

v*pour Liquid 1 Liquid 2 Feed -l-lent (mole fraction) (mole fraction) (lmle fraction) (mole fraction)

I)eluSXle _ a.00244 0.51472 0.34359

Acctonitrilc _ 0.07118 0.42864 0.30923

water _ 0.92638 0.05664 0.34718

Total Moles lo-lo 0.33526 0.66834 1.00360

Table 5. Vapour-liquid-liquid equilibrium of the mixture benzene-acetonitrile-water at 300 K, 0.1 atm

Vapollr Liquid 1 Liquid 2 Feed camonent (mole fraction) (mole fraction) (mole fraction) (mole fraction)

Bmuene 0.347561 o.ooo194 0.343593

Amtonftrile 0.312459 0.029580 _ 0.309227

water 0.339980 0.970226 _ 0.347180

Total Mole* 0.992135 0.011465 lo-lo l.OO3600

Page 7: Computation of phase and chemical equilibria

Computation of phase and chemical equilibria 105

Table 6. Solid-gas equilibrium in a blast furnace at 1363 K, 1 atm

component

Fe

PC0

C

Solid 1 Solid 2 Solid 3 (molest pOlSS~ @olcs)_

1.0 _

10’10

_ _

_

_

_

_

_

_

0.00905

t2S Fed +Ol~S~ @olell

2.73409 0.75

0.00606 -

0.74701 0.75

lo-lo 0.50

0.00299 -

_

_ 1.00

_ 2.00

Total Moles 1.0 lo-l0 0.00905 3.49095 5.00

Table 7. List of examples in which the number of postulated phases is equal to the number of phases at equilibrium

Problem

Stem cracking of l thanm at 1oooK, 1 l tm

‘fwo phase hydrogarutloo of benscnc at SOCK, 30 ah

Liquid-liquid equilibrium of the system tolucnc- w&ter at 298K, 1 atm 2

Liquid-liquid equilibrium of the system toluene- water-aniline at 298K, 1 l tm 2

Vapour-liquid equilibrium of l mixture of hydrocarbons at 314K. 19.84 atm 2

lumber of

Colnponsntr ThcmLdyMmic

Model

9 Ideal gar

4 Levi8 rule

2 Nlln

NKrL

SoAVe- Redlich- Kvong

C.P.U. Time Univac 1106

(aec)

8

2

1

2

65

Table 8. Steam cracking of ethaoe at 1000 K, 1 atm

GU tine Feed component (moles) (molcs~

cH4 0.66569 x 10-l

C2H4 0.95456 x 1O-7 _

C2H2 lo-lo _

co2 0.544916 _

co 1.388514 _

_

% 5.345207 .

H20 1.521654 4.0

‘2”6 0.16714 x 1O-6 1.0

Total moles 8.866060 5.0

Page 8: Computation of phase and chemical equilibria

J. C~srnu, and I. E. GROSSMANN

Table 9. Two-phase hydrogenation of benzene at 500 K, 30 atm

CoPDonent

ca4

H2

‘6’12

Liquid Phase Vapour Pbae Feed ~molc fraction) @ale frms,ion) ~molea)

0.39375 X 10’3 0.36680 x 1O'3 1.0

0.22879 I 1O-2 0.76204 x 10 -1 3.05

0.997318 0.923427

Total mole8 0.391158 0.660034 4.05

parameters of the NRTL model for predicting the activity coefficients were obtained from Bender & Block[19]. As can be seen from Table 10, the agreement between the calculated and experimental values for the toluene-water system is quite good. The computed equilibrium compositions of the system water-toluene- aniline are given in Table 11. The distribution coefficient of aniline, defined as the ratio of the weight fractions of

aniline in the toluene-rich phase and in the water-rich phase, equals 24.595, which fits very closely with the experimental data given in Reid et al. (p. 374, [201).

Finally, the vapour-liquid phase equilibrium of nine components is shown in Table 12. The fugacities in both phases were predicted by the Soave-RedlichKwong equation of state with the parameters given in Reid et al.[20]. The CPU time required in this example confirms

Table 10. Liquid-liquid equilibrium of the mixture toluenewater at 298 K, 1 atm

colxbonent

water

Toluaac

Tolucnc-rich phase (mlc frmztion)

EXV. C61.

0.0026 0.00255

0.9974 0.99745

Water-rich phase @ale fraction)

EXP. Cal.

0.99987 0.99990

o.OoO13 0. WOlO

Table 11. Liquid-liquid equilibrium of the mixture toluene-water-aniline at 298 K, 1 atm

Toluene-rich phase Water-rich phase Peed component IweiRht fraction) (weight fraction) @eight fraction)

water 0.015692 0.974441 0.04633

Toluene 0.366924 0.000457 0.35521

Aniline 0.617384 0.025102 0.59846

Total Grama 75.21682 2.48318 77.7000‘0

Table 12. Vapour-liquid equilibrium of a mixture of hydrocarbons at 314 K, 19.84 atm

vapour Liquid Peed Comvonent (mole fraction) (mole fraction) (mole fraction)

nethane 0.80976 0.08301 0.61400

Ethane 0.12021 0.05479 0.10259

n-PrlYpalle 0.04549 0.06169 0.04985

i-Butane 0.00590 0.01732 0.00898

n-Butane 0.01173 0.04673 0.02116

i-PamIne 0.00230 0.02059 0.00722

xl-Pentam 0.00305 0.03578 0.01187

n-lieteune 0.00156 0.04905 0.01435

i-Pentadecane 0.00000 0.63104 0.16998

Total Iblem 0.70790 0.26100 0.96890

Page 9: Computation of phase and chemical equilibria

Computation of phase and chemical equilibria 107

the observation made by Dluzniewski & Adler[Zl], in that the standard flash equilibrium procedure is com- putationally more efficient compared to the minimization of the Gibbs energy when the two phases are known to exist.

DISCUSSION OF NUMERICAL AWECIS

The numerical results show that the proposed method required modest computation times except for the last example. It is interesting to note that in example 2 there was not much difference in computing times between the case when phases were eliminated, and the case when all postulated phases existed at equilibrium. However, in example 1, 1 set of CPU time (UNIVAC 1106) was required when the correct phase, vapour, was assumed to exist, whereas 17 set were required when the vapour and liquid phases were postulated to exist at equilibrium. For this case Gautam & Seider[4] report that with their phase-splitting algorithm 2.14sec of CPU timet (UNI- VAC 90/70) were required to remove the liquid phase. Although this could suggest that the method presented in this paper is not always as fast as the method by Gautam & Seider[4] for determining phases, it is reliable as no difficulties were encountered in converging to the solu- tions of the examples with different starting points.

As for the handling of non-negativity constraints, our numerical experience has indicated that usually less computing time is required when using constraint (13) that when the quadratic approximation in (12) is used. Since constraint (13) is simpler to handle and it intro- duces only small error, it would seem the better choice for avoiding problems with zero-concentrations. However, for applications where handling trace amounts of moles is important, the approximation in (12) should be used since constraint (13) can produce very large gradients for extremely small concentrations (e.g. smaller than lO_“).

Finally, it should be noted that the proposed method circumvents problems encountered in the method by George et a1.[171 which can be used for eliminating phases. In their method it is necessary to select a set of independent variables in the mass balance equations (3) and (4) so that the dependent variables never attain negative values. Also. the fact that exponential trans- formations are used to eliminate non-negativity con- straints can lead to ill-conditioning for small concen- trations which slows down considerably the convergence to the solution.

Acknowledgement-We would like to thank Dr. W. Seider for his helpful comments on our paper.

NOMENCLAIVRE

number of gram-atoms of element j in component i total number of gram-atoms of element j fugacity of component i in phase k Gibbs energy index set of the components index set of the phases index set of the postulated phases number of moles of component i in phase k total number of moles of component i number of components number of chemical elements

tBoth computers, the 1106 and the 90/70 have roughly the same speed.

Np number of phases NP number of postulated phases

R ideal gas constant T temperature

Greek symbols (I tolerance

aii binary parameter of NRTL equation p tolerance

AGf Gibbs energy of formation of component i Ai Kuhn-Tucker multiplier for the jth mass balance con-

straint up chemical potential of component i in the ideal gas state at

temperature T and unit pressure pi” Kuhn-Tucker multiplier for the non-negativity constraint

of component i in phase k qi binary parameter of NRTL equation

1.

2.

3.

4.

5.

6.

7.

8.

9.

10.

11.

12.

13.

14.

IS.

16. 17.

18.

19. 20.

REFERENCES

W. D. Seider, R. Gautam & C. W. White III, Computation of phase and chemical equilibrium: A review. ACS Symp. Ser., No. 124, Computer Applications to Chemical Engineering (1980). W. B. White, S. M. Johnson & G. B. Danzig, Chemical equilibrium in complex mixtures. J. Chem. Phys. 28, 751 (1958). R. C. Oliver, S. E. Stephanou & R. W. Baier, Calculating free-energy minimization. Chem. Engng 69, 121 (1%2). R. Gautam & W. D. Seider, Computation of phase and chemical equilibrium. Part I: Bounded minima in Gibbs free energy. Part II: Phase splitting. AIChE I. 25,991 (1979). R. W. H. Sargent & B. A. Murtagh, Projection methods for non-linear programming. Math. Prog. 4, 245 (1973). M. Model1 & R. C. Reid, Thermodynamics and its Ap- &cations. Prentice-Hail. Enalewood Cliffs. New Jersev i1974). M. Avriel, Nonlinear Programming Analysis and Methods. Prentice-Hall, Englewood Cliffs, New Jersey (1976). H. G. Othmer, Non-uniqueness in phase and reaction equili- brium computations. Chem. Engng Sci. 31,993 (1976). R. A. Heidemann, Nonuniqueness of equilibria in closed reacting systems. Chem. Engng Sci. 33, 1517 (1978). G. Soave, Equilibrium constants from a modified Redlich- Kwona eauation of state. Chem. Engnp Sci. u). 847 (1974). H. Reion- & J. M. Prausnitz, Locar compositions in the;- modynamic excess functions for liquid mixtures. AIChE I. 14, 135 (1%8). G. M. Wilson, Vapor-liquid equilibrium XI. A new expres- sion for the excess free energy of mixing. J. Am. Chem. Sot. 86, 127 (1964). D. S. Abrams C J. M. Prausnitz, Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE J. 21, 116 (1975). J. M. Prausnitz, Molecular Thermodynamics of Fluid-Phase Equilibria. Prentice-Hall, Englewood Cliffs, New Jersey (1%9). R. V. Sanderson & H. H. Y. Chien, Simultaneous chemical and phase equilibrium calculations. Ind. Engng Chem. Proc. Des. Deu. 12,81 (1973). B. George, Ph.D. Thesis, The University of Tulsa (1973). B. George, L. P. Brown, C. H. Farmer, P. Buthod & F. S. Manning, Computation of multicomponent, multiphase equilibrium. Ind. Engng Chem. Proc. Des. Deu. 15, 372 (1976). R. E. Balzhiser, M. R. Samuels & J. D. Eliassen, Chemical Engineering Thermodynamics. Prentice-Hall, Englewood Cliffs, New Jersey (1972). E. Bender & U. Block, Verfahrenstechnik 9, 106 (1975). R. C. Reid, J. M. Prausnitz & T. K. Sherwood, 7’he Proper- ties of Gases and Liqaids, 3rd Edn. McGraw-Hill, New York (1976).

Page 10: Computation of phase and chemical equilibria

108 J. CA.STILLO and I. E. GROSSMANN

21. J. H. Dluzniewski & B. S. Adler, Calculation of complex Engineeting Thmodynamics, 2nd Edn. McGraw-Hi& New reaction and/or phase equilibria problems. I. Chem. E. Symp. York (1959). Ser. No. 35,421 (1972). 23. Thermodynamics Division, Institute Mexican0 del Petileo,

22. J. M. Smith & H. C. Van Ness, Introduction to Chemical personal communication (1978).