gibbs energy minimization in gas + liquid + solid systems

10
Gibbs Energy Minimization in Gas + Liquid + Solid Systems DENTON S. EBEL, 1 MARK S. GHIORSO, 2 RICHARD O. SACK, 2 LAWRENCE GROSSMAN 3 1 The University of Chicago, Department of the Geophysical Sciences, 5734 South Ellis Avenue, Chicago, Illinois 60637 2 University of Washington, Department of Geological Sciences, 328 Johnson Hall, Seattle, Washington 98195-1310 3 The University of Chicago, Department of the Geophysical Sciences, 5734 South Ellis Avenue, and Enrico Fermi Institute, Chicago, Illinois 60637 Received 26 April 1999; accepted 12 October 1999 ABSTRACT: An algorithm is described for the calculation of equilibrium compositions of multiple highly nonideal liquid and solid solutions, as well as pure stoichiometric phases, coexisting with a mixture of ideal gas species at fixed temperature and pressure. The total Gibbs free energy of the system is approximated as a quadratic function of the compositions of the gas phase and stable condensed phases, in an orthogonal basis set of pure elements. Only changes in thermal energy and energy related to pressure-volume work are considered. The total Gibbs energy is minimized directly by use of both the slope and the curvature of the Gibbs energy surface with respect to the gas and condensed phase compositions in the basis elements. The algorithm described has been implemented in a computer code for the calculation of condensation sequences for cosmic nebular gases enriched in dust. Machine, compiler and library requirements for performing these calculations in the C programming language are compared. c 2000 John Wiley & Sons, Inc. J Comput Chem 21: 247–256, 2000 Keywords: thermodynamics; equilibrium; condensation; mineralogy; silicate liquid Correspondence to: D. S. Ebel; e-mail: debel@midway. uchicago.edu Contract/grant sponsor: National Aeronautics and Space Ad- ministration through NASA; contract/grant numbers: NAGW- 3340 and NAG5-4476 Journal of Computational Chemistry, Vol. 21, No. 4, 247–256 (2000) c 2000 John Wiley & Sons, Inc.

Upload: lawrence

Post on 06-Jun-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Gibbs Energy Minimization in Gas +Liquid + Solid Systems

DENTON S. EBEL,1 MARK S. GHIORSO,2 RICHARD O. SACK,2

LAWRENCE GROSSMAN3

1The University of Chicago, Department of the Geophysical Sciences, 5734 South Ellis Avenue, Chicago,Illinois 606372University of Washington, Department of Geological Sciences, 328 Johnson Hall, Seattle, Washington98195-13103The University of Chicago, Department of the Geophysical Sciences, 5734 South Ellis Avenue, andEnrico Fermi Institute, Chicago, Illinois 60637

Received 26 April 1999; accepted 12 October 1999

ABSTRACT: An algorithm is described for the calculation of equilibriumcompositions of multiple highly nonideal liquid and solid solutions, as well aspure stoichiometric phases, coexisting with a mixture of ideal gas species at fixedtemperature and pressure. The total Gibbs free energy of the system isapproximated as a quadratic function of the compositions of the gas phase andstable condensed phases, in an orthogonal basis set of pure elements. Onlychanges in thermal energy and energy related to pressure-volume work areconsidered. The total Gibbs energy is minimized directly by use of both the slopeand the curvature of the Gibbs energy surface with respect to the gas andcondensed phase compositions in the basis elements. The algorithm describedhas been implemented in a computer code for the calculation of condensationsequences for cosmic nebular gases enriched in dust. Machine, compiler andlibrary requirements for performing these calculations in the C programminglanguage are compared. c© 2000 John Wiley & Sons, Inc. J Comput Chem 21:247–256, 2000

Keywords: thermodynamics; equilibrium; condensation; mineralogy; silicateliquid

Correspondence to: D. S. Ebel; e-mail: [email protected]

Contract/grant sponsor: National Aeronautics and Space Ad-ministration through NASA; contract/grant numbers: NAGW-3340 and NAG5-4476

Journal of Computational Chemistry, Vol. 21, No. 4, 247–256 (2000)c© 2000 John Wiley & Sons, Inc.

EBEL ET AL.

Introduction

C alculations of the equilibrium distribution ofmatter in a system consisting of more than one

phase provide the foundation for understandingmass transfer in natural and synthetic chemical sys-tems. This is true even in nonequilibrium processes,such as those limited by diffusion or kinetics, wherethe driving forces of irreversible processes can fre-quently be parameterized in terms of departures ofsystems from thermodynamic equilibrium. Chemi-cal equilibrium calculations have been an importantminimization problem since before the advent of thedigital computer.1, 2 Previous applications includerocket fuel combustion,3 condensation of solids insolar nebula gas,4 and more recent treatments ofgas + solid + liquid equilibria in solar gas.5, 6

Progress in this area has increasingly been driven bythe recognition that nonideal solid and liquid solu-tions are important reservoirs of the most abundantelements in natural systems.7

The standard technique applied to the conden-sation problem5, 8 – 10 uses Lagrange multipliers andfirst-derivatives of the Gibbs energy, as describedamply elsewhere.1, 9 We will describe a quadraticmethod for finding the minimum in the total Gibbsfree energy in systems where matter is distributedamong multiple highly nonideal liquid and solidsolutions and a vapor composed of a mixture ofideal gas species, all at fixed temperature and pres-sure. A quadratic approach has not previously beenapplied to such systems in cosmochemistry, andwas adopted to allow the inclusion of solid solutionmodels having components with negative fractionalmolality, and to incorporate second derivatives ofthe system Gibbs energy with respect to composi-tion, necessitated by the flatness of the Gibbs energysurface due to the coexistence of multiple solidand/or liquid solutions. The algorithm follows ear-lier work on chemical mass transfer in magmaticsystems, in which equilibria were calculated be-tween nonideal silicate and oxide solid solutionsand a 15-component silicate liquid.7 A programimplementing that work7 was made available tothe geological community in the early 1990’s, inthe form of an executable computer code labeled“MELTS,” which has been applied with success togeochemical modeling of the crystallization of drynatural terrestrial silicate liquids,11, 12 particularly atlow total pressures, Ptot ≤ 1010 dyne/cm2 (= 10 kbar= 1 GPa).

Models simulating the condensation of gases ofsolar nebula composition, at Ptot ≤ 103 dyne/cm2,

have provided fundamental insights into the for-mation of the earliest solar system materials, theconstituents of the chondrite meteorites. Wildt13

was the first to model condensation in stellar en-vironments. Urey14 calculated various silicate sta-bility fields for simple cases. Wood15 derived thepressure-temperature (P-T) stability fields of liquidand solid iron, forsterite (Mg2SiO4), and enstatite(MgSiO3). Larimer16 considered equilibrium con-densation at 106 and 6.6×103 dyne/cm2. Grossman4

was the first to include mass-balance constraintsin calculating the condensation sequence of a cool-ing gas of solar composition. Since then, severalgroups have performed similar calculations for spe-cial cases.5, 8, 10, 17 – 21 Lodders and Fegley22 have re-viewed the history of condensation calculations forreduced stellar environments.

Previous work on the condensation problem hassuffered from one or a combination of deficiencies:neglecting the effect of solid solution of major ele-ments on the stability fields of condensed phases,lack of consideration of nonideal solid solution ofmajor elements in minerals, an inability to correctlytreat silicate liquids, or a lack of internal consistencybetween models for condensed solution phases.Yoneda and Grossman5 were the first to successfullytreat liquids composed of the oxides CaO—MgO—Al2O3—SiO2; however, the most interesting liquiddroplets preserved as glass in the oldest meteoritesare chondrules. These glassy beads contain signifi-cant dissolved FeO, TiO2, K2O, and Na2O, and usu-ally include crystalline silicate minerals. Many ofthese minerals within chondrules are solid solutionphases, such as olivine (Fe, Mg, Ca)2SiO4, pyrox-ene (Ca, Mg, Fe2+, Ti4+, Fe3+, Al)2(Si, Al, Fe3+)2O6,and spinel (Fe, Mg, Fe3+, Cr3+, Al, Ti4+)3O4. The de-velopment of the algorithm discussed here, and itsapplication,6 resulted from our belief that the originof chondrules could be understood by incorporatingthe MELTS liquid model7 into condensation calcu-lations. The “standard” approach3 to this problemis well suited to consideration of pure phases, butless effective when complex solid and liquid solu-tions are present, particularly those with internalordering of substituents, those modeled using com-ponents that may have negative molecular fractions,and those that are highly nonideal.

In the general heterogeneous equilibrium prob-lem, a reservoir of material exists, in the liquid orgaseous state, with which matter in other states re-acts, from which matter precipitates or condenses,or into which matter melts, sublimes, or evaporates.For example, in a magmatic system, solid mineralspecies precipitate from a reservoir of silicate liq-

248 VOL. 21, NO. 4

GAS + LIQUID + SOLID SYSTEMS

uid, and the liquid plus solids constitute the system,usually considered closed. In the nebular condensa-tion problem, the gas reservoir, plus the solid andliquid condensates, constitute the system. In bothexamples, the reservoir contains some amount ofevery element present in the system, while individ-ual precipitates or condensates contain subsets ofthe elements. At any particular pressure and tem-perature at which the system is in thermodynamicequilibrium, there is a unique distribution of mat-ter between the reservoir and the condensates thatare thermodynamically stable relative to the reser-voir. This equilibrium state is characterized by anextremum in the thermodynamic function of statemost convenient to describe the system, here cho-sen to be the Gibbs free energy. An algorithm forfinding this equilibrium, described in numberedsections below, is: (1) solve the speciation of thegas by the BNR technique. (2) Assess the stabil-ity of each potential condensate relative to the gasreservoir; add a small amount of the most stablecondensate, if any, to the system. (3) Minimize thetotal thermodynamic potential energy of the sys-tem, by redistributing matter among the reservoirand stable condensates; see if any other conden-sates are stable (2), and, if so, repeat (3); remove anycondensates present in vanishingly small amounts,and repeat 1–3; assess chemical potential balance be-tween gas and condensed phases.

Sequences of such calculations can be performedto elucidate the reversible behavior of parcels ofmatter in response to changes in temperature orpressure; however, we do not address here any ofthe spatial or temporal aspects of chemical masstransfer. The algorithms presented here have beenimplemented in a computer program (“VAPORS”),which contains data for 23 elements, distributedamong 374 gas species, and a wide variety of po-tential condensates.6

Model for Vapor Phase (1)

The vapor constitutes the reservoir from whichsolids and liquids condense. The composition of thevapor, regardless of its speciation, can be describeduniquely by any orthogonal (linearly independent)subset of the species present, most conveniently bythe basis vector ngas corresponding to the numberof mol of each element present. We can uniquely de-termine the speciation of the gas (how much C goesinto C2H2, CH4, CO2, etc.) from the thermodynamicdata for the compounds, and thus determine theGibbs free energy of the vapor for any T, P, and ngas.

For every gas species, it is assumed that the idealgas law holds. This is reasonable at the low pres-sures (≤105 dyne/cm2, 1 bar = 106 dyne/cm2) ofnebular systems. The internal speciation, or homo-geneous equilibrium state of the gas at a particular Tand Ptot, is obtained by writing expressions for thepartial pressures of all the species j as functions ofthe partial pressures of the monatomic species of thebasis elements i:

Pj = Kj ·elements∏

i

Pviji (1)

where vij is the stoichiometric coefficient of elementi in gas species j, Kj is the equilibrium constant forformation of gaseous species j from the monatomicgaseous species at a particular T and Ptot, and Kj iswritten in terms of partial pressures. Mole fractionsof species j in the gas are related by an equilibriumconstant Kx

j :

Xj = Kxj ·

elements∏i

Xviji ,

through Pj = cj

Ctot · Ptot = Xj · Ptot (2)

where cj is the number of mol of species j in the gasphase, and Ctot is the sum of the cj. The differentK’s are, therefore, related, through stoichiometry ofspecies, by:

log Kxj = log Kj +

(elements∑

i

vij − 1

)· log Ptot (3)

(the “1” occurs because 1 mol of species j is pro-duced), so species with more atoms are more stableat higher total pressure, following Le Chatelier’sprinciple. For a particular (fixed) composition of thegas, there is one mass balance constraint for the totalnumber of mol ni of each element i in the gas phase:

ni =species∑

j

vijcj (4)

which can, of course [through eq. (2)], be written interms of the Kx

j , enabling construction of a systemof equations suitable for determination of the par-tial pressures of the basis elements, given Ptot, T,and the bulk composition vector ngas. This systemof equations has a unique solution for every bulkcomposition of the gas. That is, no possibility existsfor the coexistence, at an equilibrium state, of twoimmiscible gas phases.

We determine the speciation of the vapor using aBNR (Brinkley-NASA-RAND) numerical technique

JOURNAL OF COMPUTATIONAL CHEMISTRY 249

EBEL ET AL.

(reviewed in ref. 1, following ref. 3, cf. ref. 2). In thismethod the equilibrium conditions (2) are held rig-orously, and the deviation of the mass balance eq. (4)from equality is minimized. That is, convergence isdefined such that∣∣∣∣∣ni −

species∑j

vijcj

∣∣∣∣∣ ≤ εg (5)

for all the elements i, where εg is set to 10τ , where τis the machine precision, of order 10−31 in our calcu-lations. Note that we apply eqs. (1) to (4) only to thegas reservoir, not to condensing species. Unlike the“standard” technique,3 the calculations describedhere treat the gas as a distinct phase, and are per-formed in modules separate from the very differentprocedure used to minimize the Gibbs energy of theentire system, described below.

Assessing Stability of CondensedPhases (2)

The vapor is allowed to simultaneously con-dense one of two liquid solutions, and an unlimitednumber of pure stoichiometric solids and complexsolid solution phases. We have implementedBerman’s23 model characterizing CaO—MgO—Al2O3—SiO2 (CMAS) liquids using a 12-parameter,fourth-degree Margules-type function to describedeviations of thermodynamic mixing functionsfrom ideality. This model has been used with somesuccess to describe stable and metastable liquidimmiscibility, and liquidus phase relations, in theCMAS system.24 Also present is a SiO2—TiO2—Al2O3—Fe2O3—Fe2SiO4—Mg2SiO4—MgCr2O4—CaSiO3—Na2SiO3—KAlSiO4—Ca3(PO4)2—H2Oliquid, which is a subset of the 15-component sili-cate liquid described by Ghiorso and Sack7, 25usinga symmetric regular solution model. Multicom-ponent solid solution models for olivine26 (Fe,Mg, Ca)2SiO4, spinel27, 28 (Fe, Mg, Fe3+, Cr3+,Al, Ti4+)3O4, pyroxene26, 29 – 31 (Na, Ca, Mg, Fe2+,Ti4+, Fe3+, Al)2(Si, Al, Fe3+)2O6, feldspar32 (KSi,NaSi, CaAl)AlSi2O8, melilite33 Ca2(MgSi, Al2)SiO7,and rhombohedral oxides34 (Fe3+

2 , Fe2+Ti, MgTi,MnTi)O3 have been intercorrelated, and the15-component silicate liquid model of ref. 7 hasbeen calibrated against a very large database ofcrystal–liquid equilibria using the descriptions ofthese solid solutions, all based on the compre-hensive thermodynamic database of Berman35

for end-member (pure stoichiometric) phases. Anasymmetric binary solution model for Fe-Ni-Si-Cr-Co solid alloy is also included, calibrated using

published data,36 – 38 following Grossman et al.39

Further information on species and data sources islisted in ref. 6.

Equilibrium expressions for condensation arewritten in terms of the basis composition variablesof the gas, here the monatomic gaseous elements.For example, the condensation of aluminum oxide(corundum) proceeds according to the reaction:

2Algas + 3Ogas = Al2O3(solid corundum). (6)

Denoting the Gibbs free energy of formation ofcorundum from the monatomic gaseous elements ata particular temperature and Ptot by Gcor

T , corundumis stable relative to the gas, if

GcorT = −RT · ln[Kcor

T

] = −RT · ln[

elements∏i

Pviji

]= −RT · ln[P2

Al · P3O

] ≤ 0. (7)

The initial stability of the solids (or liquids) at fixedPtot and temperature is determined by referenceto such equations after solving the gas phase spe-ciation to determine the partial pressures of themonatomic gas species, which are equivalent totheir activities at low Ptot. The algorithm describedby Ghiorso40 is used for the more complex cases ofhighly nonideal solid and liquid solutions, wheremixing properties of molecular end members in so-lution must be accounted for in equations analogousto (7). This technique finds the most stable initial so-lution composition, by matching component activi-ties to corresponding properties of the gas reservoir.Once a phase is determined to be thermodynami-cally stable relative to the gas, its initial compositionis added to the stable condensate assemblage insome initial “seed” quantity (e.g., 10−7× the totalmol of elements in the system), which is subtractedfrom the bulk composition of the gas. At this point,the entire system must be adjusted, in terms of thecompositions of gas and condensates, to minimizethe thermodynamic potential energy (Gibbs free en-ergy) of the system. By initializing with the moststable initial solution composition relative to thegas reservoir, evolution toward the global minimumGibbs energy of the solution phase, relative to otherphases, is strongly favored, at temperatures wellabove miscibility gaps in the solid solution phases.

Minimization of SystemThermodynamic Potential (3)

For each phase p, there is a vector of orthogo-nal composition variables np, which is the basis set

250 VOL. 21, NO. 4

GAS + LIQUID + SOLID SYSTEMS

of thermodynamic components spanning the possi-ble chemical variability of that phase. For exampleolivine, (Fe, Ca, Mg)2SiO4, is given componentsMg2SiO4, Fe2SiO4, and CaMgSiO4, whereas corun-dum, Al2O3, is treated as a pure, one-componentphase. Many phases require calculation of orderingof atoms on sites, or consideration of polymor-phic phase transitions to establish their minimumchemical potential energy. These internal, or ho-mogeneous, equilibrium considerations are treatedseparately for the condensed phases, as they arefor the gas, and are thus “transparent” to the sys-tem minimization algorithm, as is the speciation ofthe gas. However determined, there exists a scalarGibbs energy Gp associated with each phase p, suchthat we can write the chemical potentials of the ther-modynamic components of p as the vector up =(∂Gp/∂n)T,P. The Gibbs energy of a system contain-ing gas plus m condensed phases is just the sumover all the phases: G = Ggas + G1 + · · · + Gm. Thedistribution of matter in a system containing a gasphase and m condensed phases may be describedin terms of n system components by a column vec-tor n = [ngas n1 n2 . . . nm]T, the system componentvector, composed of the stacked component vectorsof the separate phases.

To describe the constraints imposed on the entiresystem by mass balance, the bulk composition of theentire system is written as a vector b, of length s. Itis desirable to choose as these s bulk componentsthe same 23 elements that are used to describe thegas phase, because we will wish to transfer matterbetween gas and condensates as individual atoms,rather than as compounds (e.g., oxides). A matrix Cis then readily constructed, which relates the vec-tor n to the bulk component vector b, such thatb = Cn. This equation describes the bulk compo-sition constraint on the system.

We can now state succinctly the problem of min-imizing the system thermodynamic potential, G,with respect to the system components n, subjectto the mass balance constraint b = Cn. Ghiorso41

has reviewed previous approaches to this problemin the earth sciences and chemical engineering. Westart by simplifying the problem using the methoddescribed by Ghiorso.41 Treating all the n systemcomponents as independent variables, we can writethe chemical potentials, u = [ugas u1 u2 . . . um]T =(∂G/∂n)T,P. We will also require the second deriv-atives of G with respect to n, for the entire sys-tem, which are elements of the Hessian matrixH ≡ (∂u/∂n)T,P. Matrix H is block diagonal nby n, with blocks corresponding to matrices Hgas =(∂ugas/∂ngas)T,P, followed diagonally by a similar

matrix for each one of the condensed phases. Cal-culation of ugas and Hgas are described in section 4,below. Suppose we have some initial guess, q, forthe solution to the minimization problem. Use ofthe second derivatives allows us to approximate theGibbs energy of the system, using a second-degreeTaylor expansion in the n system components, atsome point n near the initial point q:

G = G|q + uT|q(n− q)+ 12 (n− q)TH|q(n− q)+ higher order terms (8)

where |q signifies evaluation of the term to the leftat q. If n is very close to q, such that (n − q)T(n −q) ≈ 0, then the higher order terms can be ignored.This approximation for G simplifies the minimiza-tion problem considerably.

Solution of what is now a constrained quadraticminimization problem can be accomplished us-ing the algorithm provided by Betts,42 which wesummarize briefly here. The bulk composition con-straint relates the elements of n such that thereare only n − s independent variables required touniquely define n. We can determine an n by n or-thogonal “projection matrix” K, such that CK = R,which projects C, s by n, into a new matrix R, s byn, in which the upper left s by s elements constitutea nonsingular submatrix R1, and the remaining el-ements of R are zero. Then, using b = Cn, we canwrite RKTn = b, because K is orthogonal, and par-tition KT so KT = [K1 : K2]T, where K1 is n by s, andK2 is n by (n−s). Then we can write n = K1n1 + K2n2,where n1 has length s, and n2 has length (n− s), andcompute n1 using R1KT

1 n = b, leaving the n2 still tobe determined. To minimize

G = G|q + uT|q(K1n1 +K2n2 − q)

+ 12 (K1n1 +K2n2 − q)TH|q(K1n1 +K2n2 − q) (9)

with respect to n2, we set the derivative equal tozero and obtain

KT2 H|qK2n2 +KT

2 u|q +KT2 H|qK1n1 = 0 (10)

which is a linear system of equations in (n − s)unknowns, because only the first term on the leftis unknown. This is solved for n2, which with n1

gives n. Once the vector n has been determined inthis way, we know the direction in which to re-distribute matter among the gas and condensatephases to approach the minimum in G, but not themagnitude of the redistribution. To avoid movinginto potentially infeasible regions of compositionspace, a new solution q′ ≡ q + α(n − q) is chosen,where α is a step length along n, chosen such thatdG(q′)/dα = 0, and such that q′ does not violate

JOURNAL OF COMPUTATIONAL CHEMISTRY 251

EBEL ET AL.

feasibility tests on the compositions of the conden-sates present in the system. The new solution q’describes the distribution of atoms between phases,corresponding to the minimum thermodynamic po-tential energy of the system, from the point of viewof the previous solution. Approximated at q′, how-ever, the derivatives in [eqs. (8)–(10)] will have newvalues, so q′ becomes the initial guess for obtaininga new solution. Whether the new system componentvector corresponds to the minimum chemical po-tential energy of the system is decided by whethera rearrangement of matter among the system com-ponents can be found, which further reduces thesystem’s chemical potential energy. Therefore, wedefine convergence to a minimum as the lack of sig-nificant change (<10−12) in the Euclidean norm ofthe vector n over two attempts to find a better min-imum.

Once convergence is achieved, the system istested for disappearance or saturation of condensedphases. If the amount of any phase becomes lowerthan some threshold value (chosen to be 10−10 molper mol of atoms in the system, which is ∼10−3

the amount ever found to be stable, regardless ofthe threshold chosen in extensive testing, and fol-lowing ref. 10), then that condensate is droppedfrom the stable assemblage, and the material in itis returned to the gas phase. We also check thenew solution again, as described earlier, to deter-mine whether the reservoir is saturated with re-spect to any other potential condensate phase. Ifany phase is dropped or added, the minimizationmust be repeated with the new assemblage of sta-ble condensates. Otherwise, the equilibrium stateof the system has been determined for the currentPtot, temperature, and bulk system composition. Ex-tensive, detailed comparisons were made betweenresults obtained using this algorithm and resultsof Yoneda and Grossman,5 who used a standardBNR technique, modified to handle simple nonidealsolutions. When identical data were used in bothcalculations, results were identical to within∼10−14.Yoneda and Grossman,5 in turn, carried out exten-sive comparisons with earlier results (e.g., ref. 4).

Although results obtained by this method in cos-mochemical applications are consistent with previ-ous work, multiple nonideal solid and liquid so-lutions have never been addressed in this way inthe cosmochemical literature, and one might askwhether the algorithm attains the global minimumin such systems. One condition for local minimain the total system is the existence of local minimain one or more of the models for specific phases:gas, liquid, or solid(s). That is, the model for one or

more phases must be capable of producing immis-cibility. We use the same kind of algorithm for thegas phase as have previous workers, and becausethe gas is a mixture of ideal gas species, multipleminima for the gas do not occur, as implicit in pre-vious work. The CMAS liquid is known to havelocal minima (immiscibility) in certain regions ofits composition space, but these occur well belowthe temperatures of our calculations, in SiO2-richcompositions.24 However, it is conceivable that forsome combination of parameters, we could com-pute the (meta)stability of a CMAS liquid whichshould unmix, and could, therefore, underestimatethe stability of liquid. Yoneda and Grossman,5 us-ing different algorithms but the same liquid model,reported no such unmixing, and we match theirresults wherever tested, including CMAS–liquid-bearing systems. The formulation of the MELTSliquid model is such that saddle points exist onits Gibbs energy surface, but not local minima, asdiscussed by Ghiorso et al.25 The solid solutionmodels we use (e.g., spinel, olivine, pyroxene) pro-duce miscibility gaps that closely match those foundin nature and the laboratory, but all the calculationswe perform are at temperatures well above knownmiscibility gaps in the systems of interest. Exten-sive testing with phases added or removed, andfrom different initial states, has shown no instanceswhere this algorithm produced false minima in sys-tems such as those illustrated in Figure 1.

Derivatives of G for the Gas Phase (4)

The numerical algorithms for the complete sys-tem require calculation of the change in the ther-modynamic potential Gp of every stable phase p inthe system, with respect to all possible changes inthe composition of that phase, and also calculationof the second derivatives of each Gp with compo-sition. These calculations are performed separatelyfor each phase, depending on the form of the modelused to describe its thermodynamic properties. Thisis rapidly accomplished with a closed form for (Gnk)for any particular pure phase k, but the calculationof these derivatives is slower for phases such aspyroxene26, 29 – 31 and spinel,27, 28 which involve in-ternal ordering of atoms on crystal lattice sites. Forany particular composition of such solid solutions,the ordering state must be obtained by iterative so-lution of statements of homogeneous equilibrium.Determining the sensitivity of the gas phase to smallchanges in composition requires the most numericallabor at this step.

252 VOL. 21, NO. 4

GAS + LIQUID + SOLID SYSTEMS

FIGURE 1. Stability fields of selected phases indust-enriched systems.

Because we are removing elements (e.g., Aland O) from the gas to form solids (e.g., Al2O3), thederivatives ugas and Hgas must be taken with respectto the total mol of those elements in the gas, notsimply with respect to the number of mol of theirmonatomic gaseous species. Any change in the bulkcomposition of the gas, ngas, described by the 23 ba-sis elements, will affect mass distribution among allof its 374 chemical species, and therefore, effect achange in the Gibbs energy of the gas. However,there is no analytical solution to the speciation ofthe gas. We have devised a numerical method to ap-proximate the derivative properties of the gas, andthe method works well for the conditions investi-gated to this point.6, 21 Up to (3 × 23 + 2 × 232)calculations of speciation in the gas are requiredin any particular iteration; however, this can be re-duced, because only the derivatives with respect toelements actually condensing in solids or liquidsare required. Nevertheless, this is a time-consumingproblem.

We start at a particular gas composition n0 forwhich we have calculated Ggas

0 , and determine1Ggas along chords to the surface G(ngas), as fol-lows. We vary ni sequentially for each element i forwhich evaluation of (∂G/∂ni)nk 6= i , is required, leav-ing the other elements as at n0, by designating anew composition n+i where only element i has beenchanged from n0, to ni = n0

i + εi, and a new compo-sition n−i where ni = n0

i − εi. We calculate Ggas atn+i and n−i to obtain Gi+ and Gi−, respectively. Wemust increase εi until it attains the smallest valuefor which |Gi+ − Gi−| > 100τ , where τ is machineprecision, to obtain an adequate, nonzero, approxi-mation to (∂G/∂ni)nk 6= i , at n0. To obtain the Hessianmatrix (∂2G/∂ni∂nj)nk 6= i,j for pairs of basis elementsi and j, we vary nj as we did ni, about the previ-ously defined compositions n+i and n−i , obtaining atotal of four gas compositions, n++ij , n+−ij , and n−+ij ,n−−ij , which surround n0 in the composition dimen-sions i and j. As for εi, the variation εj must besufficiently large than |G(n++ij ) − G(n+−ij )| > 100τand |G(n−+ij ) − G(n−−ij )| > 100τ . These quantitiesyield (∂Gi+/∂nj)nk 6= j and (∂Gi−/∂nj)nk 6= j , which inturn, yield (∂2G/∂ni∂nj)nk 6= i,j ∼ [(∂Gi+/∂nj)nk 6= j −(∂Gi−/∂nj)nk 6= j ]/dni.

In addressing condensation in solar gases, the ini-tial relative mol numbers of constituent elementsvary by seven orders of magnitude over the 23 mostabundant elements. This poses numerical problemsin the minimization of the thermodynamic potentialfor complex systems of gas + solids + liquids. Withthe great mass of gas consisting of volatile species

JOURNAL OF COMPUTATIONAL CHEMISTRY 253

EBEL ET AL.

containing H, He, C, O, and N, the thermodynamicpotential of the gas becomes relatively insensitiveto the decreasing amounts of refractory elementssuch as Al, Ca, and Ti, which remain in the gas asit cools, but it is the behavior of these rock-formingelements, which is of greatest interest! One way toassess how closely the system has converged to itsminimum is to calculate the deviation from chem-ical potential balance of the formation reactions ofeach of the stable condensates [e.g., eq. (6)]. The abil-ity of the algorithm to minimize these deviations isa function of the ability to calculate ugas and Hgas bythe method outlined above, hence, of machine preci-sion (τ ). At low temperatures, when some elementsare depleted to vanishingly small abundances in thegas phase, these deviations become large, and thecalculation is halted. It is a general failing of all al-gorithms of this type (e.g., ref. 7), that all the basiscomponents of the system (e.g., elements, or oxides)must be present in some nonzero amount in thephase, which constitutes the reservoir, at all steps ofthe calculation.

INITIAL STATE

If the calculation is begun at a temperature andpressure where there are multiple stable condensedphases, particularly solid or liquid solutions, thenthe algorithm takes a great deal of time to determinethe identities of these phases, given no other initialinformation. We, therefore, routinely begin calcula-tions at temperatures sufficiently high that few orno condensed phases are stable, and iterate to suc-cessively lower temperatures, for a fixed Ptot andsystem bulk composition, using the solution at theprevious temperature step as the initial state. Gen-erally, the result for a particular Ptot, temperature,and bulk composition can be used as the initial statefor calculation at a similar set of conditions. Regard-less of the method used to establish the initial stateof the system, the same result is obtained from thecalculation. The algorithm is in no way optimizedfor any particular (e.g., H2-rich) bulk compositionof the system.

Machine and Compiler Considerations

The numerical algorithms require calculations ofthe gradient (up) and Hessian (Hp) of the ther-modynamic potential Gp of every phase p in thesystem, with respect to all possible change in itscomposition np. As described above, the methodsfor approximating these quantities for the gas are

sensitive to numerical precision. At IEEE double(64-bit) precision, the program fails when the molfractions of refractory elements remaining in thegas become moderately small (order 10−13). At IEEEquadruple (long double, 128-bit) precision, this limitis decreased by ∼10 orders of magnitude, suffi-cient for the success of the calculations describedin ref. 6. In all cases examined in detail, breakdownof the algorithm is signalled by its inability to dis-cern the gradient in system composition that pointstoward the true minimum, resulting in extremelysmall changes leading nowhere useful.

Because full quadruple precision (128-bit, or 32significant digits) is required of the algorithm, thecomputation can only be accomplished in reason-able time on “big endian” processors. We use theC programming language, for which the quadrupleprecision floating point libraries for the IRIX andSunPro C++ compilers seem to be particularly ef-ficient. We obtained ∼2.8× faster results on an SGIOrigin 2000 with R10000 (180 MHz) cpus runningIRIX 6.4 and the MIPSPro C compiler, in bench-marks on nearly identical code compiled and runon a Sun Ultra Enterprise 4000 with UltraSparc IIIcpus (248 MHz), running Solaris 2.5.1 with the Sun-Pro v. 4.0 C compiler, in January of 1998. This isnoted to emphasize the sensitivity of these calcu-lations to the libraries upon which they call, notto endorse any particular operating system, andmay reflect, in part, our own inability to optimally“tweak” each configuration. Even in the SGI envi-ronment, the calculations proceed slowly. On theR10000 processor, 2 weeks were required to calcu-late the condensation history of a solar gas enriched1000 times by a dust of carbonaceous chondritecomposition6 from 2400 to 1300 K in 10◦ steps. Asnoted above, most of this time is spent solving spe-ciation in the gas for variations in its composition,necessary to set up the system minimization matri-ces. This speed is running “flat out,” with minimumfile output between temperature steps, no swappingto disk, and no interactive or console input/output.Although the algorithm is cpu-intensive, it is rel-atively compact, requiring 10–15 MB of randomaccess memory throughout the run, depending onthe number of condensed phases. The availabilityof RAM, or the need to swap to disk memory, is nota factor in any of the speed tests described above.It would be optimal to use fast, arbitrarily precisefloating point routines in the most sensitive parts ofthe calculation, but this goal has proven elusive. Thealgorithm would also be highly amenable to paral-lelization.

254 VOL. 21, NO. 4

GAS + LIQUID + SOLID SYSTEMS

Results

The chondritic meteorites contain spherulesthought to be quenched silicate liquid droplets,FeO-rich olivines, and other objects of enigmaticorigin, but thought to result from condensation ofa hot gas prior to planet formation. To investi-gate the possible relationship between condensationprocesses and the origin of the constituents of chon-drites, the above technique was developed to treatsystems where Ptot is high enough, or which arerich enough in condensable elements, that multiplecomplex solid and liquid solution phases condense.In the gas, the condensable, rock-forming elementsare present in trace amounts, diluted by enormousconcentrations of H and He.6 Because most of thecondensable fraction of solar system matter mayhave entered the presolar nebula in the form of in-terstellar dust, it is reasonable to consider that thecentral regions of the protoplanetary solar disk wereenriched, relative to the gas, in dust having thecomposition of C1 chondrites, whose compositionis representative of the condensable fraction of solarsystem matter. After those regions are totally vapor-ized, such enrichment increases the effective oxygenfugacity of the resulting gas, relative to a gas of solarcomposition, and promotes the formation of con-densates at temperatures where they are partially orfully molten. Detailed results of calculations at sev-eral combinations of dust enrichment factor and Ptot

have been presented elsewhere,6 but Figure 1 showsphase relationships over a wide range of dust en-richments, at Ptot bracketing those thought to obtainin the inner part of the protoplanetary disk.

The fields for oxides of Ca, Al, and Ti, and forsolid melilite, are thought to be those in which re-fractory inclusions in meteorites form.5 Together,olivine (Mg, Fe, Ca)2SiO4, orthopyroxene (Mg, Fe)SiO3, and metal alloy (Fe, Ni, Co, Cr, Si) solutionsdominate the mineralogy of chondritic meteorites,and account for the bulk of the condensable fractionof solar system matter. The stability field of silicateliquid becomes more extensive with increasing Ptot

and, at any given Ptot, widens with increasing dustenrichment. For any particular system bulk com-position, the condensed solid assemblage, and/orliquid, are rich in CaO, Al2O3, and TiO2 at high tem-perature, but increase their MgO and SiO2 contents,relative to CaO, Al2O3, and TiO2, as the temperaturefalls. At high dust enrichments, significant amountsof Fe, Na, and K condense as oxide components inboth solid and liquid silicates at temperatures above1400 K. It is increasingly clear that the understand-

ing of condensed matter in the early solar systemwill depend upon development of better data andmodels for liquid and solid solutions, which will,in turn, require more sophisticated computationaltechniques.

Acknowledgments

The authors extend thanks to J. Valdes, S. Cham-pion, V. Barcilon, D. Archer, and G. Miller for tech-nical assistance. M.S.G. acknowledges a generouscapital equipment grant from Digital EquipmentCorporation. The efforts of two anonymous review-ers are appreciated.

References

1. Smith, W. R.; Missen, R. W. Chemical Reaction EquilibriumAnalysis: Theory and Algorithms; Wiley: New York, 1982.

2. Gill, P. E.; Murray, W.; Wright, M. H. Practical Optimization;Academic Press: New York, 1981.

3. White, F. L.; Johnson, S. M.; Dantzig, G. B. J Chem Phys 1958,28, 751.

4. Grossman, L. Geochim Cosmochim Acta 1972, 36, 597.5. Yoneda, S.; Grossman, L. Geochim Cosmochim Acta 1995,

59, 3413.6. Ebel, D. S.; Grossman, L. Geochim Cosmochim Acta, to ap-

pear.7. Ghiorso, M. S.; Sack, R. O. Contrib Mineral Petrol 1995, 119,

197.8. Lattimer, J. M.; Schramm, D. N.; Grossman, L. Astrophys J

1978, 219, 230.9. Eriksson, G. Acta Chem Scand 1971, 25, 2651.

10. Sharp, C. M.; Huebner, W. F. Astrophys J Suppl 1990, 72,417.

11. Hirschmann, M. M.; Ghiorso, M. S.; Wasylenki, L. E.; Asi-mow, P. D.; Stolper, E. M. J Petrol 1998, 39, 1091.

12. Baker, M. B.; Stolper, E. M. Geochim Cosmochim Acta 1994,58, 2811.

13. Wildt, R. Zeitschrift Astrophys 1933, 6, 345.14. Urey, H. The Planets; Yale University Press: New Haven, CT,

1952.15. Wood, J. A. Icarus 1963, 2, 152.16. Larimer, J. W. Geochim Cosmochim Acta 1967, 3, 1215.17. Blander, M.; Katz, J. L. Geochim Cosmochim Acta 1967, 31,

1025.18. Saxena, S. K.; Eriksson, G. Geochim Cosmochim Acta 1983,

47, 1865.19. Wood, J. A.; Hashimoto, A. Geochim Cosmochim Acta 1993,

57, 2377.20. Fegley, B., Jr.; Lodders, K. Icarus 1994, 110, 117.21. Ebel, D. S. J Geophys Res [Space Phys], to appear.22. Lodders, K.; Fegley, B., Jr. In Astrophysical Implications of

the Laboratory Study of Presolar Materials; Bernatowicz,T. J.; Zinner, E., Eds.; AIP Conference Proceedings 1997, 402,391.

JOURNAL OF COMPUTATIONAL CHEMISTRY 255

EBEL ET AL.

23. Berman, R. G. Ph.D. Thesis, U. British Columbia, Vancouver(1983).

24. DeCapitani, C.; Brown, T. H. Geochim Cosmochim Acta1987, 51, 2639.

25. Ghiorso, M. S.; Carmichael, I. S. E.; Rivers, M. L.; Sack, R. O.Contrib Mineral Petrol 1983, 84, 107.

26. Sack, R. O.; Ghiorso, M. S. Contrib Mineral Petrol 1989, 102,41.

27. Sack, R. O.; Ghiorso, M. S. Contrib Mineral Petrol 1991, 106,474.

28. Sack, R. O.; Ghiorso, M. S. Am Mineral 1991, 76, 827.29. Sack, R. O.; Ghiorso, M. S. Contrib Mineral Petrol 1994, 116,

277.

30. Sack, R. O.; Ghiorso, M. S. Contrib Mineral Petrol 1994, 116,287.

31. Sack, R. O.; Ghiorso, M. S. Contrib Mineral Petrol 1994, 118,271.

32. Elkins, L. T.; Grove, T. L. Am Mineral 1990, 75, 544.

33. Charlu, T. V.; Newton, R. C.; Kleppa, O. J. Geochim Cos-mochim Acta 1981, 45, 1609.

34. Ghiorso, M. S. Contrib Mineral Petrol 1990, 104, 645.

35. Berman, R. J Petrol 1988, 29, 445.

36. Chuang, Y.-Y.; Hsieh, K.-C.; Chang, Y. A. Metall Trans A1986, 17, 1373.

37. Sakao, H.; Elliott, J. F. Metall Trans A 1975, 6, 1849.

38. Normanton, A. S.; Moore, R. H.; Argent, B. B. Met Sci 1976,10, 207.

39. Grossman, L.; Olsen, E.; Lattimer, J. M. Science 1979, 206,449.

40. Ghiorso, M. S. Geochim Cosmochim Acta 1994, 24, 5489.

41. Ghiorso, M. S. Contrib Mineral Petrol 1985, 90, 107.

42. Betts, J. T. ACM (Association for Computing Machinery)Transact Math Software 1980, 6, 391.

256 VOL. 21, NO. 4