An estimation of chemical equilibrium in a heterogeneous multicomponent system

An estimation of chemical equilibrium in a heterogeneous multicomponent system

Calphad Vol. 19, NO. 3. pp. 305-313, 1995 Copyright (0 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0364-5916195 $9.50 + 0...

620KB Sizes 5 Downloads 88 Views

Calphad Vol. 19, NO. 3. pp. 305-313, 1995 Copyright (0 1995 Elsevier Science Ltd Printed in Great Britain. All rights reserved 0364-5916195 $9.50 + 0.00

Pergalmon

0364-5916(95)

AN ESTIM.4TION

00028-3

OF CHEMICAL EQUILIBRIUM IN MULTICOMPONENT SYSTEM

A HETEROGENEOUS

Petr Votia and .Imd?lch Leitner Prague Institute of Chemical Technology Technicka 5, 166 28 Praha 6, Czech Republic

ABSTRACT

A simple algorithm which always converges for estimating the phase composition and compositions of multicomponent phases of a reacting heterogeneous multicomponent closed system has been proposed and its convergence proved. The thus obtained estimation serves as the first approximation of a chemical equilibrium calculation at given temperature, pressure and feed composition. The model of a totally immiscible system is applied and the blast furnace problem is presented as an example for the demonstration of the algorithm. All mathematical proofs are contained separately (see Appendix).

Introduction In applied chemical thermodynamics the determination of chemical equihbrium of a closed system at given temperature aud pressure represents one of the most important calculation problems. Results of the calculations serve for the determination of chemical technology limits at different reaction conditions (temperature, pressure and initial composition). The calculation method is very often based ([l] - [9]) on the minimization of the Gibbs energy on the set of points satisfying non-stoichiometric mass balance equations and on the method of the consecutive exclusion and inclusion of the phases from and into the calculation process until the system is thermodynsmically stable with respect to the phases not included in the system. A “good” first approximation of the phase composition (i.e. which of the phases will be present in the equilibrium for the given reaction conditions) and multicomponent phase compositions promotes the speedy and reliable calculation of the chemical equilibrium. Probably the best approach of how to estimate the first approximation is based on the assumption of a totally immiscible system, i.e. each substance creates a single-species phase. The Gibbs energy of such a system is the linear function of the number of moles and, therefore, methods of linear prog ramming or special methods, utilizing specifications of the chemical equihbrium calculations, can be used ([lo], [ 111). The removal of the mixing effects (i.e. logarithmic terms in the Gibbs energy function are neglected) significantly simplifies the numerical process but, on the other hand, some reaction conditions (e.g. influence of inert substance) cannot be considered. Nevertheless, our experience convinces us that the model of immiscible substances always offers a sufficiently good first approximation for calculations of chemical equilibria of a system where the state behaviour of each multicomponent phase is described by a different model. If, e.g. a liquid phase is not thermodynamkahy stable for the given reaction conditions and splits into the two liquid phases (containing the same substances where both liquid phases are described using the same activity coefficient model) then the course of the numerical process depends in a sensitive manner on the first approximation and the process can converge to the so called Original

version received on 29 July 1994, Revised version on 6 &ptember 305

1995

306

P. VOXKA

AND J. LEITNER

trivial solution (calculated compositions of both phases are identical). To avoid such a phenomenon it is usually necessary to choose very carefully the initial compositions of both liquid phases [12]. If each considered multicomponent phase is thermodynamically stable, with respect to the formation of a miscibility gap, then the Gibbs energy of the system is a convex function of composition. Fortunately, for the most practical chemical equilibrium problems, state behaviours of multicomponent phases can be described using different and thermodynamically stable models and, therefore, no special restrictions are required for the first approximation of the equilibrium state. The main goal of this paper is to propose a calculation procedure that is a modified Eriksson and Thompson approach [ 1 l] and, above all proves the convergence of the proposed method. Results obtained for the model of the totally immiscible system are used for the estimation of the multicomponent phase composition. Numerical singularities are discussed as well. All mathematical proofs and discussions are contained in the Appendix.

2. Theory Let us consider a closed system where there is no work involved other than that related to volume change (pressure-volume work). The determination of the chemical equilibrium of such a closed system at constant temperature T and pressure p is equivalent to the finding of a point of the global minimum of the total Gibbs energy G on the set of points n = (nt, n2, . . ., nN) satisfying the material balance equations. It is possible to formulate this problem in manner 1* rain a;

O=

Pini

,c

(1)

~~QLQ

=b,

Pi 2 0

,=-i,a,...,M i=l,a,...,N

where N is the number of substances, rri the number of moles of the i-th substance, M the number of chemical elements of which the system is composed and C(ithe chemical potential of the i-th substance in the phase in which the i-th substance is considered. Matrix A = {ait} is the matrix of constitution coefficients (yi is number of atoms of the j -th element in the molecule of the i -th substance) and bj the total amount of moles of the j -th element in the system. We shall always assume N > M and rank(A) = M. If rank(A) < M then the linearly dependent rows of matrix A are removed and the new value of M, M = rank(A), is considered. In general, compositional restrictions may be incorporated into the set of equations An = b (see Smith and Missen 131, chapter 2.4). Let us define function L I

L=ff+tA,(b,j-1

(2)

a,,nJ

where {5} are Lagrangian multipliers. From this it follows on the basis of the theory of mathematical programming [ 131 that the following Kuhn-Tucker conditions (KT conditions) are necessary for the solution of the problem (1) Pi >o

i=l,2,,

....N j=l,s!,...,ar

(3) ifn, > 0 then

ajikj

= 0

4iQ

2 0

I

ifn, = 0 then

g i

= Pi -

F=I

From now on let us consider each substance to create a single-species

(one component) phase. In such

CHEMICAL EQUILIBRIUM

IN A HETEROGENEOUS

MULTICOMPONENT

307

SYSTEM

a case the total Gibbs energy doesn’t contain logarithm terms and for given temperature T and pressure p it is a linear function of variables nl, i= 1,2,. . . ,N. Then /tiis equal to the molar Gibbs energy of the pure i - th substance @base) and depends only on temperature and pressure. From linear programming [13] it follows that conditions (3) are not only necessary but also they are sufficient conditions for the solution of the problem (1). If numerical singularities (see Appendix 1) are neglected then 1) The problem (1) has a unique solution. 2) In equilibrium just M substances (phases) exist for which ni > 0 (i.e. just N - M substances for which ni = 0). The constitution matrix, consisting of only these M substances is regular, i.e. it is not possible to write any chemical reaction containing only these M substances. In the following text the numerical singularities

are not considered.

3. Method of Calculation numerical process consists of several steps : 1) Let us choose M substances (phases) which are characterized by the set of indexes I = {it, i,, . ..,iM}

lie

and satisfy the following two requirements : (a) Let A, be the constitution matrix composed from only the M chosen substances (i.e. A, is a square matrix of order M). Then A, is regular matrix. @) Set of linear equations Aln = b has a positive solution. The set of M substances satisfying both requirements is called the set of basic substances. Two principal ways exist for the choice of basic substances (see Appendix 2). 2) Vector X = (Al, &, . . . . &) is the solution of a set of linear equation AT X = c where matrix AT is transpose of A, (see the third row of KT conditions (3)). 3) The last KT condition is tested for each i 4 I. The symbol i 4 I means that the index i is not element of the set I. rf the last KT condition holds for all i 4 I then the equilibrium state is determined and this part of the calculation process completed. If not index &,,, 6! I I

f(f,,)

ier,

=minf(f),

Pf -

f(f)

=

F 4r %

e=Ljf

(4)

j=l

is calculated. As obvious, value f(i_.) is negative. One original substance of the old set of basic substances will be replaced in such a way by the substance with order number i,, that new matrix A1 will fulfil both requirements from point 1 (see Appendix 3). After that we again go back to point 2. It is possible to prove (see Appendix 4) the convergence of the proposed finite iterative process because the values of Gibbs energy create a strictly decreasing sequence Ql > Q2 > Q3 > . . .

(5)

where Gi is Gibbs energy in the i-th iterative step. The set of potential sohtions (all sets containing M substances) is finite and, therefore, fulfilhnent of the relation (5) guarantees convergence of the proposed numerical process. 4. Determination

of First Amroximation

The procedure described in the previous section gives us a set of M basic substances present in equilibrium. For application in chemical equilibrium calculations it is necessary not only to estimate which phases are present in the equilibrium but also the composition of the multicomponent phase when some of the above mentioned M substances belong to that phase. It is possible to use as the most simple method a procedure where substances having non-zero amounts of moles will not change these values and the number of moles of orher substances will be equal to a “small” value E. Such an approach keeps (from the practical

308

P. VOGKA AND J. LEITNER

point of view) the validity of the mass balance equations but especially for phases containing substances with similar properties (e.g. isomers) estimation far from the equilibrium state can be thus obtained. A better method of how to estimate the composition of a multicomponent phase is based on the following idea : From (3) it follows that the equilibrium conditions of substances from an ideal solution have the following form Y

I

1, -

F

a,1

1, = pi

+ l?TlnX,

-

-1

F

a,lA,

= 0

iEK

(6)

-1

where cci*is chemical potential (molar Gibbs energy) of the pure substance at given temperature and pressure, xi is mole fraction of the i-tb substance in the phase in which the i-tb substance is considered and “K” is set of order numbers of substances which belong to a multicomponent phase. The symbol i E K means that the index i is element of the set K. Values of the Lagrangian multipliers, acceptable as the first approximation of chemical equilibrium of the real system, are, therefore, calculated from the following set of equations

where values of mole fractions xi and set of basic substances “I” have been determined in the previous chapter. Set(7)isasetofMequationsforMunknowns+j=1,2,..., M. Pseudo mole fractions xi are then calculated from the relation (8)

and final vaIues of mole fractions are obtained after normalization of their values in each multicomponent phase. In this second method we usually obtain a much better estimation of the multicomponent phase composition. The price we paid for it is a slightly worse satisfaction of the mass balance equations.

5. Example The well known blast furnace problem [ 141was chosen as an example. Lists of substances, iuitial amounts, input thermodynamic data and final results are contained in the Table I. The ideal gas model is used for the description of the gaseous phase. Tables II and III contain information on the iterative process of the one-component phase model where first and second initial choice of the basic substances (see Appendix 2) is used, respectively. Five or nine iteration steps are necessary for the determination of the initial set of basic substances. Therefore, Table III contains only information as to the presence or not of a single-species phase (P = present) in the considered iteration step. For a better orientation the gaseous, solid and artificial substances are separated by use of single lines and bold letters are used for artificial basic substances. The last row in Table II contains a decreasing sequenuz of Gibbs energies. Even though the number of iterative steps of the first choice is lower thau for the second choice, the first approach is much more time consuming than the second one because point 1 from section 3 is for the first choice relatively time consuming. The considered problem also serves as an example, i.e. how an empirical approach to estimate the phase composition can fail if material balance equations are not sufficiently respected. Not all input phases (gas, Fe, FqO.+ C, CaO aud CaCO, ) can be included into the calculation because their lwmber is too great with respect to the Gibbs phase rule. On the other hand, an input set of phases (for example, gas, Fe0 and CaO) is not allowed because the considered phases can not “consume” all moles of the carbon. In general, this problem can be solved by extension of the system by all chemical elements (composing the system).

CHEMICAL EQUILIBRIUM

IN A HETEROGENEOUS

MULTICOMPONENT

SYSTEM

309

A relatively very simple algorithm which always converges, allowing the estimation of the phase amounts, and compositions of multicomponent phases has been proposed and its convergence proved. Such an estimation is acceptable as the first approximation for the iterative numerical process and serves for the determination of the chemitd equilibrium at given temperature, pressure and initial composition.

TABLE I Blast Furnace Problem at 1048 K and 0.1 MPa; Results gaseous

Gibbs

input

gas phase.....mol %

and solid

energy

amounts

solid phase.. .mol

species

FJ/mol]

[mall

approx .

equilib.

Nz (g)

-217.75

187.1

61.74

66.49

02

(g)

-233.57

20.46

.4E-18

.7E- 19

H,

(id

-154.11

0

2.07

2.08

H,G (g)

-460.72

1.775

0.42

0.15

CG (g)

-335.69

0

29.04

28.80

CO2 (g)

-643.59

0

6.73

2.48

CH4 (g)

-297.32

2.255

0.7E-3

0.2E-3

-45.93

3.527

35.43

42.83

-366.56

0

7.40

0

13.1

0

0

0

0

0

85.59

0

0

-703.76

0.6063

0.7562

0.7562

- 1358.00

0.1499

0

0

Fe (s) Fe0 (s) Fe304 (s)

- 1380.00

Fe203 (~1

-991.50

C (s) CaO (s) CaCO, (s)

- 14.03

This work was supported by the Grant Agency of Czech Republic through Grant No. 106/93/@298.

References 1. 2. 3. 4. 5. 6.

White W.B., Johnson S.M. and Dantzig G.B., J. Chem. Phys 28, 751 (1958). Vorlka P. and Holub R., Coll. Czech. Chem. Commun. 36, 2446 (1971). Smith W.R. and Missen R.W., Chemical Reaction Eqdibrium Analysis: Theory and Aigodhms. Wiley, New York (1982). Smith W.R. and Missen R-W., Can. J. Chem. Eng. 66,591 (1988). Erilcsson G., Acta Chem. Scand. 25, 2651 (1971). Eriksson G., Chem. Scripta 8, 100 (1975).

310

7. 8. 9. 10. 11. 12. 13. 14.

P. VOiKA

AND J. LEITNER

Eriksson G., Anal. Chim. Acta 112,375 (1979). Eriksson G. and Hack K., Met. Trans. B, 21B, 1013 (1990). Voilka P. and Leimer J., CALPHAD 19, 25 (1995). Smith W.R. and Missen R.W., Can. J. Chem. Eng. 46, 269 (1968). Eriksson G. and Thompson W.T., CALPHAD 13, 389 (1989) Voilka P, Novak J.P. and MatouS J., Coil. Czech. Chem. Commun. 48, 3177 (1983). Dano S., Nonlinear and Dynamic Programming. Springer - Verlag, New York (1975). Madeley W.D. and Toguri J.M., Jnd. Eng. Chem. Fundam. 12, 261 (1973).

TABLE II Iterative Process of One-component Phase Model for Blast Furnace Problem at 1048 K and 0.1 MPa; First Possibility of Choice of Basic Compounds

single

Nz

mole numbers of species at all iter. steps

11

21

31

41

187.1

187.1

187.1

187.1

4

0

0

0

0

H2

0

0

6.285

6.285

0

0

H20 co co2

6.285

6.285 0

0

12.43

0

44.55

187.1 0 6.285 0

80.60

47.69

0

5

87.99

7.40

0

0

0

CH4

0

Fe

0

Fe0

0

0

0

0

7.40

Fe304

0

0

0

0

0

0

0

0

0

0

0

0

42.83

42.83

Fe;?03

21.41

C

75.56

43.44

40.30

CaO

.7562

.7562

.7562

CaCO, GIMJI

0

-74.46

0

1

-75.42

42.83

.7562

0

1

-75.47

35.43

.7562

0

I

-76.03

0

1

-76.12

CHEMICAL EQUILIBRIUM

IN A HETEROGENEOUS

MULTICOMPONENT

SYSTEM

311

TABLE III

Iterative Process of One-component Phase Model for Blast Furnace Problem at 1048 K and 0.1 MPa; Second Possibility of Choice of Basic Compounds (P = present) single species Nz

phase solution at each iterative step 1 -

02 H2

2 -

3 -

4

5

P

P

6

7

8

9

P

P

P

P

-

-

-

-

-

-

-

-

-

-

P

P

P

P

P

H,G co

-

-

-

-

-

-

-

P

P

co,

-

-

P

P

P

P

P

P

-

(334

-

-

-

-

-

-

-

-

-

Fe F&

-

-

-

-

-

-

_

_

_

-

P -

P -

P _

P P

Pe3G4

_

_

_

-

-

-

-

-

_

Fe203 C

-

-

-

-

-

-

P

-

-

CaO CaCG,

-

P -

P -

P -

P -

P -

P -

P -

P -

C

P

P

P

P

P

P

-

-

-

H

P p

P p

P -

P -

-

-

-

-

-

Ca

P p

P -

P -

P -

P _

-

-

-

-

N

p

p

p

-

-

-

-

-

-

0 Fe

ADDendix 1 - Numerical Sin -of

*’

Numerical singularities occur on phase boundaries. The following examples will serve as demonstration. Let us consider a system consisting of liquid and gaseous water (M = 1, N = 2) at subcritical temperature T and pressure of saturated gas p”. In such a case pl = k2, and Gibbs energy G is a constant function. An arbitrary non-negative point (nl, nz>, satisfying the mass balance equation nl + n2 = t+,t, solves problem (l), where ntot is total number of moles of water in the system. The problem (1) does not in this case have a unique solution. The number of moles of a vanishing or originating i-th substance (phase) on the phase boundary is equal to zero and also aL/fJr+ = 0. In such a case the set of basic substances contains less than M substances. This phenomenon is not only influenced by temperature and pressure but also by the choice of feed (initial) composition {bj}. Let us consider substances (phases) X, Y and XY &I = 2, N = 3) where PXY < PX + py. Three pairs (X,Y), (X,XY) and (YJY) exist which can satisfy the equilibrium conditions in the relation (3). But only two of them (X,XY) and (Y,XY) satisfy the last KT condition for the non-included substance.

312

P. VOiKA AND J. LEITNER

The values of bx and bv contained in the mass balance equations

n, + n,

= bx

(Al-11

nr+ nm = b,

“decide” whether the first or second pair will be present in the equilibrium. If bx > bY then the pair (X,XY), if bx < bv then the pair (Y,XY) and if bx = bv then only substance XY is present in the equilibrium. We shall also assume that the initial number of moles no, b = An’, allows courses of all independent chemical reactions and, therefore, the set of positive sohrtions of equations An = b is not empty. For example, the system {C%, Hz, CO and H20} where the initial mixture contains only Hz and CO does not satisfy the above mentioned assumption. Existence of such artificial problems will be also neglected. It is evident that the described phenomena are “isolated” and from numerical point of view are not important for single calculations. A small change of reaction conditions (temperature, pressure and feed composition) removes numerical singularities. ADD~&X

2 - Initial choice of basic substances .

As mentioned above there exist two principal ways to decide how to choose sequence I = {iI, i,, . . .,iM} guaranteeing the fuhllhnent of both properties of matrix A, :

1) Let us consider quautities {dl} i=l,2

I

.

..I

nr

(AZ-l)

These parameters enable a better estimation of the thermodynamic stability of each substance. Let us change the order of substances to achieve the validity of the relation : dl < 4 c . . . < dN. Let us gradually test the sets containing M substances till one of them satisfies both requirements for Al. Because we search for these M substauces starting in the sequence of substances from the lower order numbers to higher ones, the found M substauces present a set of relatively stable substances. It is possible to expect that the remunberiug of the substance sequence will shorten the calculation time. 2) The second procedure is based on the inclusion of M artificial chemical elements into the calculation with such great values of pjj = N+l,..., N+M that guarantee these artificial substances not to be present in e@ibrium (Vdlle.9 of pi = co1]st. = 10.max(abs{di}) are used in our program). These artificial substances creates the set of basic substances because matrix Al corresponding to artificial chemical elements evidently satisfies both requimments. mndix

3 - Be

.

&r@n.

of m&m * AI Let us have a set of basic substances with order numbers from the set I = {it, iz, . ..&} and a substance with the order number &,41. We would like to remove one element from I and to replace it by &,, in such a way as to keep the regularity of new matrix A, and a positive solution of the set of linear equations Aln = b. Let us consider the set of equations Y

ajipi, -;I= -1

+ aji_*i_ = bj

j=l,l,...*Y

(A3-1)

If%oew = 0 then the set of equations obviously has a regular matrix and a positive solution (from the formal point of view we use index i-new instead of i&. With increasing value of nl__ at least one value of ni i E I will converge to zero. Let us denote i-old the index of the substance which first gets zero mole number. Let us change substauces with order numbers i-new and i-old . Evidently the new set of equations Arn = bhasapositivesohnionbutmatrixAIneednotberegular.Ifsuchacaseoccursthenitisnecessaqtogo backtopoint3insection3~tochoosethenextvalueofi,

CHEMICAL EQUILIBRIUM

IN A HETEROGENEOUS

MULTICOMPONENT

SYSTEM

313

4 - Proof of relation (3

&mdix

From (1) and (3) it follows I

B

G =

c

wpj

=

i-1

FF -1

Y =

I

a,lA,)nf

(

(A4-1)

I

FF( -1

=

-1

Y

a,lnl) 1, = -1

F Ajbj -1

We would like to prove Gnew < Gold, i.e. (A4-2)

Vectors Aold1orAEw - X”ld + Ah are solutions of equation sets Y F=I

41

h

old

=

ie

Pi

I-old

(A4-3)

or i E I_new

j$ aji ( 1;‘” + A A.j) = Pi

(A4-4)

With the exception of one substance @base) the sets I-old and I-new are identical. Let us assume that substance wirh order number iM was replaced by the substance with order numkr &,,. Then the set of equations (A4 -4) bas then tbe following form I

c -1

ajiAAj

= 0

i==fp

ia* . ..r& (A4-5)

Y

old 4A

f=i_

F -1

The term on the rigbt side of the last equation is negative (see eq. 4). Let us multiply the first eq. in (A4-5) by ql, tbe se:cond one by I& etc. and after that let us add tbese equations. We get (A4-6)

(A4-7)

evidently complete3 the proof.