Are the Equilibrium Compositions Uniquely Determined by the Initial

Properties of the Gibbs Free Energy Function. E. Weltin. University of Vermont. Burlington, VT 05405. The problems of calculating the concentrations o...
0 downloads 0 Views 4MB Size
edited by

JAMESP. BIRK

computer series, 174

Arizona State Universm/ Tempe. A7.85287

Are the Equilibrium Compositions Uniquely Determined by the Initial Compositions?

selected initial concentrations. No additional chemical information is required.

Properties of the Gibbs Free Energy Function

Ideal Mixtures at Constant Temperature and Pressure Consider a mixture of n chemical species, present a t amounts y;, with a total amount of substance

E. Weltin

University of Vermont Burlington, VT 05405 The problems of calculating the concentrations of chemical species a t equilibrium has been the topic of numerous papers and, no doubt, will inspire many more manuscripts. Computational short cuts, simplifying assumptions, and the use of spreadsheets and special-purpose programs have been suggested. Indeed the more chemical knowledge that one can bring to such a problem, the more likely one is to find an efficient way to solve the problem. Few hooks address the important question of whether the equilibrium concentrations a t a given pressure p and temperature T a r e uniquely determined by the initial coucentrations. The text by Smith and Missen ( I )is among the exceptions. Typical texts in general chemistry or physical chemistry invariably cite a n equilibrium problem t h a t leads to a quadratic equation, and they then demonstrate that only one of the two solutions is chemically meaningful. No further comments are made about the uniqueness of solutions. This is quite surprising, considering how easy i t is to show that, for single-reaction systems, the equilibrium concentrations are uniquely determined by the initial concentrations ( 2 , 3 ) i f p and T, which are kept constant, are independent. Cobranchi and Eyring ( 4 ) have laboriously calculated 25 solutions to a complex equilibrium problem to find that only one is chemically meaningful and 24 have no physical significance. After verifying, by different means, that the chemically significant solution is unique, we have presented a much more efficient solution to the same problem (5). In addition to processes described by a single chemical equation (21, we have also discussed stepwise (6)and coupled ( 7 ) processes. In this paper we consider the general case where the chemical species present a t equilibrium together with their free energies of formation, AGP, a r e given. Aprocedure is outlined by which a computer is able to calculate the equilibrium composition that results from

508

Journal of Chemical Education

Y=Cn We have choseny;to represent independent variables because x, is usually reserved for mole fractions yiM. We may regard the n amounts, which must be positive or zero, a s components of an n-dimensional composition vector, Y=lYl,~2, . . .~ " 1

The Gibbs free energy G(y) is an extensive variable, and therefore

for any positive constant a. At constant pressure p and temperature ?: G can be expressed a s

where fi, is the chemical potential of component i and is defined by (constantp, T,yj. j .Tyj

#

i)

(2)

Equations 1 and 2 follow from Euler's theorem (8, 9) for homogeneous functions of degree 1. By definition, an ideal mixture satisfies

I t follows that

G=

k)]

s;[~: +RTh

For simplicity we consider a single-phase system. If more then one phase is present, a n expression (eq 4) holds individually for each phase, and the total free energy is

simply the sum of the free energies of each phase. The partial derivatives of G a t constant T a n d p are

The progress variable A for a reaction r is defined relative to a starting composition ys and is restricted to the chemically significant intervals ( I , 101,

and

The matrix M of second derivatives, the so-called Hessian, has the elements

If only a single species is present, then G is directly proportional to yl,and the second derivative is zero. For two or more species, clearly Mji > 0.Based on the special structure of the Hessian, one can verify the following.

As we have shown previouslv (12) a list of the chemical species present a t equilibrium by chemical formula and charge defines the n x m formula matrix, F, one row per species and one column per element or charge. With m' I. m linearly independent columns, the number n, = n - rn' of independent reactions is a characteristic property of the system. Matrix techniques (8,11,12) are used to determine n, and a set of independent balanced chemical equations I'R', where k = 1,2, ...,n,. If n, > 1the choice of the basic independent reactions is quite arbitrary, and any number of balanced reactions may be written. Students of Filgueiras (13) found a sizable number of balanced chemical equations for the system containing C D - , C1-, HI, C102, and HzO; this is expected because this svstem has n. = 2. Anv linear combination of two, indepeident, basic reactions"is then also a balanced chemical reaction. ' h o possible sets of basic reactions are

The determinant of M is 0. All principal minors-that is, determinants derived from M by striking out one or more rows and the corresponding columns-are positive. Therefore M is positive semidefinite with exactly one eigenvalue of zero and n - 1 positive eigenvalues. The eigenvector belonging to the zero eigenvalue is proportional t o y itself. On physical grounds this is clearly necessary because multiplying y by a n arbitrary positive cons t a n t multiplies G with t h e s a m e constant, a n d t h e curvature (i.e., the second derivative in the direction y ) must be zero. With t indicating the transpose, we get the following. In any arbitrary other direction r, the second derivative

rbTr and therefore the curvature is positive. This remarkable property is the key to the discussion below. Free Energy of a Closed System Although the previous section is concerned with a n arbitrary change of the composition, we consider now a closed system a t constantp and T. An allowed change A.r of comoosition from vB to v6+ A.r is restricted bv mass- and char~e-conservationlaws to possible chemical reactions among the given chemical species. The components of r, not necessarily integral, are stoichiometric coefficients of a balanced chemical reaction and are

negative for reactants positive far products zero far spectator species in the reaction 'The affinity of reaction is defined as

-

and is a function of the progress of reaction h. In the chemically allowed interval. A(h) varies from +- to with no minima or maxima inside the interval. At equilibrium A(heq) = 0. See Everdell, M. H. Introduction to Chemical Thermodynamics; Norton. 1965.

and

The Chemical Equilibrium

The chemical equilibrium is characterized by the condition that the free energy is a minimum, subject to the constraints of mass and charge conservation. This implies that the derivative of the free energy in the direction of each reaction vector is zero (14,151 a t equilibrium.

According to eqs 1 and 2 this relation is equivalent to

which is computationally convenient but otherwise not relevant because the direction in which a svstem chanees is determined by the local structure of the free energy fu& tion a t the current composition.' This was clearly recognized by MacDonald (16)who even suggests t h a t a separate symbol, a filled delta, should be used in equilibrium discussions. If the system under consideration can undergo only a single chemical reaction or totally unrelated reactions, the bisection method described in ref 2 is a very efficient method to calculate equilibrium compositions. Either the original form given in ref 2 may be used or, more closely related to the present discussion, a logarithmic criterion may be applied. Volume 72 Number 6 June 1995

509

A Logarithmic Criterion ~the ' reactant side of Atrial composition y = yS + ~ . lis'on equilibrium, that is, A < L,, if for the s u m s , we g e t s < 0, where s is defined a s

A positive s indicates that h > L,in which case the direction toward equilibrium i s the reverse of the chemical equation a s written. Calculating Equilibrium Compositions The problem of calculating equilibrium compositions is mathematicallv a constraint-outimization problem, miniThe stationary mizing G or, equivalently, max&izing 4. point of G is a minimum, which follows directly from the positive semidefinite property of M and the fact that each r must have a t least one negative and one positive component (at least one reactant and one product) and therefore cannot be proportional to y. . . The free energy, of course, is a highly nonlinear function of the composition. However, Go,defined by

i s linear, and many concepts used in linear programming or linear optimization (17) apply to the equilibrium problem a s well. In particular all amounts yj must be nonnegative, and specifying an initial composition yQstablishes the linear numerical constraints by which elements and charges are conserved in any allowed chemical process. In analogy to the terminology of linear programming, we designate yo and any other composition y that satisfies the same constraints a "feasible composition". As a consequence of the linear nature of the constraints, anv two feasible comuositions can be directlv connected bv a balanced chemical-reaction such that every point along the reaction path also represents a feasible composition. We are now i n a position to establish the important result that the equilibrium composition is uniquely determined by the initial composition under very general conditions.' For any chemical reaction the free energy and the first derivative with respect to the progress of reaction A are continuous functions within the chemically allowed interval (all amounts of substance 2 0). Assume that two different minima exist a t ve and vf. Then somewhere along the line segment yf - ye 1 coupled chemical reactions3 a t constant D and T. There is a progress variable Ak for each reaction, and equilibrium is a t the feasible composition of minimum free energy At this noint the derivative of G with resuect to each A& i s zero, that is,

This relation must hold not only for the selected basic reactions but also for any acceptable reaction derived by forming linear combinations of the basic reactions. Second-Order Iterative Search Based on the relations (eqs 5-7) i t is easy to evaluate the first and second derivatives of G w.r.t. Ah A second-order iterative search based on these values seems a good choice. We have carried out extensive numerical experiments and found that such a n approach does work quite well for systems which, a t equilibrium, have all chemical species present in comparable amounts. The conditions for this are values of AGo close to zero for each reaction. In typical chemical processes this is, however, rarely the case; i t is much more likely that a few chemical species dominate the equilibrium composition while others are present only a t very low concentrations. This causes difficulties i n equilibrium computations because, in the two types of criteria, the mass- and chargebalance relations are primarily sensitive to the dominant species, whereas the derivatives of G or the reaction quotients are most sensitive to species present a t very small concentrations." The Simplex Algorithm If the AGQfthe reactions are not close to zero, the equilibrium composition will be close to the composition a t which Go itself is a minimum. For a given initial composition we first solve the constraint linear-optimization problem for Go. The simplex algorithm (16) i s the standard method. I t requires, however, that the values of yp are sufficiently negative that the algorithm does not terminate prematurely. Within the usual convention,

the standard free e n e r-"w of formation of suecies i is zero for elements and positive for some compounds. This convention selects the zero point of the free e n e r w a t all elements in the most stable state. A negative y! is strictly a requirement of the algorithm; i t is not inherent to the outimization uroblem. There is. therefore, a simple way to'get around ihe limitation: he free energy cannot be measured in absolute terms but is only defined relative to some arbitrarily chosen reference point. If we select a s reference the elements in the form of a monatomic gas and define p" as the free energy of formation of a chemical suecies from monatomic eases. then clearly the noble gases have p" = 0.All other chkmical species will have. a t T close to 298K. a neeative ,uo., usuallv of a quite substantial value. For Confor example,

-

C(g) + 20(@ -t C(s)+ 02(g)

-t

COz(g)

-~~ ,--8. Aiberty. R. A. Pkysim! Chemistry, 7th ed.: Wi!ey: New York,1987. 9. Brornberg, J.P Physical Chemist% 2nd ed.;Allmand Bacon: Boston, ~

p"

-AGFC(g) - 2AGTO(g)+ AGTCO2(g) = -671.26 - 498.34 - 394.36 = -1564.96

kJ

The result we seek from the linear optimization is the chemical composition a t the minimum of Go, but not the value O ~ G Oits&. This allows for a n even simpler computational approach. For the linear optimization only, we include with k? a characteristic negative offset for each atom in the chemical species i. The chemical composition a t the minimum of G" is then used as the starting point for the search for the minimum on the full free-energy surface. Choice of Basic Reactions The composition a t the minimum of Gohas the interesting property that the mole fractions of n, species are zero. We can then select a specific set of basic chemical reactions such that each of these n, species occurs in one and only one of the basic reactions with stoichiometric coefficient of unity. (The other coeff~cientmay then be fractions.) The sense of reaction is chosen to make AGO positive. The starting composition then is close to the equilibrium composition; each reaction proceeds only to a small degree. The reactions are ordered according to increasing AGO, and for each reaction in turn a search is carried out for the composition that makes s in eq 11zero. Actually we search for two very close values of h for which the s values have opposite sign. By just considering the sign but not the magnitude of s, we are relieved of ambiguities associated with the definition of extent of reaction. The nrocess is iterated until some general convergence criterion is satisfied. An excellent crosscheck for calculated eouilibrium compositions consists of calculating AG" for each reaction from the equilibrium compositions and comparing this to AGO derived from the chemical equation. It quickly becomes apparent that for a valid comparison the equilibrium concentrations must he calculated to a precision that lies way bevond w h a t m a v be considered iustifiable chemical precision. Any rounding of concentrations, however, should only be done after these tests have been carried out. Conclusions In the chemically allowed region the free energy G is a simple function in the sense that, for a given initial composition, it has a single extremum only: the minimum a t the equilibrium composition. I t is not a simple function in the sense that it cannot be well-approximated by functions of low order. I n fact, the derivatives (i.e., the reaction affinito +- . For a ties for any allowed reaction) range from system that can undergo only one reaction, the search for the equilibrium composition by bracketing is fast and very eff~cient.For svstems with two or more coupled reactions. of thc search for the equilibrium may be slow. c~~nvergrncc .Mnthematicnl difficult~csa r c assoc~atedw ~ t hcases where the mole fractions a t equilibrium range over many orders of magnitude. Nevertheless, the method outlined in this paper represents a feasible approach to solve chemical equilibrium problems on a personal computer. Not only is the equilibrium composition uniquely determined by the initial composition, the same equilibrium will be reached from any other starting mixture of chemical species provided i t satisfies the identical mass and charge constraints.

-

Literature Cited 1. Srnith, W. R: Missen, R. W Chemico! R m d o n Equilibti,'rn A n a h i s : Theory and rlionrithms. wiisu. N-W Y.. Y.Y I~ ,982 ~ .,..2. weltin, E.J. ch.m. E ~ U C1990.67.548. ~

10. Glairter. P J

1984.

Chem. Edue. 1992,69.51. 1 I. A1hertvR.A.J Cham. Educ. 1991. 68.9R4. 12. ~ ~ l t i r ? : ~ c. Jh m t Educ. 1994, 71:295. 13. Filgueires. C.A. L. J. Chrm. Educ. 1992.69.276, 14. Denbigh, K The PnncipliiifCiimiiiiEqzilibbiim.4th ed.;Ccrnbdge University, 1992. 15. Oeurnie, M.; Boulil, B.; Hen%Rousseau, 0. J , Chsm. Edue 1987.64.201, 16. MacDonald, J.J.J. Chem Educ 19SQ. 67,745. 17. Press, W. H.; Flannery, B. P.; Teukolsky. S. A ; Vetterling, W T. Numrical Recipes:

CamhedgeUniversity. 1989.

The Conformational Behavior of nPentane: A Molecular Mechanics and Molecular Dynamics Experiment Paolo Mencarelli Dinartimento di Chimica and Centro CNR di'studio sui Meccanismi di Reazione, Universita La Sapienza, 00185 Roma, Italy

The mowth of computational chemistry a s a field is due not oniy to its importance as a tool to understand and rationalize experimental chemistry but also to the constant increase ofEomputer power a n d t h e decrease in cost. This has greatly influenced the way we teach chemistry Many universities are revising their undergraduate and graduate curricula in order to provide students with a n introduction to comnutational chemistrv ( I ) . This situation is reflected by t'he number of com&ter-related articles that have appeared in this Journal ( 2 ) . While searching for computational experiments to illustrate the com~utationalapproach to molecular mechanics ( 3 , 4 )and moiecular dynaGcs (5)during a n annual course in advanced organic chemistnr. we came across some interesting (!xumplci that can In! cunied out using the molerula-moddinr! promam H\vtd'hem for Windows t f i ) . Such a program, which c a n be r u n under the Windows environment on a n IBM-compatible 3861387,486DX. or Pentium personal computer, h i s the capability to carry out molecular mechanics and MO semiempirical calculations (fib),so it can be considered a n integrated tool for computational chemistry courses. When a nonrigid molecule is studied by a computational method (31, be it molecular mechanics or quantum mechanics, one of the more important aspects is the complete description of the Born-Oppenheimer surface of such a comnound. that is. finding all of the nossible conformers incl;ding the most stable (global minimum). Several solutions to this problem have been examined (7):.the nrincinal ones are systematic search, random methods, and molecular dvnamics. I n this computer experiment we propose a s a n exercise for students a thorough exploration of the conformational behavior of wpentane. w e ;hose this molecule because it is small enough to keep the computational time a t a minimum whileVmaintai&ng some interesting conformational features (8).For the exploration of the conformational space of this molecule a systematic search method (grid search) (7)is easily applicable, so it is interesting to comDare the results obtained with such a n exhaustive techhique with those obtained with a completely different approach: the molecular dynamics method. A

Systematic Search Because, to a first approximation, the conformations of a molecule differ solely by rotations about single bonds, a conformational search can be carried out by systematically incrementing each dihedral anele through 360". If the rou tatable bonds are n, and the angular increment is 8, then the total number of conformations generated is (36018)".

-

-

Volume 72 Number 6 June 1995

511