Smith and Missen - Chemical Reaction Equilibrium Analysis_ Theory and Algorithms.pdf

MarceloAlejandroPala 191 views 68 slides Jul 04, 2024
Slide 1
Slide 1 of 68
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68

About This Presentation

Articulo academico de divulgacion sobre Cinética Quimica


Slide Content

15
CHAPTER
TWO
_
The Closed-System Constraint and Chemical Stoichiometry He.re
we
deveIop the basis for the constraint
on
the computatíon
of
chemicaI
equilibrium that is due to the requírement for conservation
of
elements
in
a
closed system undergoing chemical change, a special form of
the
law of
conservation
of
rnass. This constraint
is
intimately bound up with what
is
usually called
chemical stoichiometry,
*
whether it is expressed directly
in
terms
of
conservation equations
OI'
indirectly in terms of chemical equations. The
specific purpose
of
this chapter
is
to develop chemical stoichiometry for a
dosed
system in
a
form suitable for incorporation in an equilibrium-computa­
tion a1gorithm. Useful
too15
for this are provided by linear algebra since the
conservation equations are themselves linear algebraic equations,
and
in
what
follows
we
make use
of
vector-matrix notation. The end result
is
a
stoichiornet.­
ric~coçfficieni

al.gorithm,
computer programs for which are contained
in
Ap­
p~~ndjx
A.
2.1
THE
APPROACH
We first define a closed system and then develop a method (Smith
and
Missen,
1979)
for treating chemical stoichiometry
that
involves generating,
a priori,
an
appropriate set of chemical equations. Since another approach involves starting
with a set of such equations,
we
discuss the implications of this
and
finally
consider some special stoichiometric situations. In this sense the treatment
is
more general than, and goes beyond, the specific purpose indicated previously. "Thc
won;!
":;toichiOP),'lrJ"
ar
Gr\.~ek

origino literaliv
conccrm
mCihurcmcnt
(-mctry)
ar
an
ckm~nt
{stoichion):
in
chemical
stoichioffictrv
lhe
clcment
is a chcmiçal
dcmcnt.
14
The
C1osed-System COl'lstraint
2.2 THE
CLOSED-SYSTEM
CONSTRAINT
2.2.1 The Element-Abundance Equations A
c10sed
system has a fixed mass; that is,
it
does not exchange matter with its
surroundings, although it may exchange energy. It may consist of one
or
more
than
ane
phase
and
may undergo reaction
and
mass transfer internaHy. Its
importance in equilibrium computations
i5
that
the
equilibrium conditions
of
thermodynamics (Chapter 3) apply primarily
to
such
a
system.
In
the laboratory and in chemical processing, the concept of
a
closed system
obviously applies to a batch system. Perhaps less obviously, it also applies to a
fluid system undergoing
"plug"
flow in.which there is
no
mixing or dispersion
in the direction
of
flow and in which ali clements
of
fluid have the same
residence time in a particular vessel
or
conduit (Levenspiel,
1972,
p.
97).
In
such
a
case each portion
of
fluid,
01'
arbitrary size, acts
as
a
batch
system in
moving through the vessel. This description
i5
most suitably applied to a fluid
flowing at a relatively high velocity in a conduit
of
uniform cross section.
Operationally, any description
of
a
closed system is
al1
expression
of
the law
of
conservation
of
mass. A closed system can be defined by a set of
element~

abundance equations expressing the conservation
of
the chemicai elements
making up the species
of
the system.
Thcre
is
one
equation
for
each element, as
follows:
:Y 2:
Qkini
=
b
k
;
k=1,2,
...
,J.f, (2.2.-1)
i=l
where
Qki
is
the subscript to the
kth
element in lhe molecular formula
of
species
i;
/1,
is
lhe number of moles of
i
(in some basis amount of system);

is
the fixed number
oI'
moles of the
k
th e.lement in the system;
M
is
the number
of
elements;and
N
is
lhe number of species. Alternatively, equations
(2.2-1)
may be written so
as
to express the change from
one
compositionaJ state
to
anolher:
N' 2:
Qki
ôn
j
=
O;
k=
1,2,
...
,.M,
(2.2-2)
i=l
where
ôn
i
is
the change in the number of moles
of
the
i
th
species between two
compositional states
of
the system.
In
vector-matrix form,
the
element-abundance equations
2.2-1
and
2.2-2 are,
respectively,
Ao
=
b,
(2.2-3)
and
Aôn
=
O,
(2.2-4
)

16
11
'lhe
Closed-System Constraint and
Chemkal
Stoichiometry
where, as described in more detail
in
the following paragraphs,
A
is
the
formula
matrix, n is the species-abundance vector,* and
b
is
the
element-abun­
dance
vector. Again, it
is
the fact
that
b
is
fixed
that
characterizes a closed
system.
Any
one of equations 2.2-1 to 2.2-4 expresses
the
closed-system
constraint.
Example 2.1 Write equations 2.2-1
and
2.2-3 for a reaction involving the
species
NH
,
02'
NO,
N0
2
,
and
H
2
0.
Assume
that
the initia1 state of the
3
system consists
of
NH
3
and
02
in
the
molar ratio
4:
7.
Solution
The
NH
3
:
O
2
molar
ratio
establishes a basis
amount
of system
such
that
b
=
4,
b
=
12,
and
b
o
=
14.
The
three element-abundance equa­
N H
tions 2.2-1 for the three elements
in
the
arder
nitrogen, hydrogen, and oxygen
are then:
lnNH
3
+
On0
2
+
lnNo
+
In
N0
2
+
On
H20
=
b
N
=
4,
3n
H:<
+
0110
+
011
NO
+
OnNO
z
+
211H
2
0
=
b
H
=
12,
N
2
OnNH,
+
2n
+
ln~w

+
211N0
2
+
lnl:l
2
o
=
bo
=
14.
02
Equation
2.2-3 for this systcm is
rl
NH3

li
O O 2
1 O 1
1 O 2
O)
\
no,
2
nNO
1
n
N02
(
1~)'


14
n
H2
0
!
where
the
matrix on the left
is
A,
which
is
made up of the coefficients on the
left in equations
2.2-1
and the two vectors are n
and
b, respectively.
The
maximum number of linearly independent element-abundance equa­
tions, which is the same as the
maximum
number of linearly independent rows
(or
columns) in the matrix
A,
is
given by the
rank
of A (Noble, 1969,
p.
128).
2.2.2
Some
Terminology
To
provide
a concise summary
of
unambiguous-terminology,
we
define a
number
of
terms in tbis section, mostly relating to a c10sed system, even
,.
Ali
vectors
are
column vectors.
and
superscript
r.
used in Secliol1
~.2.2

al1d
lalcr, denotes lhe
tran"posC
of
a vector.
The C1osed-System Constraint though some
of
them have already
been
introduced. These are as follows:
chemical species: a chemical
entity
distinguishable
frem
other such entities
by
1
1ts
molecular formula; ar, failing that, by
2
1ts
molecular structure:(e.g., to distinguish isomeric forms with
the
same
molecular formula);
or
failing
that,
by
3
The phase in which
it
occurs ie.g.,
H
2
0(e)
is
a species distinct fram
H
2
0(g)}.
chemical substance: a chemical
entity
distinguishable by properties
I
or
2
(above),
but
not
by
3; thus H
2
0(C)
and
H
2
0(g)
are the same substance, water.
chemical system: a collection
of
chemical species and elements denoted by an
ordered set
of
specíes and an
ordered
set
of
the
el{~mentscontained

therein as
fol!ows:
{(AI'
A
2
,···,A
j,
•••
,A
N
),
(E
l,
E
2
,···,E
k
,···,E/If)}'
where Ai is the molecular formula, togcther with structural
and
phase designa­
tions,
if
necessary,
of
species i
and
E" is element
k;
the order is immaterial
but
once
decided, remains fixed.
The
list
of
e1ements includes
(l)
each isotope
involved
in
isotopic exchange, (2)
the
protonic charge
p,
if ionic species
are
involved,
and
(3)
a
desígnation such
as
XI'
X
2
>
•••
,
for each inert substance in
the species list, where an inert substance is one that
i5
not invo1ved in the
system
in
the sense of physicochemical change.
formula
vector (Brinkley, 1946) ai: the vector
of
suhscripts (usually integers)
to the elements in the molecular formula of a
species~

for illstance, for
C
6
H
5
N0
2
,
a
=
(6,5,
t
2)T.
formula matrix
A:
the
iH
X
N
matrix
in
which colunm
i
is
aj;
A:::-~

(a
I'
a
2

..
,
ai"
..
, a
N);
A
is
the coefficient matrix in the
dement-abundance
equations 2.2-1.
species-abundance vector n: the vector of nonnegatíve real numbers repre­
sentíng the numbers
of
moles
of
the species in a basis amount
of
the chemical
system; n
=
(n
1
,
n
2
,
•..
,nj,
...
,n
N
)1';
nj
~

O;
n also denotes the composition
or
compositional state of a system,
element-abundance vector
b:
the
vector
of
(usually nonnegative) real numbers
representing the number
of
moles
of
elements in a basis
amount
of
the
chemical system: b
=
(b
l
, b
2
,
...
,-b
k
,
...
,bM)T;
b
is
often specified by the
relative amounts
of
reactants for the system.
dosed
chemical system: one for which all possible n satísfy the element-abun­
dance equations 2.2-3 for some
givenb.

19
18
111e
Closed-Sy«tem
Constraint
and
Chemical Stoicbiometf!'
species-abundance-change vector,
8n
=
0(2)
-
n():
the changes in mole num­
bers between compositional states
(1)
and (2) of the closed chemical system; it
must
satisfy equation
2.2-4.
feasibility
or
infeasibility (of a closed system): whether a given
b
is
compati­
ble with
the
species list and the preceding definitions of A and
n;
for example,
for
the
system
{(NO:!, N
2
0
4
),
(N,O)};
b
=
(b
N
,
bol,
b
=
(l,2f
is
feasible,
but
b
=
(2,2{
is infeasible; a necessary condition for feasibility
is
lhat the
rank
of
the augmented matrix
(A, b),
obtained from
the
system of linear
equations
An
=
b
be
equal to the rank of
A;
this is not a sufficient condition
because
the
algebraic theorem on which
it
is
based allows for the possibility
of
solutions involving negative values for some or all of the
n
i;
a sufficient
condition
for infeasibility is that the ranks be unequal; we assume throughout
that
alI systems are feasible.
2.3
CHEMICAL
STOICHIOMETRY
2.3.1
Introductory Concepts
In a c10sed chemical system
we
are interested in the various compositional
states
that
can arise, subsequent to an initial state,
as
a result of chemical
change
within the system. The determination of any of these states
is
subject to
the element-abundance equations. These algebraic equations may alternatively
be
cast
in the form of chemical equations, which is what
we
usually think of
when we speak about chenúcal stoichiometry. Whether the equations are
algebraic
or
chemical, one of the purposes of chemical stoichiometry
is
to
determine
the appropriate number of them, that
is,
the maximum number that
are
Iinearly independent. This number
..
is
different for the two types of
equation, as described subsequently.
For
the algebraic equations,
it
is
usual1y
M,
but
it may be less than this.
The
conservation equations usually do not, of course, provide
alI
the
information
required to determine lhe composition
n.
This is most easily seen
in
terms
of
equation
2.2-3.
The difference between the number of variables
N
used
to
describe the composition and the maximum number of linearly
independent
equations relating
{n
j}
is called the
number
of
stoichiometric
degrees
of
freedom
F;;.
This is then the number of additional relations among
the
variables required to determine any compositional state.
If
the 5tafe
is
an
equilibrium state, the additional relations arise from thermodynamic condi­
tions, as described in Chapter
3;
otherwise, they may arise from kinetic rate
laws
or
from analytical determinations.
Thus
far the only linear equations relating
{n
i}
that we have considered are
the
element-abundance equations 2.2-1. The difference between
N
and the
maximum
number of linearly independent element-abundance equations is in
general denoted by the symbol
R.
Throughout this section
~

and
R
are
Chemical Stoichiometry numericaUy equal because only equations
2.2-1
are involved as linear equations
relating to
{nJ.
They are not equal in general, however, alld this
is
discussed in
Section 2.4.
Chemical stoichiometry enables us to determine the values of
F;;
and
R
for a
given system (i.e., one for which A is known) and
to
write a permissible set
of
chemical equations. Before describing a method for doing this, however,
we
describe the genesis of chemical stoichiometry and chemical equations from lhe
conservation equations. 2.3.2
General Treatment of Chemical Stoichiometry*
The general solution of equation
2.2-1
or
2.2-3,
a set
of
M
linear equations in
N
unknowns,
is
R
n
=

+
2:
"i€j'
(2.3-1)
j=1
where n° is any particular solution (e.g., an initial composition),
("1'
"2"
..
'''R)
is
any set
of
R
linearly independent solutions
of
the homogeneous equation
corresponding to equation
2.2-3
(i.e. equation
2.2-4),
and the quantities
€j
are
a
set of real parameters. Each
"J
is
called a
stoichiometric vector,
defined in
general
as
follows:
stoichiometric vector
v:
any nonzero vector of
N
real numbers satisfying lhe
equation
A"
==
O.
Hence A'j
=
O;
(1]*0);
j=
1,2,
...
,R,
(2.3-2)
which may also
be
written as
/11 2:
QkJ'\'
==
O;
k
==
L2,.
...
,M; "
j=
1,2,....
,R,
(2.3~3)

1:::1
and
Vi}
=t=
O
for at least one
i
for every
j.
The quantity
R
is
the rnaximum
number
of
linearly independent solutions of equations
2.3-2
and is given by
R
=
N -
C,
(2.3-4)
where
c
=
rank
(A).
(2.3-5 )
Usually,
but
not always, C
=
M.
Ao
alternative way of regarding the parameters
{~j}

and the quantities
{Vi
j}
may be obtained from further examination of equation 2.3-1. which may be ·An
eJementary trcatmen: has been descríbed
by
Smith and Missen (1979) and has been iilusuared
for a simple system

26
-n,e
Closed-System
Con~traint
and Chemical Stoichiometry
Chemical Stoichiometry
21
written as
R
n
i
=
1l~

+
L
Pij~j;

i
=
1,2
•...
,N.
(2.3-1a)
)=1
For
fixed
nO,
we
have
(
dn
i ) .
=
P
;
i=I,2,
...
,N;
j=1,2,
...
,R,
(2.3-6)
a~j

~k;'J

iJ
where the notation
~h=j

means alI
~'s

other
than
the
jth,
and
P
ij
is
called
the
stoichiometric coellidem
of
the
ith
species in the
j
th stoichiometric vector.
Thus
is
the
rate of change
of
the
mole number
of
the
ith
species
n
i with respect to
P
ij
the reaction parameter
~J"

Further significance of
~j

is
discussed in Section
2.3.5.
Here
we
note
that
equation
2.3-1
may be regarded as essentially a linear transformation from
the
N
independent variables
fi
to
the
R
independent variables
~.

The variables
fi
are constrained by the element-abundance equations
2.2-3,
whereas the varia­
bles
~

are not so constrained. since for any
{~J,

premultiplication of equation
2.3-1
by
A
gives .
R
An
=
AnO
+
L
€jA"J.
j=
I
The
first term on the right
is
b,
and
the second term vanishes because
of
the
definition
of
the stoichiometric vectors (see equation
2.3-2).
The
chemical significance of equation
2.3-1
is that
any
compositional state
of
the system
n
can be written in terms
of
any
particular
state
nO
and a linear
combination of
a
set
ofR
linearly independent vectors
"J
satisfying equation
2.2A.
Equation
i3-2
leads naturally to the concept
of
chemical equatiofls.
What
we call
a
"chemical equation"
is
simply a chemical shorthand way
of
writing
equation
2.3-2
or
2.3-3,
in which the columns
of
A
are replaced by
the
corresponding molecular formulas of the species.
Equations
2.3-3
may be written in terms
of
the columns of A as
N L
aiP
ij
=
o;
j
=
1,2,
...
,R.
(2.3-7)
i=l
A set of chemical equations results from equations
2.3-7
when
we
repIace the
formula vectors ai by their species names
Ai
and
the vector
O
by
O:
IV L
Aiv
ij
=
o;
j
=
1,2,
.
..
,R.
(2.3-8)
i=1
Such equations are a chemical shorthand way
of
writing the vector equations
2.3-7
(or equation
2.3-2).
To
be
able to use these concepts in actual situations,
we
must be able to
determine the quantities
R
and
a setof
R
linearly independent stoichiometric
vectors,{v,l We discuss a systematic numerical determination
of
these quanti­
ties in lhe next section
but
first use an example to illustrate the definitions.
Example
2.2
Consider
the
system {(NH
3
,
Oz,
NO,
NOz,
Hl»,
(N,H,
O)}
in
Example
2.1,
in which the formula matrix
A
is
given. The vector
v,
=
(O,
-
11
-1,
1,
O{
is a stoichiometric vector since
it
satisfies
Av
=
O;
that is,
0
O
1
2
o
1
O)
_1
O O
O 2
-}
2
1
2 1
,O
I
Oi I
(n
Another stoichiometric vector for this system
is
V
z
=
(-
i,
-i,
3,
O,
1)
T.
These
two vectors are JinearJy independent because
of
the values of the last two
entries of each vector.
The
rank
of A
is
C
=
3,
and hence the maximum
number of linearly independent vectors
is
R
=
5 - 3
=
2.
Any composition
of
the system can
be,
written from equation
2.3-1
as
n
=
nO
+
(O,
-~,

-I,
1,0)T~1

+
(--1,
-7"
j,O,
l)T~i'

Equations
2.3-7
for this system are
O(q
-j(~)

-1(~)

+
I(~)

+O(~)

~

(~l,

Oi_
JI
\2
1,
0,
and
- t
W-
~ m
+
t (
~ )
+
o(
~)

+
Im
=
m
Replacing the formula vectors by the names of the respective species
A
j
and
O
by
O.
we
have
ONH
3
-
102
-
lNO
+
lN0
2
+
OHzO
=
O,
-~NH3

-
i
0
2
+
iNO
+
ONO
z
+
lH
2
0
=
O.
Conventionally, species names with negative stoichiometric coefficients
are
written on the left side
of
a chemical equation
a..'1d
those with positive

22
23
Thc
C1osed-System Constraint and
Chemkal
Stoichiometry
coefficients
on
the right side, so that negative numbers do not appear.
Thus
clearing
of
fractions
and
zero quantities
and
rearranging in accordance with
this convention, we have
2NO
+
O
2
=
2N0
2
and
4NH
3
+
50
2
=
4NO
+
6H
2
0.
A linearly
independent
set
of
R
stoichiometric vectors
{v;}
is called
a
complete set
of
stoichiometric vectors for
the
system with formula
matrix
A.
This
is
an
appropriate
name
since, from
equations
2.3-1,
we
can
determine
any
possible
solution
n
of
the e1ement-abundance equations by specifying,
by
some
means
other
than
chemical stoichiometry itself,
an
appropriate set
of
R
~j

values (relative to a suitable
nO),
along
with
the
matrix.
A
concise
way
of
writing
any
set
of
stoichiometric vectors is
by
defining a matrix N whose
columns
are the vectors
'j-;
that
is,
N
=
("1'
"2""
,v
q
).
(2.3-9)
When
q
=
R
and
allv
j
are
linearly
independent,
N
is "complete,"
and
hence
we
define
the fol1owing:
complete
stoichiometric matrix
N:
an
N
X
R
matrix whose
R
columns are
linearly
independent
stoichiometric vectors, with the additional specification
that
R
=
N
.-
rank
(A) (equations 2.3-4
and
-5); this condition impEes
that
rank
(N)
=
R.
This
enables us to write
equations
2.3-2 as the single
matrix
equation
AN
=-~

O.
(2.3-10)
Analogous
to the idea
of
a complete set
of
stoichiometric vectors, we define the
following:
complete
set
of chemical equations: the set
of
equations 2.3-8, where the
v
ij
form
a complete stoichiometric matrix
N,
as defined previously.
We
emphasize
that
such
a set
of
equations is
not
uni
que
since any one
equation
can
be
replaced
by
a linear
combination
of
any
of
the
equations.
It
is generated solely
from
the list
of
species
presumed
(or
demonstrated)
to
be
present,
that
is, from
A,
and
neither requires
nor
implies any knowledge
of
reactions
presumed
to
be
taking
place,
or
of
reaction mechanisms.
If
we define
c
=
rank
(A),
(2.3-5)
as
previously, the significance
of
C is
as
follows: given R
n
I
values, we
can
solve
equations 2.2-3 for C
n
i
values,
provided
that
lhe formula vectors
of
Chemical Stoichiometry those C
11
i
values
are
linearly independent. This is equivalent
to
partitioning
the
species into two groups,
components
(numbering
C)
and
noncomponents
(numbering
R).
The
components
may be regarded
as
chemical
"building
blocks" for forming
the
noncomponents
in chemical equations, one
equation
being required for each
noncomponent.
This leads
to
the
following definition:
component: one
of
a set
of
C species
of
the chemical system, whose set
of
formula vectors
{3
I'
a
2

..
,a
c}
satisfies rank
(ai'
3
2
"
..
,a
)
=
C [where C
=
c
rank
(A)].
Example 2.3
For
the system described in Examples
2.1
and
2.2,
a
complete
stoichiometric matrix is
o
-j
I
j -
t
N=I_:
~I

O
1
!
Equation 2.3-10 becomes
O
..
­
( I
O
1
1
-1
OI
O
~
~
I-
-
(0
~)

.
O
O
~
)
-1
O
\~

2 2
1
~

'.
I
I .
, O I
O
I '
This matrix equation is equivalent to the two vector equations in Example 2.2. Hence
a
complete set
of
chemical equations for this system
is
given
by
the
t\'O
chemical equations written there.
....
Since C
=
3 for {his system, a set
of
components
is
given by
{AI'
A
2
,
A
3
},
where
{a
1
,a
2
,a:d
are línearly independent.
The
nine possible sets
of
components
are
{NH
3
,
02'
NO},
{NH
3
,
°
2.
N0
2
},
{NH
3
.
02'
H
2
0},
{NH
3,
NO,
N0
2
},
{NH
3
,
NO,
H
2
0},
{NH
3
,
N0
2
, H
2
0},
{02'
NO, H
2
0},
{02'
N0
2
,
H 2
0},
and
{NO,
N0
2
, H
2
0}.
2.3.3 The Stoichiometric
Procedure/
Algoritbm
The
procedure simultaneously determines
rank
(A)
and
a complete set
af
chemical equations. HP-41C,
BASIC,
and
FORTRAN
computer
programs
implementing it are given
in
Appendix
A,
and
we describe
lhe"
hand
calcula­
tion"
procedure here. This procedure
can
also
be
used for
balancing
oxidation-reduction
equations
in inorganic
and
analytieal chemistry,
as
an
alternative to
other
methods, sueh as the half-reaction
method
that
uses
oxidation numbers
(Mahan,
1975. pp. 257-265),
and
ion-eIectron
and

24
The
C1osed-Svstem COfistraint and Chemical Stoichiometry
valence-electron methods (Engelder,
1942,
pp.
122-127),
which require addi­
tional concepts.
The procedure
is
similar to that used
in
the solution of linear algebraic
equations by Gauss-Jordan reduction (Noble, 1969,
pp.
65-66).
lt
illvolves the
reduction
of
the formula matrix A
to
uni! matrix form (Noble,
1969,
pp.
131-132)
by elementary row operations (Noble,
1969,
p. 78). The unit matrix
form
is
represented by
A*
=
(I
c
Z)
(2.3-11)
O
O'
where I
c
is a
(C
X
C)
identity matrix and Z
is
a
(C
X
R)
matrix,
at
least one
of whose elements
is
nonzero; C is the rank of
A
*
as well as the rank
of
A.
In
many cases the O submatrices are absent.
A complete stoichiometric rnatrix
is
formed from A
*
by appending the
R
X
R
identity matrix below -
Z;
thus
N
= (
-Z)
(2.3-12)
IR
'
(Schneider and Reklaitis,
1975;
Schubert and Hofmann,
1975,1976).
A com­
plete stoichiometric rnatrix expressed in the form
of
equation
2.3-12,
that is,
one that contains the
R
X
R
identity matrix,
is
said
to
be in
canonical
formo
Here N is a complete stoichiomctric matrix for A since our Gauss-Jordan
procedure essentiaIly constructs the columns of Z in A
*
to satisfy
AcZ
=
AR'
(2.3-13)
where the columns of
A
c
refer to a set of component species and the columns
of A
R
refer to the remaining species. Thus
we
have
Z
=
ACIA
R

(2.3-14)
and hence
_ ( ) ( - A
c
IA
R)
_ _
AN - A
c'
A
R
IR.
-
-AR
+
A
R-O.
(2.3-15)
In addition to row operations, column interchanges may be required
to
obtain the unit matrix form, depending
on
the way in which the species have
been arbitrarily ordered
at
the outset
as
columns of
A.
The steps of the procedure
are
as follows (Smith and Missen,
1979):
1 Write the formula matrix A for the given system, with each column
identified above it
by
the chemical species represented.
Chemical Stoichiometry
25
2 Form a unit matrix as large as possible in the upper-Ieft portion of A by
elementary row operations,
and
column interchange if necessary; if
columns are interchanged, the designation
of
the species (above the
column) must be interchanged also. The final result is a matrix A
*,
as in
equation
2.3-11.
3
At
the end
of
these steps, the folIowing are established:
(a)
The
rank
of
the matrix
A.
which
is
C, the
number
of components,
is
the number of I's
on
the principal diagonal
of
A*;
(b)
A
set of components is given by the C species indicated above the
columns
of
the unit matrix;'
(c)
The
maximum number
of
linearly independent stoichiometric equa­
tions
is
given by
R
=
N -
C; and
(d)
A complete stoichiometric matrix N in canonical {ofm is obtained
from the submatrix Z in equation
2.3-11,
according to equation
2.3-12;
each equatioIl in a permissible set
of
chemical equations
is
obtained
Crom
a column
of
N by first writing equation
2.3-8
and
lhen rearranging, using the convention described in Example
2.2.
2.3.4 lIlustration of the Treatment and Procedure
The procedure described in Section
2.3.3
can be used for a chemically reacting
system that involves inert species, charged species, and mass transfer between
phases.
The
first two of these havc been ilIustratcd previously (Smith and
Missen,
1979),
and
we
illustrate the third here.
Example 2.4 Consider the esterification of ethyI alcohol
(C
1
H
ó
O)
wíth acetic
acid
(C
2
H
4
ü
1 )
to form water and ethyl acetate (C
4
H
g
0
1
)
in a liquid
CC)­
vapor(g)contact, which allows for lhe presence
of
acetic acid dimer in the
vapor phase (Sanderson and Chien,
1973).
The system is represented by
{(H
2
0(e),
C
2
H
6
0(e),
C
1
H
4
0
2
(e),
C
4
H
8
0
2
(e),
H
2
0(g),
C H
0(g),
Z 6
C
1
H
4
0
2(g),
C
4
H
g
0
2(g),
(C
1
H
4
0
2
)1(g»),
(C,
H,
O)}.
For this system,
we
use the procedure described in Section
2.3.3
to determine
the number
of
components
C,
a set
of
components, the nurnber
of
chemical
equations
R(=
F;,),
and a perrnissible set
of
chemical equations.
Following the steps outlined previously, we have, with
N
=
9
and
M
=
3,
1
(I)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
2
4 O
2
2 4
6
4
8 2
64
8
A=
n
2
~)
1
2
2 1
2
2

27
The
Closed-System ConstTaint and Chemical Stoichimuet"1)
Here the
numbers
at
the tops of the columns correspol1d to the species
in
the
order
given,
and
the
rows are in the order
of
the elements given.
2
The
matrix A
can
be
put
in the fol1owing form
by
means
of
elementary
row operations
and
column interchanges.
26
(2) (1) (3)
(4) (5) (6) (7) (8) (9)
} O O
1 O 1 O
}
O)
A*
=
O } O
-}
1 O O
-1
O
(
O O }
I O O 1
1 2
3
(a)
Rank
(A)
=
C
=
3;
(b) a set
of
components
is
{H
2
0(e)(l),
C
2
H
ó
O(e)(2), C
2
H
4
0
ir)O)};
(c)
R
=
N -
C
=
9 - 3
=
6;
(d) reordering
the
list
of
species according to the designations above
A
*,
we have the following complete stoichiometric matrix:
O
-}
o
-I
r-
I
01
1
-1
O
o
1
O
-}
o
O
-}
-1
-2
1
O
oo
O
o
N=j
o
1
o
o
o
o
·0
o
1
o
O O
o
o
o
1
oo
oooo 1
o
o
o
oo
o
1
This corresponds to
the
following set of six chemical equations:
C H
O(e)
+
C
(f)
=
H
2
0(r.)
-+-
C4H~02(fJ),

2
ó
2
H
4
0
2
H
2
0(C)
=
H
2
0(g).
C
2
H
ó
O(
fi)
=
C
1
H
ó
O(g),
C
1
H
4
0
2
(
e)
=
C
2
H
4
0
1
(g),
C O(r.)
+
C
2
(e)
=
H
2
0(e)
+
C
4
H
x
0
2
(g),
2
H
ó
H
4
0
2
2C
2
H
4
0
2
(e)
=
(C
1
H
4
0
2
)ig)·
2.3.5
nle
Extent
of
Reaction
The
quantity
~

introduced
in equation
2.3-1
is the extent-of-reaction
parameter
original1y
introduced
by
De
Donder (1936, p.
2~

Prigogine and Defay, 1954. p.
Expressing Compositional RestTictions in Standard Form 10) to measure the "degree
of
advancement
of
a
reaction:'
The quantities
~j

(i.e., for
R
chemical equations) were introduced previously as a set of
rea·l
parameters in establishing the concept
of
chemical equations from the
element-abundance equations.
If
we
accept the existence
of
chemical equations
ab initio, then equations
2.3-1
and
2.3-:.6
define a set
of
quantities
~1'

one such
quantity
for each chemical equation written.
The
extent
of
reaction
is
a useful
variable
for
equilibrium computations. From equation
2.3~I.

it
is
an extensive
quantity.
2.4
EXPRESSING
COMPOSITIONAL
RESTRICTIONS
IN
STANDARD
FORM
2.4.1
Introduction
We
discussed in Section
2.3
how a complete stoichiometric matrix
N
and a
corresponding complete set
of
chemical equations can
be
obtained when the
formula matrix A
of
a system is given. These procedures are essentiaUy those
used in the computer program
VCS
in Appendix
D,
which calculates equi­
librium compositions. Whenever A
is
given
at
the outset,
we
advocate the
formation of
an
N matrix in this way. This guarantees
that
rank
(N)
=
N -
rank
(A),
(2.4-1)
in
which case we say that the compositional restnctlOns are expressed in
standard
formo
However, if an N matrix
i.s
given at the outset, there is
no
guarantee that is the case. The purpose
of
this section
is
to show how the
formula matrix A
can
bc modified
(if
necessary)
so
that equation
2.4~1

is
satisfied. An important situation in which an N malrix
is
specified at the outset
is
in
problems involving only mass transfer
of
substances betwcen phases.
The
key feature
of
a complete stoichiometric rnatrix.· corresponding to a
given formula matrix
A,
is that its
rank
R
is givcn by equation 2.3-4, where
R
is
the proper number
of
stoichiometric equations needed to describe ail possible
compositions
of
the system. Normally,
we
do
not advocate forming an N
matrix
for a set
of
chemical equations written
or
suggested
ab
initio by some
means because it is
not
necessari1y assured that such a matrix has the correct
rank
R.
Typical situations giving rise
to
a stoichiometric matrix whose
rank
is
incorrect are:
(l)
there may be too many equations in such a set, in the sense
that
they are not
alllinearly
independent;
and
(2) even
if
the equations written
are linearly independent, they do not necessari1y represent the maximum
possible number
of
linearly independent equations.
Occasional1y, however, we may wish to consider a specific N matrix
at
the
outset. For example,
an
N matrix may be suggested
by
a kinetic mechanism.
Such a mechanism must
be
examined
to
ensure
that
rank
(N)
=
R.
Even
if
rank
(N) iscorrect, kinetic schemes must pass
other
stoichiometric tests
(Ridler

2.9
28
The
Closed-System Consrraint and Chemical Stoichiometry
et
a1.,
1977; Üliver, 1980), whieh are related to the nonnegativity eonstraints on
the mole numbers. Here
we
diseuss how sueh
N
matrices may be utilized.
Indeed, some authors approach chemieal stoiehiometry in this way (e.g., Aris
and
Mah, 1963).
We
discuss such problems here partIy because it is worthwhile to
view
this
approaeh
in terms of the formulation in Sections 2.2 and 2.3 and partly
beeause eertain types of
N
matrix have special properties, which are explored
in Section 2.4.3. They also specify some speeial kinds
of
chemical equilibrium
problem, which we treat in Chapter
9.
2.4.2 Reduction of a Given Stoichiometric Matrix to Standard Form For
the formation of hydrogen bromide from hydrogen and bromine, the
relevant system in kinetic terms
is
{(Br
z

H
2
,
HBr,
H,
Br),
(H,
Brn.
The accepted
chain-reaetion
mechanism (e.g., Moore,
1972,
p. 398)
is
Br
2
---+
2Br
Br
+
H
2
--'>
HBr
+
H
H
+
Br
2
......
HBr
+
Br
H
+
HBr
---+
H
2
+
Br
2Br
---+
Br
2
A
stoiehiometric matrix
N
is
constructed from the stoichiometric coeffi­
cients
in
the kinetic scheme, with each column corresponding to a given
reaction, made
up
by
the coefficients of the species in that reaction. With the
equations
and
species ordered as indicated previously, a stoichiometric matrix
is
-1
O
~1

O
1
O
-'I
O
I
O
N=I
O
1 1
-1
O
O
1
-1
-I
O
2
-1
I
1
-2
Since we
can
establish from the formula rnatrix of the system, aceording to the
method
described in Section 2.3.3, that there are at most three linearIy
independent
chemicaI equations for this system, there must be two columns
too
many
for
N.
We
can
determine a linearly independent set of chemical equations by
performing e1ementary co1umn operations
on
N.
This
is
equivalent to perform­
ing
elementary row operations on
NT
in the same way as for A in the computer
Expressing Compositional Restrictions in
Standard
Form
programs listed in Appendix
A.
We
can
thus use the rows of
N
as input to this
programo Since the rnatrix in this case
is
small,
we
illustrate the procedure by
hand. This results eventually in the matrix
I
I
O O
O
-2
O
I
O
-2
O
(N*{
=
lo
O
1
-I
-1
O
O
O
O O
OO
O O
O
The rank of
{N*f
is
3,
and hence a complete stoichiometric matrix
is
given
by the nonzero rows of
(N*)T,
100 O I O
O O I O
-2
--I
-2
O-}
A linearly independent set of chemical equations
is
hence given by
2Br
=
Br
2
,
2H
=
H
2
,
H
+
Br
=
HBr.
Usually, but
not
always, the
number
of
linearly independent chemical
equations that results coincides with
rank(N)
=
R.
(2.4-2)
Equation 2.4-2 essential1y means
that
the given N can be reduced to a complete
stoichiometric matrix. The original N matrix
is
often
in
error in the sense that
it has
toa
many
columns (as in the preceding example). We see in what follows,
however, that oecasionally
fewer
than the maximum number
of
chemical
equations may occur.
2.4.3 .Stoichiometric Degrees of Freedom and Additional
Stoichiometric Restrictions
We have seen the way in which the specifieation of the formula matrix A for a
chemical system consisting of
N
speeies restriets the allowable compositions
fi
to those satisfying the element-abundanee constraints
ofequations
2.2-1 or
2.2-3. The number
af
linearly independent constraints posed by these restric­
tions
is
given by C
=
rank
(A).
Thus a total of
(N
-
C)
mole numbers
of
appropriate species
of
the composition vector must be specified for lhe

30
31
The
Closed-System Constraint
and
Chemical Stoichiometry
remaining mole numbers to be determined.
The
number
(N
-
C)
is
essentiaUy
the
number
of degrees
of
freedomthat
are imposed by the element-abundance
constraints.
We
have denoted this
number
by
R,
which is then defined
by
R
=
N-
C.
(2.3-4)
We
a1so
introduced in Section 2.3.1 the quantity
~

to
denote the stoichio­
metric degrees of freedom. When we specify a priori a stoichiometric matrix N
for
a system, the number of stoichiometric degrees
of
freedom
~

is defined as
~

=
rank
(N).
(2.4-3)
When a formula matrix A is specified
and
the only compositional restrietions
are
the element-abundance constraints, we have seen
that
~

=
R
=
N -rank
(A).
(2.4-4)
In
general,
~~R,

(2.4-5)
since for
the
matrix equation
AN
=0,
(2.3-10)
we must have (Noble, 1969, p. 142)
rank N
~

N
--
rank
(A),
(2.4-6)
where
N
is the number
of
eolumns
of
A
and
the number
of
rows of
N.
For
convenience,
fol1owing
equation
2.4-5,
we
define the quantity
r
as the dif­
ference between
R
and
F:
*:
r=R
-
~

=
N -
rank
(A)
-
rank
(N),
(2.4-7)
and
we call r the number of special stoiehiometric restrictions.
The
purpose
af
this section is to show how the
r
additional stoichiometric
restrictions can be eombined with the usual element-abundanee constraints to
Expressing Compositional UestTidions in
Standard
fonn
form a modified matrix A', and modified element-abundallee
veet()T
b'
50
that
FI'
=
N -
rank
(A').
(2.4-8)
The impartance
of
this
is
that we can treat the combined set
of
constraints in
the same
manner
as before by using the modified formula matrix
A'.
Since the
right side
of
equation 2.4-8
is
R
for the modified system,
we
have
r
=
O:
that
is.
r
=
N -
rank
(A')
-
rank (N)
=
O.
(2.4-9)
Thus
the
eompositional restrictions are expressed
in
standard form.
We call a pair
of
matrices
A'
and
N satisfying equation 2.4-9 "compatible"
matriees. In the remaining
parts
of
this section
we
show how to obtain
compatible matriees for two types
of
problem in whieh we effectively have
r>
O.
The two cases refer to situations in whieh the additionaI stoichiometric
restrictions arise
both
explieitly
and
implicitly.
2.4.4 Additional Stoichiometric Restrictions that Arise Explicitly
Suppose
lhat
it is known experimentally that the amounts
of
two species
p
and
q
are always equal. This can
be
written as np-nq=O.
(2.4-10)
In this {ase
r
=
1,
and from equation
2.4-7,
we
obtain
~=R-I=N-C-l.

We
wish
to be able to account for this restriction by means
of
a modified
complete stoichiometric matrix N' that is compatible with a formula matrix A'.
Example 2.5 Consider lhe system
{(C
óH
s
CH
3
,
H
2
,
CóHó,
CH
4
),
(C,H)}
discussed by Bjbrnbom
(1975)
and
by
Sehneider and Reklaitis
(1975).
Suppose
that it
is
known experimentalIy tha1
if
the initial state is toluene, the resulting
benzene and methane oceur in equimolar amounts.
To
see
how this additional eonstraint is ineorporated, we first write the
usual element-abundanee eonstraints
and
the compositional restrietion
of
equation 2.4-10. Thus we have
*In
the
previous
lreatment (Smilh
and
Missen. 1979) this distinction was
nat
drawn.
and
hem:e lhe
treatment
was
restricted to cases in
whieh
r
=:
o.
The distinction is neecssary
in
goin&
beyond
O 6
Ao
=
(~

(2.4-11 )
"pure"
stoichiometry
(r
'*
O).
It
has. in effcet.
becn
emphasized
by
Bjornbom (1975, 1977,
1981
)
2 6
~ )(
~
i)
= (
::
)
frol}l
another
point
of
view.

32
.13
The
Closed-System Constraint
and
ChemicaJ Stoichiometry
and
n, )
(o
O
nz -
O
(2.4-12)
-1)
::
- .
(
BeTe rank
(A)
=
2,
N
=
4,
R
=
2,
r
=
1,
and
~
=
4 - 2 - 1
=
1.
Let us now see
how
this example
can
be
presented in
standard
formo
Equations 2.4-11
and
2.4-12 are equivalent
to
the
single set
of
equations
Ato
=b',
(2.4-13)
where lhe matrix
A'
and
the
vector
b'
are
,
(7
o
6
.
I).
2
6
4.
,
A'
=
~

O
1
-1
and
b'
=
(~:
).
Equation
2.4-13
nm\' incorporates
all
the compositional constraints
on
the
systern. We treat
A
t
as
a modified system formula matrix
and
obtain
a
complete stoichiometric
matrix
for
iL
This yields
I
--1 '
N'=
-1
, 1
..
(
1
We
have
combined
the
element-abundance constraints and the
additional
stoichiometric restriction in equation 2.4-13
(cf.
Ao
=
b). Frorn
ihis. rank
(Ar)
=
3,
and
~
=
4 - 3
=
1
=
rank (N')
=
N -
rank (A').
In general,
we
may
incorporate
any
additional constraints
that
are
of
the
form
Do
=d,
(2.4-14)
where
rank (H) =
r.
(2.4-15)
Expressing Compositional Restrictions in
StandardFonn
V,/e
do
this by forming
the
modified formula matrix
A'
and
elernent-abundance
vector
b'
by
means

A'
=
(~)

(2.4-l6a)
and
b'
=
(:)
(2.4-16b)
Ali
the
constraints are now expressed
in
the single
equation
A'o
=
b'.
(2.4-13)
We
form a complete stoichiometric matrix
N'
from
A'
in
the usual
way.
Then
the
problem
is
formulated
in
standard
form:
F.s
=
N -
rank
(A')
=
rank
(N').
(2.4-17)
It
follows
ihat
every possible composition
fi
of
the
system
is
given by the
general solution
of
equation
2.4-13,
which is
I~

n
=

+
2:
"j~j'

(2.4-J8)
j=l
2.4.5 Additional Stoichiometric Restrictions that· Arise Implidtly We
consider here the general
situationin
which
an
N matrix is specified
a
priori
as
determining
the
allowable compositions a system
may
attain, starting
fram
some particular given composition
nO.
We
assume
that
alI the columns
of
N
are
linearly independent.
[f
this
is
not
the
case, we use the methods
described
in
Section 2.4.2 to achieve this. For a given stoichiometric matrix N,
we show how a
"fictitious"
formula matrix
A
can
be
found, thus enabling
us
to
treat
the problem in
standard
formo
That
Às,
we waut
to
have
F.s
=
N -
rank
(A)
=
rank
(N).
(2.4-19)
The
solution
of
the
problem
is relative1y straightforward,
and
we
can
perhaps
appreciate this best by considering
an
example
of
an
unrestricted
stoichiometric
system.

34
35
The
Oosed-System
Consrraint and Otemical Stoichiometry
Example 2.6 Consíder the system
{(CH4,02.C02,H20,H2)'
(C,
H,
O)}. A
complete stoichiometric matrix
is _I
-)
1
1
NT=
}
1"
(
_1
I 1
~ ).
2
1:
1"
O
Now form the
3
X
5
matrix with the first three columns being
the
3
X
3
identity matrix and the last two columns being the negative
of
the first three
elements
of
the rows of
N
T
.
This yields the matrix
1
2
I
1:
O
O
,1
A*
=
10
I
O
I
? I

O
O
)
_.1
-1
2
h
is readily verified that this
A
*
is
compatible with
N
given previously since
A*N
=
0,
(2.4-20)
and
N --
rank
(A*)
=
2
=
rank
(N).
Thus,
for the matrix A
*,
N
i5
a complete stoichiometric matrix.
The
5ystem
formula vectors are given by
a*(CH
4
)
=
(l,O,O)T
a
*(
°
2
)
=
(O,
1,
O)
T
a*(C0
2
)
=
(0,0,
I)T
a*(H
2
0)
=
(1,1,
-!f
*(H
) -
(I I _
I)T
a
2 -
2,},
2"
The
element-abundance equations corresponding to this formula matrix are
N N 2:
aj,!1
i
=
L
aj;nf
=
b/,
(2.4-21 )
i==
I
i=
I
where

is
any allowable composition
of
the system
(e.g.,
the initial composi­
tion).
Expressing Compositional Restrictions
in
Standard Form
The fact that we have produced a rather strange looking formula
matrix
in
this example is
not
really very strange at all if
we
examine the situation more
carefully.* Normally, we are given
A
and
then determine a complete stoichio­
metric matrix
N
satisfying
AN
=0.
(2.3-HJ)
We
saw
in the previous discussion
of
this problem
thar
lhe matrix
N
is not
unique but is only subject to the requirement
that
it have
N -
rank
(A)
linearly
independent columns.
If
we now consider the transpose of equation
2.3-10,
we
have
NTA
T
=
O.
(2.4-22)
Now
we
consider the case when
NT
is
given, and
we
want to determine
a
"complete" matrix A
*
that satisfies equation 2.4-22. Just as N in equation
2.3-10
is
not unique,
A
T
in equation
2.4-22
is
also not unique,
but
is
an
N
X C
matrix
(A
*)T
that satisfies
c
=
rank
(A
*)
=
N -
rank
(N).
(2.4-23)
The main point we wish to emphasize by means of the preceding example
is
that
we
can either
start
from a given formula matrix A and
obtain
a
complete
(but nonunique) stoichiometric matrix
N
or
tum
the situation around, starting
from
a
given stoichiometric matrix
N
and obtain
a
(nonunique) compatible
formula matrix
A
*.
The
actual recipe for construcIing
A
*
when
N
i5
ina
specific form
is
5traightforward and
can
be
performed by in5pection.
The
general
prescription
í5
as
fo11oW5.
We
start
with a matrix
N
in
the form
IF,
)
(2.4-24 )
N=
(
N, '
where
I
F
is
the identity matrix of order
F,
and
N
I
is
an
(N
-F,)
X
F:.
matrix.
An arbitrary matrix
N
can be
put
in this farOl
by
the method discussed in
Section 2.4.2.
Then
a compatible matrix A
*
is
given by
A* =
(-N1,IN-fJ,
(2.4-25 )
where
A
*
i5
compatible with
N
since it has
(]V -
F,)
linearly independeut
columns and satisfies
-N1+N1=O.
A'N
=
(-N"IN-d(
~
1
*cf.
Bjórnbom (1981
l.

Problems
37
36
The CIosed-SystemConstraint and ChemicaJ Stoichiometry
PROBLEMS
The element-abundance vector b*, corresponding to A* is given by
2.1
(a)
Write equation
2.2-3
in full
f-or
the system {(H
3
P0
4
,
H
2
PO;,
A*n
o
=
b*,
(2.4-26)
HPOr-,
pol-,
H+
,
OH-
, H
2
0),
(H,
0,
P,
p)},
if the system
where n° is any allowable composition of the system, such as the starting results from dissolving
2
moles of
H
3
P0
4
in
I
mole of H
2
0.
composi
tion_
Thus the element-abundance constraints are
(b)
From
the result in part a, write equations
2.2-}
for the system, that
is, by multiplying out equation
2.2-3.
A*n
=
b*.
2.2
Balance each of the following
by
Gauss-Jordan reduction,
and
in
so
Smith
(1976)
has also treated Example
2.5
by this implicit approach. doing show that only one chemical equation
i5
required in each case:
(a)
Na
2
0
2
+
CrCI
3
+
NaOH
=F
Na
2
Cr0
4
+
NaCI
+
H
2
0
Example 2.7
Consider the system {(C
2
H
6
(C),
C
3
H
6
(e),
C
3
H
8
(e),
C
2
H
6
(g),
C
3
H
6
(g), C
3
H
ll
(g», (C, H)},
in
which only mass transfer
of
the
substances
(b)
K 2
Cr
20
7
+
H
2
S0
4
+
H
2
S0
3
=F
CriS04h
+
H
2
0
+
K
2
S0
4
between the two phases
is
allowed.
Find
A*
and
b*
50
that the problem may be
(c)
KCI0
3
+
NaN0
2
=1=
KCI
+
NaN0
3
treated in standard
formo
(d)
KMn0
4
+
H
20
+
Na2Sn02
=1=
MnO
z
+
KOH
+
Na
z
Sn0
3
2.3
For
each of the folJowing 5ystems, determine the number C and
a
Solution
The
N
matrix is generated at the outset from the chemical
permissible set of components and the maximum number
R
and
a
equations
permissible set of independent chemicaI equations:
C
2
H
6
(g)
=
C
2
H
6
(r),
(a)
{(CO, CO2, H,
H
2
,
H
2
0,
0,
02'
OH,
N
2
,
NO),
(C, H, O. N)}
C
3
H
6
(g)
=
C
3
H
6
(P),
(b)
{(CH
4
,
C
2
H
2
,
C
2
H4, C
2
1l
6
,
C
6
H
ó
'
H
2
,
H20), (C,
H,
H
2
0)}
(c)
{(CH
4
,
CH
3
D,
CH
z
D
2
,
CHD
3

CD
4
),
(C,
H,
O)}
(Apse
and
Missen.
and
1967)
C
3
H
g
(g)
=
C
3
H
8
(C),
(d)
((C(gr), CO(g), CO
2
(g), Zn(g), Zn(
e).
ZnO(s»,
(C,
O.
Zn)}
(e)
((Fe(C
2
0
4
)+
.
Fe(C
2
0
4
)2"
.Fe(C204)~-
.Fe
3
+
,SOJ-
,HS04-
.H+,
as
HC
2
0
4
- ,
H
2C204'
C
2
0,;-
}.
(C,
Fe.
H,
0,
S,
p)}
(Swinnerton and
1
O
Miller,
1959)
O
1
~\

(f)
{(H
2
0,
H
2
0
2

H+
,
K
+ •
Mn0
4
- ,
Mn2+
,
02'
SOr-
).
(H,
K,
Mn,
O
O
I
N=I
0,
S.
p)}
,
-}
O
O
(g)
{(C
6
H
6
(f).
C(,Hó(g),
C
7
H!(l'), C
7
H x
(g),
o-CgH1oU).
o-CKHIO(g)·
O
-]
O
m-CxHIO(I'),
m-CgHIO(g),
p-Cl\HlOU). p-Cy,HIO(g».
(C.
H)}
O
O
-}
(h)
{(0Z<g).
H
2
0(g),
CHig),
CO(g), CO
2
(g). H
2
{g),
N
2
(g). CHO(g),
This is in the same form as equation
2.4-24,
with
~
=
3.
A compatible formula
CH
20(g), OH(g), Fe(s), FeO(s). Fé
3
0
4
(s), C(gr), CaO(s).
CaC0
3
(s»,
matrix
A*,
from equation
2.4-25,
is (O. H,
C.
Fe, Ca, N2
)}
(Madeley and Toguri, 1973b)
2.4
Ethylene can be made by the dehydrogenation
of
ethane. Methane
is
a
1 O O 1 O O)
A*
=
O 1 O O 1 O
possible by-product. and it
is
undesirable for the system
to
approach
.
(
O O
100
1
equilihrium with respect to all these species at lhe outlet of the reactor.
as the following figures show. For a feed that contains
0.4
mole of steam
Fromequation
2.4-26,
(inert)permoleofC
2
H
ó
'
andforanoutlettemperatureof
1100
Kand
pressure
of
}.6
atm, it can be calculated that
if
equilibrium obtained at
,
n~

+
n~

)
the oudet, there wouid be
0.515
mole
of
ethylene per mole
of
ethane
in
lhe
feed
and
0.950
mole of methane. Calculate the mole fraction
of
each
b*
=
A*n
c
= .
n~

+
n~

..
I
species in the oudet mixture
011
a steam-free basis.

n~

+

41
CHAPTER THREE _
Chemical
Thermodynamics and
Equilibrium Conditions In
Chapler
2 we dealt with lhe stoichiometric description
of
a chemical system
that
is valid regardless of whether the system
is
at
equilibrium.
Here
we deal
with
lhe
thermodynamic description
of
a chemical system
and
the conditions
for equilibrium
in
a closed system provided
by
chemical thermodynamics. The
treatment
is necessarily synoptic. Full developments
and
accounts are given,
for example,
by
Prigogine and Defay (1954), Lewis and Randall (1961), and
Denbigh (1981).
We
first review conditions for equilibrium in terms
of
potential functions
and
the
thermodynamic description of a chemical system, introducing the
chernical potential. We then fonnulate the equilibrium conditions in terms of
the chemical potential in two ways, corresponding to the two ways
oi"
incorpo­
rating
the
closed-system constraint discussed
in
Chapter
2.
After showing ihe
equivalence
of
these two formulations,
we
develop the expressions for the
chemical potential
that
are necessary for their use. We conc1ude
the
·chapter by
commenting
on
the
nonnegativity constraint
and
on
the existence
and
unique­
ness
of
solutions, introducing equilibrium constants, discussing reactions in
electrochemical cells, and describing the ways by which
the
requisite informa­
tion for
the
chernical potential
is
obtained.
3.1
THERMODYNAMIC
POTENTIAL
FUNCTIONS
AND
CRITERIA
FOR
EQUILIBRIUM
The
second
law of thermodynamics provides severa1 potentia1 functions
governing
the
direction of natural
or
spontaneous processes.
The
particular
potential
function appropriate
to
a given situation is governed by
the
choice of
thermodynamic
variables, which are regarded as independent variables. Speci­
fication
of
the
values
of
these variables defines the
state
of
the system.
Thus
these functions are referred to as
state
functions, which implies
that
any
change
40
Thern1Od~'namic

Potential Functions anti Críteria for Equilibrium
in the function between two states
of
the system is independent of the
"path"
of
the change.
Among the most important potential functions are the entropy function, lhe
Helrnholtz function, and the Gibbs function.
For
each such functiol1, there is a
statement
of
the secol1d law
of
thermodynamics
that
includes both the criterion
for a natural process to occur
and
for its
ultimate
equilibrium state; the
statement must also incorporate any relevant constraints.
Thus, for the entropy function
S,
the
statement
is
dS
ad
~

O,
(3.1-1)
where subscript ad refers to an adiabatic system; for the Helrnholtz function
A,
dAT,V':;;;
O;
(3.1-2)
and for the Gibbs function
G,
dG
T
, P
~

O.
(3.1-3)
In
each case the symbol
d
refers
to
an infinitesimal change, and the inequality
refers to
a
spontaneous process and the equality
to
equilibrium; for relation
3.1-2,
there is no work interaction of any
kind
between the system
and
its
environment, and for re1ation
3.1·-3,
there is
no
work involved other
than
that
related
to
volume change
(PV
work).
At
equilibrium, depending
on
the
appropriate constraint(s), cntropy is at a (local) maximum, the Helrnholtz
function
is
at a minimum, and the
Gibbs
function
is
at
a IlÚnimum.
Of
these three potentiál functions, the most important, because of the
constraints, temperature and pressure, is the
Gibbs
function. The development
in
this book
is
based almost entirely on this function, but the results
can
be
recast into equivalent forms when appropriate
to
a particular situatioil.
The
Helmholtz function and the
Gibbs
function are both sometimes
re­
ferred to as
free-energy functions_
The Helmholtz function
is
also sometimes
referred to as the
work
function and the
Gibbs
function as the
free-enthalpy
function. We do not use these last terms,
but
because of common usage,
we
frequently refer to the
Gibbs
function as free energy.
In
fact,
both
A
and
G,
as well as
other
potential
functions, have interpreta­
tions as work quantities:
dA
T
,:;;;
-ôw,
dAT,v':;;;
-ôw',
dG
T
,
P':;;;
-ôw',
(3.1-4)
where
w
is
work
of
any kind,
w'
is
work
other
than
work of volume change,
and
th.e
symbo!
ô denotes a
path-dependent
quantity.
In each case, the

43
42
Chemical Thermodynamics and Equilibrium Conditions
inequality refers to a thermodynamically irreversible change
in
state
and
the
equality (the maximum work obtainable) refers to a reversible change. We have
occasion to
use
relation
3.1-4
in the case
of
an
electrochemical cell in Section
3.11. 3.2 THERMODYNAMIC
DESCRIPTION
OF
A CHEMICAL
SYSTEM
A homogeneous (single-phase) chemical system, open or closed,
is
defined
thermodynamically by ooe of the following natural sets of state function
and
independent variables:
u
=
U(S,
V,
n),
(3.2-1)
H
=
H(S,
P,
n), (3.2-2)
A
=
A(T,
V,
n), (3.2-3)
or
G
=
G(T,
P,n),
(3.2-4)
where
U
is
internaI energy
and
H
is
enthalpy. Equation
"3.2-4,
for example,
states that
G
is
a (single-valued) function of
T,
P,
and the
(N)
mole numbers
n. Each
oi
these state functions
is
also homogeneous (in the mathematical
sense;
cf.
physicochemical sense discussed previously) of degree
1
in each mole
number
n,.
Each of these equations gives rise to a corresponding equation for
lhe (complete) differential
of
the function involved:
N
dU
=
TdS
-
PdV
+
2:
l1i
dn"
(3.2-5)
i=J
N
dH
=
TdS
+
VdP
+
2:
l1,dn"
(3.2-6)
i=J
N
dA
= -
S
dT
-
P
dV
+
2:
11,
dn
i'
(3.2-7)
i=J
and
N
dG = -
S
dT
+
V
dP
+
2:
11,
dn"
(3.2-8)
i=J
Thermodynamic Description
of
a Chemical System
where the chemical potential for the species
i,
J-L"
is
defined by any of
(
au)'
('
aH)
J-Li
=
a;;
=
a;;­
i
S,V."}",,
I
S.P.Il;""
_(aA)
=(aG)'.
(3.2-9)
-
an,
T.
V'''}''''i
an
i
T.
P.II}""i
Becauseof the homogeneity property
of
these functions,
J-L,
dependsonly
on
the intensive state
of
lhe system, such as defined by
T,
P,
and
composition.
Since the most important
of
these fom functions
is
the Gibbs function
G,
we
continue to use this function exclusively, wÍth the understanding that
corresponding descriptions can
be
written in terms of
U,
H,
or
A
as
required.
Frorn
equation
3.2-8
and the definition of
G,
the temperature aod pressure
derivatives for
G
and
Mi'
in their most useful forms, are as follows:
O(G/Tl]
-H
[
(3.2-10)
aT
P,n
T
2
'
(
3G)
=
ap
T,n
V',
(3.2-11)
r
a(fljT)
1
l
aT
P.n
-h
~,

T
2
'
(3.2-12)
and
IL
( a
,)
=
Vi'
(3.2-13)
ap
T.n
where the subséript
fi
means tha1 alI mole numbers are constant and
.h,
and
c,
are the partiaI molar enthalpy
and
partia] molar volume, respectively. of
species
i
in
the system:
(3.2-14)
h,
= (
~:,
)
r
",

.'
p
av)
I
(3.2-15)
v,
=
(ãn
i
T,P,")'",'
The additivity equation for the total Gibbs function
of
the system
is
obtained by integration
of
equation 3.2-8 at fixed
T,
P,
and
composition:
.AI
G(T,
P,
n)
=
2:
n/[Li'
(3.2-16)
i·=
I

45
㐴Ġ
OIemical Tltennod}'namics and Equilibrium Conditiot"ls
Differentiation
of
this
equation
and
comparison
of
the result with equation
3.2-8 leads
to
the
Gibbs-Duhem
equation for the (homogeneous) system:
N
S
dT
-V dP
+
2:
n
i
d
p,
i
=
O.
(3.2-17)
i=1
This result
can
also
be
obtained
by appLying Euler's
theorem
to
the Gibbs
function as a homogeneous function
of
degree 1 in the
mole
numbers.
TlIe equations
to
this
point
may
be
applied to a homogeneous system
or
to
each
phase
in a heterogeneous system.
For
a closed, heterogeneous (multi­
phase) system, we
note
that, as a consequence
of
the
definition
of
a chemical
spccies in Section 2.2.2, the chemical potential
and
partial
molar
quantities
of
a
species in a given
phase
are
determined by
the
variables
that
define the state
of
that
phase
only,
and
the
implications for the equations
in
this section for G,
J1.i'
and
so
on
are
then
as
fo11ows:
Equations
3.2-4,3.2-8,3.2-10,3.2-11,
and
3.2-16
apply
to
the
system as a
whole
or
to
each
phase, provided
that
the extensive quantities
G,
H,
S,
and
V relate to the whole system
or
to
the phase
under
consideration.

Equations
3.2-9,3.2-12,3.2-13,3.2-14,
and
3.2-15
apply
to each species
(and
hence
to
a particular phase).

In
particular.equation
3.2-17 applies to each phase;
that
is, there
i5
a
Gibbs-Duhem
equation
for each phase.
3.3
TWO
FORl\1lJLATIONS
OF
THE
EQUILIBRIUM
CONDITIONS
For
either
a
single-phase
or
multíphase system to be
at
equilibrium,
G
is at a
(global) minimum subject to the closed-system constraint
and
the nonnegativ­
ity
constraint
at
the given thermodynamic conditions (fixed
T
and
P).
This is
essentially lhe
statement
of
relation 3.1-3.
Bere
and
in Sections 3.4 to 3.7 we
assume
that
n
j
>
O
(mathematically this means that the nonnegativity con­
strainls
are"
non-binding");
that
is,
we
ignore
th~
possibility in the nonnegativ­
üy
constraint
that
n
I
=
O
and
return to the implications
of
this
latter
possibility
in Section 3.8.
At
equilibrium.
we
thus deal with
摇听瀽伮Ġ
(3.3-1 )
although 1his by itself is a necessary
but
not
a sufficient condition.
Our
problem is essentially to express
G
as a function
of
the
n
i
and
to
seek
those vaiues
of
the
n
i
that
make
G
a minimum subject to the constraints. We
assume that we
are
given values for the element-abundance vector b, tempera­
tUfe
T, pressure P,
and
the appropriatc "free-energy"
data.
The
Stoichiometric Formulation
We
describe two formulations
of
the
minimization
problem
(cf.
Smith,
1980a), referred to here as:
lhe stoichiometric formulation, in which the closed-system constraint
i5
treated by
means
of
stoichiometric
equations
so as to result in an
essentially
unconstrained
minimization
problem.
and
㈁ the nonstoichiometric formulation, in which stoichiometric equations are
not used but, instead, the closed-system
constraint
is treated by means
of
Lagrange multipliers. These two formulations are described in
turn
in
Sections 3.4
and
3.5,
following which their equivalence is shown,
3.4
THE
STOICHIOMETRIC
FORMULATION
From
Chapter 2 the mole numbers
n
are
related
to
the
extents of reaction
~

of
the
R
stoichiometric equations, which are the
independent
variables, by
R
~.vt
n
--- n
0+
LJ
樧椾樢Ġ
(2.3-1)
j=1
Hence
we
may write
(cf.
equation 3.2-4)
G
=;
G(T,
P,
~),

(3.4·1 )
and
the problem is
one
of
minimizing
G,
for fixed
T
and
P,
in
terms
oi
the
R
~/s.

Since these last
are
independent quantities.
the
first-oràer neccssary
conditions for a
minimum
in
G
are (
3G)
=
O.
(3.4-2
)

ag
I
T.
P
or
3G ) =
O;
j
=
1.
2
....
,R.
(3.4-3)
(
3~j

T.P'~b.j

There
are
R
=
N -
C equations in the set 3.4-3, Since
~

('
aG
')
(
on
i
)
j =
1,2,
...
.
R.
(
;~
t.
P.
''''
;:-
3n;
T.
P,
nk""".
a~j

~,,~;

(3.4-4
!

47
46
ChemicaJ Thermodynamics and Eqnilibrium Conditions
(
3G)
=
J.ti'
(3.2-9)
an
i
T.
P.
"k..-i
ani
)
=
P
,
(2.3-6)
(
ij
a~j

f.k#i
then,
on
combiningequations 3.4-3, 3.2-9,
and
2.3-6,
we have
丁 L
JJijJ.ti
=
o;
j
=
1,2,
...
,R.
⠳⸴ⴵ⤁
i=1
The
quantity
on
the left side
of
this equation is denoted by
D.G
j
,
and
its
negative has been called
lhe affinity
by
De
Donder
(1936, Chapter
4).
Equa­
tions
3.4-5 are
R
conditions for equilibrium in the system and are readily
recognized as the "dassical"
forms
of
the equilibrium conditions (Denbigh,
1981, p.
173).
When appropriate expressions for
the
J.ti
are introduced into the
equations
in terms of free-energy
data
and
the mole nuínbers, the solution
of
these equations provides the composition
of
the system
at
equilibrium.
Example 3.1 For the system described in Example 2.2, for which
R
=
2,
the
equations
3.4-5
corresponding
to
the two stoichiometric equations
-102-NO+N02=O
and
-iNH
J
-
i02
+
iNO
+
H
2
0
=
O
are -
~JLOl

-
~NO

+
/LN0
1
=
O
and
-1f1.NH, -
~f1.02

+
jf1.NO
+
f1.H
1
0
=--=
O,
respectively.
3.5
THE
NONSTOICHIOMETRIC
FORMULATION
The
problem
is
formulated as
one
of
minimizing
G.
for fixed
T
and
p.
in terms
of
the
N
mole numbers, subject to the
M
element-abundance constraints.
That
is, frem
equation
3.2-16.
!'oi
min
G(n)
=
2:
n,f1.j'
(3.5-1)
;=1
subject
to
li! 2:
Qkini
=
b
k
;
k
=
1.2,
...
,1\1.
(2.2-1)
i=l
\Ve
:issume,
for convenience.
that
M
=
rank
(A)
=
C.
Tbe Nonstoichiometric Formulation
This is a simple forro
of
constrained optimization problem (\Valsh,
1975,
p.
7).
One
approach
is
to use the
method
of
Lagrange multipliers to remove the
constraints.
For
this,
we
first write the Lagrangian
e:
N M
IN)
t(n,
À)
=
i~1

niJ.ti
+
k~1

À
k
b
k
--
i~l
a
ki
J1
i,
(3.5-2)
where
À
is a vector
of
M
unknown Lagrange multipliers,
À
=

I'
À
2'
...

M
(.
Then
the necessary conditions provide the
fol1owing
set of
(N
+
M)
equations
in the
(N
+M)
unknowns
(n
I'
n
2'
..•
,
n
N'
À
I'
À
2'
...

M
):
(
ar)
M
an
11.
=
J.ti -
L
akiÀ
k
=
o,
(n
i
>
O)
(3.5-3)
i
17'"
À
k=
1
and
(
ae
)
N


=
b
k -
~

akin
i
=
O.
(3.5-4)
k
n,
f\i#~

;=
1
As in the stoichiometric formulation, the solution of these equations involves
the introduction
of
an appropriate expression for
f1.i'
Example 3.2 Write the set
of
equations
3.5-3
and
3.5-4
for the system
described in Example
2.2.
So[ution
The
system, as represented in Example 2.2, is
{(NH
3
,
02'
NO,
NO:!, H
2
0),
(N,
H,O)}.
Here
N
=
5
and
M
=
3.
There are five equations
3.5-3:
J.tNH,
-
À
N
-

H
=
O,
J.t0
-

o
=
0,
2
J.tNO -
À
N
-
À
o
=
O,
f1.N0
-
À
N
-

o
=
O,
2
J.tH
0 -

H -
À
o
=
O,
2
The three equations
3.5-4
are
-
-
-
n
=
O,
b
N
n
NH3
n
NO
N01
b
H
-
-
2n
=
O,
3n
NH3
H20
and
b
o -
2n
-
-
2n
--
n
=
O.
02
n
NO
NOz
H20

48
Chemical Thermodynamics and EquilibriuUI Condítions
The
Chtmical 偯瑥湴楡氁
49
㌮㘁 EQUIVALENCE
OF
THE
TWO
FORMULA
TIONS
The equivalence
of
the stoichiometric and nonstoichiometric formulations can
be shown as follows. FIOm equation 3.5-3, for the nonstoichiometric formula­
tion,
we
bave
M
倮椁
=
~

QkiÀk;
j
=
1,2,
...
,N.
(3.6-1)
k==1
Hence, for the quantity on the left
si
de of equation 3.4-5, the stoichiometric
formulation, it follows
that
N N
(M
)
.~

Pijf.Li
=
.2:
vi}
2:
QkiÀk
1=1 1=1
k=l
N
/11
2:
2:
ÀkQkiPjj
i=1
k=1
114
N
=
~

À
k
~

QkiPi;
k=1
i=1
.
=0
(which is the stoichiometric formulation) since
N ~

aki~'ij

=
伮Ġ
(2.3-3)
i'-=I
㌮㜁
THE
CHEMICAL
POTENTIAL
3.7.1 Expressions for the Chemical Potential The structure of chemical thermodynamics,
as
exemplified by the equations in
this chapter to this point, is general and independent
of
the functional form
of
the chemical potential
#li'
Although the structure contains derivatives that
show
how
tJ.i
depends on temperature and pressure (equations
3.2-12
and
3.2-13), thermodynamics itself provides no comparable expressions for lhe
dependence of
#li
on
composition. We must then superimpose on
the
thermo­
dynamic structure, particularly in equations 3.4-5 and 3.5-3, the equilibrium
conditions, specific expressions for
#l
i
to introduce composition explicitly into
these equilibrium conditions. A guideline for this is that the expression for
/Li
must satisfy the Gibbs-Duhem equation (equation 3.2-17).
We consider expressions for the chemical potentíal
of
a
pUfe
species first
before turning attention to species in solution,
in
which latter case, composi­
tion must be taken into account in addition to
T
and
P.
3.7.1.1 Pure Species FIOm equation 3.2-13 written for
apure
species, we
obtain
(
aP.)
=
v,
(3.7-1)
<JP
T
where
v
is molar volume. Integratiol1 of this at fixed
T
fram a reference
o
pressure
p
to
P
results in
p.(T,
P)
-
p.(T,
PC)
=
I
P
v
dP.
(3.7-2)
p
o
We apply this to three particular cases: ideal gas; nonideal gas; and liquid or
solid.
3.7.1.1.1 Ideal Gas
Introduction into equation
3.7-2
of the equation
of
state
Pv=
RT
(3.7-3)
and
a reference
or
standard-state pressure
(P
O
)
of
unity results in
p.(T,
P)
=
p.°(T)
+
RTln
P,
(3.7-4)
o
where
P
must be in the same unit
of
pressure as
p
.
Thus if
p
o
is cnosen
to
be
1
atm,
P
must
be
expressed in atmospheres.
We
retain this choice
in
accor­
dance
with
usual practíce, particularly in relation to free-energy data (Denbigh,
1981,
p.
xxi).
In
equation
3.7-4
p.°(T)
is
called the standard chemical potential
that
is
a
function
of
T
onIy.
3.7.1.1.2 Nonideal
Gas
Equation
3.7-2
may be written, on addition
and
subtraction of
RTln(
P/
PC),
as
p.(T,
p)
=
#l(T,
Pc) -
RTln
p
o
+
RTln
P
+
f;(
v -
R:)
dP.
(3.7-5)
On
leuing
p
o
~

O
and
using equation 3.7-4, since in this limit
fl(T,
PC)

50 Chemical Thermodynamics
and
Equilibrium Conditions The Chemical Potential
SI
approaches its ideal value,
we
have
JL(T,
p)
=
p.°(T)
+
RTln
P+
~P(
v -
RJ)
dP.
(3.7-6)
For
convenience, it
is
customary to use the last two terms
on
the right
of
equation
3.7-6 to define the fugacity
f
by means of
RTln
f=
RTln
P
+
~P(
v -
RJ)
dP.
(3.7-7)
It
fol1ows from this definition that
1m
f
I
I
·
-=
(3.7-8)
P-O
P
3.7.1.1.3 Liquid or Solid For
apure
liquid or solid, it
is
convenient to take p
o
to
be
the vapor pressure
p*,
to
take advantage of the equilibrium condition for liquid-vapor or solid­
vapor
equilibrium-equation
3.4-5,
in conjunction with equation 3.7-6. Thus
from
the latter, the chemical potential
of
the liquid
ar
solid at
(T,
p*),
which
is
equal
to
that
of
the vapor at
(T,
p*),
is
f.!(T,
p*)
=
p.°(T)
+
RTln
p*
+
l
o
P*(
v
g
-
pRT)
dP.
(3.7-9)
where
v
g
is
the molar volume
of
the vapor. On combining this \vith eCjuation
3.7-2, we
have
)1(T,P)=1J.°(T)+RTlnp*
+
f
o
P"'(
v
g
-
RT)
dP+
fP
p",vdP,
P
(3.7-10)
where
v
is
the
molar volume
of
the liquid or solid.
The
two integraIs on the
right
of
equation
3.7-10
are usually relatively small in value,
and
hence, for a
pure
liquid
or
solid,
we
obtain p.(T,
P)
~

f.L°(T)
+
RTln
p*.
(3.7-lOa)
Analogous to equation 3.7-7 for the fugacity
of
a gas, the fugacity of a
liquid
OI
solid is given by
RTln-=
f
lP*{
v
--
RT)
dP+
jP(
v--
RT)
dP.
(3.7-11)
P
o
g
P
*
P
p
J.7.1.2 Species
in
Solution
3.7.1.2.1 Ideal-Gas Solution The form of equation 3.7-4 for the chemical potential of a pure, ideal gas
suggests the form for a species in
an
ideal-gas solution (i.e., a
solutionof
ideal
gases):
pAT,
P,
Xi)
=
f.!~(T)

+
RTln
p;,
(3.7-12)
in which pressure
P
is
replaced by the partial pressure
Pi'
where,
by
definition,
Pi=
(ni)p:=x.P
n
I ,
(3.7-13)
t
Xi
is the mole fraction of species
i,
and
n
t
is
the total number of moles in the
solution.
A
justification for this form is that application of equation 3.2-13
to
equation 3.7-12 leads to the equation
of
state for an ideal-gas soIution:
(~~)

=
RJ
=
Vi'
(3.7-14a)
r.n
Hence
_
RT
RT
v=
2,n
iv
i
=
p
~ni

=
n
tp
(3.7-14b)
This can be most easily seen if equation 3.7-12
is
written as
Jli(T,
P,
x,)
=
/Lf(T)
+
RTln
P
+
RTln
Xi'
(3.7-12a)
3.7.1.2.2 Ideal So/uJion Equation 3.7-12a may be used as the basis for a less restricted type
of
system
-an
ideal solution, which may be gaseous (but not necessarily
an
ideal-gas
solution), liquid, or solid. This is accomplished
in
part by replacing the first
two terms on the right by an arbitrary function of
T,
P,
and a standard
compositional state
xi,
f.L;(T,
P,
x1),
so
that
IJ.i(T,
P,
xJ
=
f.Li(T,
P,
xj)
+
RTln
Xi'
(3.7-15)
The definition
of
an ideal solution in terms
of
f.L
i
is completed by specification
of
the
standard state, which then serves to define
/L/T,
P,
xn.
With respect to
xi,
there are two common choices
or
conventions,each convention leading to a

53
52
Cbemical Thermodynamics and Equilibrium
Conditions
particular type
of
ideality:
1
The
Raoult Convention
In this case
xi
-+
1;
that is, the
standard
state
is pure species
i
at
(T,
P)
of
the system and in the same physieal state.
Henee
/Lj(T,
P,
xi)
=
lim
(JLj
-
RTln
xJ,
(3.7-16)
xi-l
and equation 3.7-15 is normally written without reference to
xi
as
IJ.i(T,
P,
x,)
=
#L7(T,
P)
+
RTlnx
j

(3.7-15a)
Ajustification for equation 3.7-15a as a model for a species in an ideal solution
is
that it can be used to derive the charaeteristics, including additivity
of
pure-species enthalpies and Raoult's law,
Df
this type
of
ideal solution.
The
quantity
JLrcT,
P)
is the standard chemical potential
of
speeies
i
lhat
is
a
function
of
bolh
T
and
P.
From
equation 3.7-16,
117
is
the ehemical potential
of
pure speeies
i
at
(T,
P)
of
lhe system in the same physical slate. We
note
that
an ideal solution based on the Raoult convention is equivalent to
the
type
of
ideality to whieh the Lewis-Randall fugacity mIe applies (Prausnitz, 1969,
pp.90-92).
2
The
Henry Conventíon
In {his case
x7
->
O;
that
is,
the
standard
state
is
lhe
infinitely dilute solutioo of spccies
i
at
(1',
P)
of
the system. Hence
1-Li(T,
P,
xi)
==
fi;
:::::
lim
(/Li
-
RTln
X;).
(3.7-17)
Xi-
Ü
Since
11-7
in equation 3.7-17
is
different from
1J.i
in equation 3.7-15a, we
denote
it
henceforth
by
JL':t,.
and
write equation 3.7-15 as
{Li(T,
P;x
i
)
=
fJ.'jfi(T,
P)
+
RTlnx
j

(3.7-15b)
The
Raoult convention is eommonly used for
alI
species in
a
solution
in
situations in which
no
distinction
is
made between solute(s)
and
solvent(s).
When this distinction
is
appropriate, the Henry eonvention is commonly used
for the saIute speeies
and
the Raoult convention for the solvent species.
The composition variable used in equation
3.7-15
need not
be
the mole
fraction.
For
the Henry convention applied to a solid solute speeies
i
dissolved
in a liquid solvent, the molality
m,.
is commonly used, where
fl
i
(3.7-18)
m
·=
1000Mn
'
ISS
n
i
is
the number
of
moles
of
solute
i
dissolved in
n
s
moles
of
solvent,
and
Ms
is
the molecular weight
of
the solvent. In this ease
we
write equation 3.7-15b
as
f.L,.(T,
P,
m,.)
=
f.1.~,(T,

P)
+
RTln
m
j
(3.7-19)
The
Chemical Potential
and
interpret
JL~i

(numerical1y different from
p../fJ
by
the analog
ofequation
3.7-17:
/L~i
=
lim
(/Li
-
RTln
m
j
).
(3.7-20)
mi-O
From
equations 3.7-15b, 3.7-18, and 3.7-19, Ilfti
and
f.L:li
are re1ated by
JLftj
=
I-t~i

+
RTln
m
s
'
(3.7-21)
where
m
s
is the molality
of
the solvent,
1000/
Ms"
Another composition variable that is sometimes used in connection with the
Henry convention
is
the molarity
C
i
,
defined
by
C
n
j
j
=
V'
(3.7-22)
the number
of
moles
of
speeies
i
per
unit volume (conventionally in liters)
oi
the system
at
(T,
P).
The
disadvantage
of
this variable, in comparison with
Xi
and
m
i
,
is
that
it
is inherently a funetion, albeit usually a
weak
function,
of
T
and
P.
Equations 3.7-19 and 3.7-20 may be rewritten in terms
of
C
j
,
with
l1-êr
replaeing
JL~i'

and equation 3.7-21 becomes
P,'jfi
=
/Lê,.
+
RTln
çç,
(3.7-23)
where
C
s
is
the molarity
of
the solvent,
n
si
V.
\Vhen the solute is
an
electrolyte (e.g., a salt dissolved in water),
equation
3.7-19 canoot be used for
an
individual ionie species since the limitiog process
of
equatioo 3.7-20
is
not
operationally possible, because it would violate
electrieal-charge neutrality. The eation and anion
of
an
eleetrolyte must
be
combined to represent
the.
electrolyte as. a whoie.
For
this purpose,
the
mean-ion molaJity
of
species
i
is
defined 'by
m~...,,.

=
m:+m"--,
(3.7-24)
where
v
=
v+
+v
(3.7-25)
Here
v
+
and
v_
are the subscripts to the cation and aníon, respective1y, in
the
molecular formula
of
theelectrolyte. Then equation 3.7-19 becomes poi(T,
P,
mJ
=
fJ.~i
+
RTln
m~i'

(3.7-26)
Example
3.3
Calculate the mean-ion molahty

A1iS04)3
in
a solution
made
up
by
dissolving 0.1 g mole of the salt in 200 g
of
water.

Chemical Thermodynamics and Equiübrium Conditions
54
Solution
1'=1'++1'_=2+3=5
If
we
assume
that
AI
2
(S04)3
is a
"strong"
electrolyte (i.e., completely ionized),
then
m+
=
p+m
=
1.0
and
m_
=
p_m
=
1.5,
and,
from equation 3.7-24,
m~

=
m~
m:
=
(1.0)\1.5)3
=
3.37.
m:!:
=
3.37
1/5
=
1.27'5.
3.7.1.2.3 Nonideal Solution The
most general form of expression required for the chemical potential is that
for a species in a nonideal solution, whether gaseous, liquid, or solid. To
remove the restriction of
an
ideal solution,
we
replace the composition variable
in equation
3.7-15a
by the activity
ai
of
species
i,
and
to complete the
definition
of
activity,
we
specify the standard state.
As
for
an
ideal solution,
there are two ·common ways of doing the latter; thus
JLzfT,
P,x)
=
IJ-7(T,
p)
+
RTlnai(T,
P,x),
(3.7-27)
together with, for the Raoult convention, in terros
of
mole fractíon,
tiro
ai
=
1:
(3.7-27a)
x
-+ I
Xi
..
i
and
for
the
Henry convention,
lim
ai
=
1.
(3.7-27b)
x;-+Q
X
j
An
alternative to the use of activity is the use of the activity coefficient
Yi
of
species
i,
where
a
i
=
Yjx
i
,
(3.7-28)
The
Cbemical Potcntial
S5
and
Xi
may be re.placed by molality
or
molarity (with conse.quent changes for
the numericai values of both
ai
and
l'i)'
In
this case equations 3.7-27, 3.7-27a,
and
3.7-27b become, respectively,
IJ-j(T,
p,x)
=
p.j(T,
p)
+
RTln-·({(T,
P,x)x
j,
(3.7-29)
and
lim
Yi
=
1
(Raoult
convention) (3.7-29a)
Xj-+ I
or
lim
ri
=
1
(Henry
convention). (3.7-29b)
x;-+O
For
an electrolyte species in a nonideal solution, the modification of the
general forms, fol1owing equatioll 3.7-26 for an ideal solution, involves the
introduction
of
the
mean..;ion
activity
or
mean-ion activity coefficient, each
defined in a manner analogous to the mean-ion molality in equation 3.7-24. In
terms of the mean-ion activity coefficient
y:!:
,
equation 3.7-26 becomes
IJ-i(T,
P,m)
=
J1.:ni(T,
p)
+
RTln(y:!:m~);',

(3
.7~30)

together with
lim
y
...-j
= L
(3.7-30a)
nl;-O
­
As
an
altemative to the approach
just
described, for species
in a
nonideal
solulion, the chemical potential
maybe
expressed
in
terms
of
the
fugacity by
using
a
relalion equivalent to equations 3.7-6 and 3.7-7 for
apure
species:
p)T,
P,
x)
=
IJ-f(T)
+
RTln
J;,
(3.7-31)
where the fugacity
J;
is defined by (Prausnitz,
1969,
p.
30):
RTlnct>i
=
RTln
_:P
=
~P(

Vi
-
RJ)
dP,
(3.7-32)
where
</Ji
is the fugacity coefficient of species
i,
defined by
J;
(3.7-33)
9i=
xip·

57
56
Chemical Thermodynamics and Equilibrium ConditIDns
3.7.2 Assigning Numerical Values to the Chemical Potential
Expressions for the chemical potential,
and
in particular for the chemícal
potential
of
a specíes in a nonideal solution, involve two types of quantity
to
which numerical values must be assigned: (1) the standard chemical potential (p.0
Of
p.*)
and
(2)
the composition and composition-related quantities, such as
activity or activity coefficient and fugacíty
or
fugacity coefficient.
For
the first,
we
discuss ways
in
which numerical information is available in Section
3_12,
in
connection also with the standard free energy
of
reaction introduced in Section
3.10.
For the second, there is a vast literature, and we only point
out
here some
general features, inc1uding those re1ated to the temperature and pressure
dependence of
p.;
given
in
equations
3.2-12
and
3.2-13,
whích involve partial
molar quantities. We discuss this in more detail in Chapter
7.
The types
of
information required can
be
listed as follows:
1
Volumetric (PvTx) lnformation
This inc1udes information contained in
an equation of state, compressibility-factor charts, and tables of densities. This
is
needed for the determination of fugacity
or
fugacity coefficient, partial
molar volume, and the pressure dependence
of
the chemical potential, activity
coefficient, fugacity, and so on. The partial molar volume
is
involved in most
of
these determinations.
If
the molar volume
v
of a solution
is
known as a
function of composítion
at
fixed
(T,
P),
the partial molar volume
of
species
i
in lhe solution
Vi
can.
be
determined from
v
by the re1ation
(cf.
Smith
and
Van Ness,
1975,
p.
604)
(3.7-34)
i).
=
v -
2:
X
j
(
;;j)
TP,x
••
,
I
joFl
2
Enthalpy lnfonnatiQn
This inc1udes
data
regarding heat capacltles,
enthalpies
of
solution
and
rnixing, and enthalpies of formation. This is needed
for deterrnination
of
the temperature dependence of the chemical potential,
activity coefficient, and so on. The partial molar enthalpy of species
i
in
a
solution
fi
i
can
be
determined from molar enthalpy by means of a relation
analogous to equation 3.7-34.
3
A ctivity Coefficient Information
This includes information given
by
correlations of experimental data obtained, such as fram phase equilibria for
nonelectrolytes
and
from emf determinations for electrolytes. For the formeI'
in
particular, many empirical and serniempirical relations, such as the Margules,
vanLaar,andWilsonequations, havebeenproposed(Prausnitz,1969,Chapter6).
4 Excess Thermodynamic Function lnformation
This inc1udes
data
con­
cerning excess enthalpies
and
volumes (Missen, 1969). Much of
lhe
informa­
tion required is given in terms of excess functions. An excess function is the
difference between the function for a nonideai solution and the sarne function
Implications
of
the Nonnegativity ConstTaint
for an ideal solution based on a specified convention, whether the Raoult
or
the Henry convention. Thus the excess molar volume of a solution
VE
is
defined by
VE
=
V -
Vid,
(3.7-35)
where
Vid
is the molar volume of
an
ideal solution
at
the same
T,
P,
and
x.
Expressions involving excess thermodynamic functions are compkte1y analo­
gous to lhose involving the corresponding thermodynarnic functions, except for
a few cases of intensive quantities (Missen, 1969).
For
example,
theexcess
partial molar volume
of
species
i
in a solution
v;
may be related
to
VE
by
an
equation analogous to equation
3.7-34:
avE)
õ
E
=
VE
-
"x.
-
(3.7-36)
~

(
ax
I
J
j*i
j
T,P.Xk.,oj
Finally, we point
out
that, for numerical work,
we
frequently use the nondi­
mensional form
of
the chernical potential
IlJ
RT.
The equations in Section
3.7.1
could
alI
be rewritten correspondingly in nondimensional
formo
3.8 IMPLICATIONS
OF
THE
NONNEGATIVI1Y CON8TRAINT
To
this point
we
have assumed that the equilibrium conditions discussed in
Sections
3.4
and
3.5
have a solution
t.hat
satisfies
n;
>
O
for
aU
species. This
need not be the case, however, and in this section
we
show how the equilibrium
conditions must
be
modified to account for the possibility of
n
i
=
O.
We then
show that tbis leads to the necessity to develop criteria to test for the presence
OI'
absence of an entire phase
at
equilibrium.
Ir
n
i
=
O,
either
n(
=
O
OI'
n(
*
O.
In general, for a nonideal solution. fram
equation
3.7-29,
at
fixed
(T,
P)
we
have

/Li
=
117
+
RTln
Yi(X)
+
RTln
---!..,
(3.7-29)
n
1
and, from the definition
of
Ili'
(
âG
)
=
JLi'
(3.2-9)
an
i
T,P,nj'F'i
We assume that
ri
is finite for
a11
possible mole fI'actions (for an
ideal
solution,
this is true, since
ri
=
I). Then, if
n
i
=
o
and
n
l
*
O,
P.i
~

-
00.
Froro equation
3.2-9,
it follows
that
G may
be
lowered
by adding
an
infinitesimal
amount
of
species
i,
and
hence
at
equílibrium the case
n
i
=
O
and
n(
=1=
Ois not possibie.
This,
in
tum, implies
that
the only possibility is
n
i
=
O
and
n(
=
O
at
equi­
librium. In other words,
n
i
is zero
if,
and only if,
ali
species in that phase aIso

59
58
Chemical Thennodynamics
anel
Equilibrium Conditions
have zero mole numbers (i.e.,
the
entire
phase is absent) (cf. Denbigh,
1981,
pp.
ltiO-161
).
We
have thus shown that,
to
consider
the
possibility
n
i
=
O
at
equilibrium,
we
simply foeus
on
establishing whether
n
t
=
O.
We examine
the
three possibil­
ities for a phase:
(I)
single species; (2) ideal solution;
and
(3)
nonideal
solution. We then show how the equilibrium conditions, with equations
3.5-3
for
the
nonstoichiometric formulation
and
3.4-5
for the stoichiometric formula­
tion, must
be
modified.
3.8.1 Single-Species
Phase
For
a single-species phase, it is relatively easy
to
modify lhe conditions since
]lj
=
jLi(T,
P)
and
is
independent
of
composition. The Kuhn-Tucker condi­
tions are used (Walsh,
1975,
pp.
35-39),
which are analogous
to
the
Lagrange
multiplier conditions when inequality constraints are present.
For
the
species
in
the
single-species phase
under
consideration, equation
3.5-3
in the non­
stoichiometrie formulation is replaced
by
the pair of conditions
(
ae
)
M
~

=
#Li
--
~

akiÃ-k
=
O,
(n
i
>
O)
(3.8-la)
I
nJ'f""À
k=
I
and
(
ae
)
M
an
=
#Li
-
2:
0kiÃ-k
>
0,
(n
j
=
O).
(3.8-1b)
i
n,
..

k=
I
In
the stoiehiometric formulation, instead
of
equation
3.4-5,
we havc the
pair
of
conditions, sternmíng from the stoichiometric matrix in canonieal form
(Section
2.3.3)
for the
noncomponent
species
aG
aG
M
a;-
=v
s)
=
(.L7
+
2:
vkjJJ.k
=
O,
(n
i
>
O)
(3.8-2a)
I
k=1
and
aG
aG
M
an
=ay
=
(.L7
+
2:
lJ
kj
J1.k
>
O,
(n
i
=
O)
(3.8-2b)
i
)
k=
I
where
i = j
+
M.
Relations
3.8-1
b
and
3.8-2b
both
essentially state lhat, if the free energy
of
the
system were to be increased
by
the
formation of species
i,
the
formation
would not take place.
Implications
of
the
Nonnegativi~'
Constraiut
3.8.2. Ideal Solution For
a solution, we
cannot
proceed completely as for a single-species
phase
because
ôG
/an
i
is
not
strictly defined when
n
i
=
O.
However, we again
suppose that the (rest
of
the) system
is
at equilibrium
and
that the phase
under
'Consideration
is
absent
(n
i
=
O
for alI species
in
that
phase) and consider
whether
a
small
amount
of
it
could be formed.
In
the nonstoichiometric
formulation for each species in a small arnount
of
the phase, from
equation
3.6-1,
M
J1.i
=
J1.'f
+
RTln
Xi
=
2:
akiÀ
k ,
(3.6-1)
k==l
or, equivalently,
['1'(
M
)1
(3.8-3)
Xi
=
exp
t
RT)
-J1.7
+
k~1

akiÃ-k ·
r
If
lx
i <
1,
the phase
i5
absent; if (by coincidence)
~x;
=
I,
the phase is
at
incipient formation; and
if
~Xi>
1, the
phase
is
present in finite amount, and
the
equilibrium calculation must allow for this.
Thus the test
or
criterion for the phase to be absent at equilibrium is
(3.8-4)
~exp[{
ir)(
-~:

+
1
Qk'À
k
)]
<
I,
or,
in
the stoichiometric formulation,
(3.8-5)
~
exp
[(
RIr)
(-
~:

-
J
I
v
'/~,

) ]
<
1
where the summations
are
over
all
species in the phase.
It
is readily shown
that
relations
3.8-4
and
3.8-5
reduce to 3.8-lb
and
3.8-2b,
respectively, in
the
case
of
a single-species phase. Criteria
3.8-4
and
3.8-5
can
be
shown rigorously
to
be
correct by considering the mathematical
dual
of
the
chemical equilibrium
problem (Dembo, 1976). However, we have used an heuristic discussiol1 here.
3.8.3 Nonideal Solution
Proceeding as for the ease
of
an
ideal solution, we obtain the
analog
of
equation
3.8-3:
(3.8-6)
Yi(X)X
i
=
exp
[(
}T)
(
~Iuf

+
~

OkiÀk)]'

k=1

61
",.
~.

60
Otemical Thennodynamics and Equilibrium Conditions
Ir
a solution x
to
these nonlinear equations satisfies
~

Xi
<
1,
the
phase
is
absent;
if
it
satisfies
~
Xi>
1,
the
phase is present
and
must
be
considered
in
the equilibrium calculation.
3.9
EXISTENCE
AND
UNIQUENESS
OF
SOLUTIONS
The conditions for the existence
of
a solution
to
a
problem
in
chemical
equi1ibrium have been reviewed
by
Smith (1980a).
We
assume
that
the
non­
negativity
and
element-abundance constraints are satisfied
by
at
Ieast
one
composition vector o
and
that
a11
b
k
are finite
and
b
k
=1=
O
for
at
Ieast
one
element.
It
is
a1so
necessary
that
the function
G
be
continuous
in
o. This is a
potential problem only
at
n
i
=
O;
by
ensuring
that
X;
In
[Yi(X)XJ
=
O
for all
i
at
Xi
=
0,
we ensure that
G
is continuous
at
X;
=
O.
Then
a soIution to the
equilibrium problem exists. This follows froro a theorem
in
analysis
known
as
lhe
Weierstrass theorem
(Hadley, 1964, p. 53).
In
addition
to
the existence
of
a solution, we are interested
in
the
number
of
soIutions,
that
is, how
many
possible vectors
o
satisfy
both
the element-abun­
dance
constraints
and
the
equilibrium conditions.
This
interest arises because
nonuniqueness may occur
in
severa1 important situations.
It
is typically
connected with incipient formation
of
a phase. A very simple illustration is
provided by the system {(H
2
0(e),
H
2
0(g»,(H,
O)},
with
b
1
=
2
and
b
2
=
1,
at
given
T
and
P.
There
are
three possibilities.
At
the
given
T,
if
P
<
p*,
the
unique solution
is
(n
l
,
n
2
l
=
(O,
Il;
if
P
>
p*~

the
unique solution is
(n
1
,
n
2
)T
=
(l.Ol;
at
P
=
p*,
the solution is
not
unique,
and
any
(n
l
,
n
2
f
satisfying
n
l
+
n
2
=
1
(n;;:';;:'
O)
is
valido
The same type
of
situation
can
occur
in more complicated multiphase situations involving
at
Ieast
one
multispecies
phase.
The
basic reason for
the
possibility
of
nonunique
soIutions lies
in
the
manner
in
which we have posed
the
equilibrium
problem-in
terros
of
(exten­
sive) mole numbers, in
addition
to
the two intensive
parameters
T
and
P. .
For
the
case
of
a system consisting
of
a
single ideaI-solution phase, the
chemical equilibrium problero has a unique solution, a
proof
of
which state­
ment
follows. A sufficient condition for uniqueness is
that
G
be a strictly
convex function
of
o,
subject to. the constraints.
Then
the
Kuhn-Tucker
conditions
are
sufficient as well as necessary.
For
a single phase, convexity thus
depends
on
the quadratic form
2
N N (
a
G )
(3.9-1)
Q(80)
=
i~1

)~I

anidn ôniôn
j,
j
where
a
2
G
/dn
j
dn
j
are
the
entries
of
a matrix called
the
Hessian
matrix
of
G.
Uniqueness is established
if
Q(
80)
>
°
for
a11
allowable compositions o
and
nonvanishing variations
8n.
From
equation 3.7-15a,
the
entries
of
the
Hessian
Existence
and
Uniqueness of Solutions
are
given
by
a
2G (
ôij
1)
---=RT
---
,
(3.9-2)
onidn
j
n
i
n,
where
Ô
jj
is
the
Kronecker delta function. Inserting
equation
3.9-2
into
3.9-1,
we have
Q(ôo)
=
~

ôn; _
~

(
.~

ôn
⤲Ġ
RT
i=1
n, ,
j=1

~

n
(ôn
i _
~j=l13nj)2

i
(3.9-3)
1=1
n
i
n,
Since
n
i
>
O
(which must
be
true, from
our
previous discussion),
Q
is positive
unless
the
quantity
in parentheses
is
zero for each
i.
In
this latter case
ôn
i
'2.j=l
ôn
j
(3.9-4)
n; n
l
Since
n;
>
O
and
on
i
=1=
°
(for
at
least
one
i),
the right side
of
equation 3.9-4 is
nonzero. Multiplying equation 3.9-4
by
akin
i
and summing over
i,
we have
N N
N
(
ôn)
L
ak;on;
=
~

akin
i
}
L
_J
;
k
=
1,2,
...
,C.
(3.9-5)
(
;=1
i=1
)=1
til
Since the lefl side
of
equation 3.9-5 is zero (from
equation
2.2-2)
and
the
second factor on the right side is nonzero, the first factor must be zero (for
a11
k).
However, this factor
1S
b
k
(from
equation
2.2-1)
and
cannot
be
zero for
all
k.
As
a
result,
Q
can only be positive.
For
a single phase
that
is
an
ideal solution,
the
chemical equilibrium
problem
then
has a unique solution (provided
that
existence is established).
For
a single phase that is a
nonideal
solution, we believe
that
the same result
applies,
but
this has not yet
been
proved, as far as we
are
aware.
For
a multiphase ideal system, Hancock
and
Motzkin (1960) have found
that
uniqueness need
not
hold. This nonuniqueness is
of
a degenerate type
since it is readily shown
that
G
is convex for such a system.
We
call this
nonuniqueness
degenerate
in
the sense
that
on1y
the reIative aroount
of
each
phase
is
not
unique, although
the
mole fractions of
the
species
in
each phase
are unique (Shapiro and Shapley, 1965).
When
more
than
one
phase
is possible
for a
llonideal
systero, it has
been
found
that
the
Gibbs
function
may
possess
several local mínima;
that
is,
G
is
not
convex (Othmer, 1976;
Ceram
and
Scriven, 1976; Heidemann, 1978;
Gautam
and
Seider, 1979).

㜴Ġ
Chemical Thermodynamics
and
Equilibrium Conditions
(and
the
Henry
convention), calculate
⡡⤁
the
standard
chemical potential
of
the cadmium ion Cd2+ ;
⡢⤁
the
standard
chemical potential
and
the standard electrode potcn­
tial
on
a molarity basis (the density of water is 0.9971 kg
liter-
I
at
25°C).
㌮㠁
Calculate
the
standard frce energy
of
formation
of
N
2
in water at 75°C,
based
on
the Henry convention
and
the molality scale. Assume that the
solubility
of
N
2
at
a partial pressure
of
1
atm corresponds to a mole
fraction
of
8.3
X
10-
6
(Prausnitz, 1969, p.
358).
㌮㤁
The
mean-ion activity coefficient
y
±
for H
2
S0
4
in water is 0.257 on the
molality scale (Henry convention)
at
25°C and
m
=
6.0 (Robinson and
Stokes, 1965,
p.
477). Calculate the value on (a) the molarity scale
(Henry
convention) and (b) the mole fraction scale
(Henry
convention).
The
density
of
the
6-m
solution is 1.273 kg
liter-
I
,
and
that
of water is
0.9971
at
25°C.
㌮㄰ĠSuppose
that
it is desired to work in terms of
T
and
Vas
independent
variables,
rather
than in terms of
T
and
P,
as in most
of
Chapter
3.
What
are the equations corresponding to equations 3.2-10 to 3.2-17,
3.3-1,3.4-1
to
3.4-5,3.5-1
to
3.5-4,3.7-12,
3.7-15a, and 3.7-29?
㌮ㄱĠ
Show
that
a
2
G
/a~2

is
positive definite for a single ideal-solutíon phasc;
that is, show that Q(
ô~)

corresponding to equatioil
3.9-1
is
positive for
all
ô~

=1=
O.
___
CHAP1~ER
䙏啒Ġ _
Computation
of
Chemical Equilibrium for
Relatively
Simple Systems We are now in a position to consider actual examples of equilibrium analysis,
having developed lhe equilibrium conditions in Chapter
3
in terms of two
formulations, examined the nature of the constraints, and introduced expres­
sions for the chemical potentia!. We develop algorithms for the two formula­
tions for relatively simple systems prior
to
the development of general-purpose
algorithms in later chapters.
Initially
we
define a relatively simple sysicm
and
then comment
on
factors
that
affeet the choice of formulation to use. We subsequently develop first
lhe
stoichiornetric formulation and then the nonstoichiometric formulation, in
special forms applicable to such systems. Each approach
is
iHustrated
by
examples. For these examples,
T
and
Pare
fixed, and
we
defer consideration of
the effect
of
changes in
T
and/or
P
to
Chapter
8.
㐮㄁ RELATIVELY
SIMPLE
SYSTEMS
AND
THEIR
TREATMENT
For
the purpose
of
this chapter, a relatively simple system consists
of
a síngle
phase
that is an ideal solution
of
two
or
more species (including the case
of
an
ideal-gas solution)
and
involves a relatively small number
1\1
of elements
or
a
relatively small difference
(N
-
M)
between
the
number of species
and
the
number
of
elements. [We continue to assume in this chapter, for convenience,
that
I !
=
rank (A)
==
c.]
These restrictions are related to the means
by
which
the
calculations are actually
performed-by
"hand"
(i.e., by means of a
nonprogrammable caiculator or graphically),
by
means
of
a programmable
calculator, or
by
means
of
a small computer. The devices used are then
75

77
76
Computation
of
Otemical Equilibrium
for
Relatively Simple
Systems
characterized by having either
no
storage memory
or
a memory
of
a size
of
up
to
perhaps
64K
bytes. Recent developments
in
both
programmable
calculators
and
in
computers have
meant
that
the difference between a calculator
and
a
computer has narrowed, resulting
in
an
almost continuous spectrum
of
capabil­
ity,
fram the smaUest programmable calculator
to
the
largest
mainframe
computer.
More precisely,
in
terms
of
M
and
.N,
a relatively simple system is
char­
acterized by relatively small values
of
N M
and
M(
N -
M);
the
latter
is a
measure
of
the size
of
the matrix
that
must
be
manipulated in the stoichiomet­
fic formulation (i.e., a measure
of
the size
of
the computer memory required),
and
the former is a similar measure for
the
nonstoichiometric formulation.
Consideration of relatively complex systems involving nonideality,
more
than
one
phase, and relatively large values
of
NM
or
M(N
-
M)
requires
more
storage
than
is
available
on
many small machines,
and
we defer discussion
of
such systems
to
later chapters; which describe general-purpose algorithms for
use with large computers.
In
the examples given
in
this
chapter
we illustrate three leveis
of
increasing
problem complexity, along with corresponding leveIs
of
computational
capabil­
ity. The most prinútive
of
the latter, by hand, involves values
of
M
or
(N
-
M)
of 1
or
2;
that
is, we consider systems for hand calculation
to
consist
01'
two nonlinear equations
at
most, for the solution of which
the
Newton­
Raphson
or
another procedure
can
be used (Ralston and Rabinowitz,
1978,
Chapter
8).
Recent development.s in programmable calculators alIow a signifi­
cant
increase in the size
of
system
that
can be considered relative
to
that
for
calclliation by hand. We use an HP-41C calculator for this purpose
and
in
Appendix
B
presenl algorithms for
both
stoichiometric and nonstoicillometric
formulations of
lhe
equilibrium problem. Finally, recent developments in small
computers allow a further increase in the size
of
system that
can
be
consídered
simple.
In
Appendix
B,
we also present algorithms written in BASIC for
each
of
the
two problem formulations.
4.2 REMARKS
ON
CHOICE
OF
FORMULA
TION
The
simplest case for
the
stoichiometric formulation is when there is only
one
stoichiometric equation
(R
=
1),
which
i5
the case when
(N
-
M)
=
1.
The
simplest case for the nonstoichiometric formulation
is
when there
is
only
one
elernent
(M
=
1).
These simplest cases illustrate the determining characteristics
for relatively smal! systems for the two formulations. Comparison
of
(N
-
M)
with
M
is
a useful guide as to which formulation to use for a reIatively simple
system.
For
the stoichiometric case
to
be preferred,
(N
-
M)
is smaller,
and
for the nonstoichiometric case
to
be
preferred,
M
is smaller. More precise1y, if
(N
-
M)
<
M
(N
<
2M),
the stoichiometric formulation
is
preferable; if
(N
-
AI)
>
M
(N
>
2
M),
lhe
nonstoichiometric formulation
i5
preferable.
Stoichiometric Fonnulation for Relatively Simple Systems 4.3
STOICHIOMETRIC
FORMULA
TION
FOR
RELATIVELY
SIMPLE
SYSTEMS 4.3.1 System Involving
One
Stoichiometric
Equation
(R
=
1)
We consider first the simplest case of a system lhal
can
be
represented by one
stoichiometric equation to illustrate the stoichiometric
approach,
both
numeri­
cally and graphically. The dissociation of hydrogen is used in
the
following
paragraphs as
an
example
of
this situation.
In general, for a system represented by the stoichiometric equation
~"iAi=O,

(2.3-8)
equation 2.3-1a relates
n
i
to
~,

the extent-of-reaction variable. Numerically, the
solution
is
obtained froro equation
3.4-5,
lhe equílibrium condition, and
equation 2.3-1a, together with appropriate cherrucal potential expressions.
The
solution of equation
3.4-5
in terms
of
~

provides the equilibrium value of
~,

from which the composition
can
be
calculated. Graphícally, the solution occurs
at
the minimum
of
the function
G(
~),

which
is
constructed from equations
3.4-1
and 2.3-1a, together with the chemical potential expressions. .
Example
4.1
For
the system {(H, H
2
),
(H)}, calculate the equilibrium com­
position
at
4000
K
and
I
atm
(1)
numericaHy, and
(2)
graphicaHy,
if
the system
is
composed initiaHy
of
an
equimolar mixture of
H
and
H
2
.
At
4000
K,
the
standard free energy
of
formation of
H
is
-15,480
J
mole-
1
(Zwolinski
et
aI.,
1974).
So(ut;or;
Numerica/(v,
the system may be represented by
lhe
stoichiometric
equation
H
2
=
2H
or
2H- H
2
=
O.
(A)
Since
H
is species
I
and
H
2
is species
2,
v
I
=
2
and
11
2
=
--
1.
The
equilibrium
criterion, from equation
3.4-5,
is
/l2
=
2~tl'

(B)
and
equation
2.3-1
a applied to each species is
nl=llf+2~,

(C)
n
2
=
n~

-~_

(D)
Ir
we assume
that
the system is an ideai-gas soiution, so that the chemical

78
Computation of Chemical Equilibrium for Relatively Simple Systems StoicbiometrícFormulatioll for Relatively Simple Systems 79
potential expression is given by equation 3.7-12a, then
n
JL
I
=
JL
f
+
R T
In
-!
+
R T
In
P
(E)
n
t
and
R
n
2
(F)
J.L2
=
JL2
o
T
I
Tln-
+
RTlnP.
n,
We also set
nf
=
n~

=
I. On substitution
of
equations
C
to
F and the data
(1L~

=
-15,480;
JL~

=
O;
R
==
8.314;
T
=
4900 K;
P
=
1 atm) in equation
B,
we have the following equation for
~

at equilibrium:
(1
+
20
2
(1
-
~)(2

+~)

=
2.537,
fram
which the relevant solution is
~

=
0.4345. This results in
n
I
=
1.869 and
n
2
=
0.565 moles; fram these, the composition, expressed in mole fractions,
is
XI
=
0,768
and
Xl
=
0.232.
Graph
ically,
the solution may
be
obtained by either minimizing
G(~)

or
solving the nonlinear equation
ÂGa)
==
LV;JL;
==
O.
Here we illustrate the
former, which is shown in Figure 4.1, a plot
of
Ga)
against
~.

Beginning with
equation
3.2-16,
G(~)

is
constructed as follows:
G
=
n
l
J1.J
+
n
2
JL2
=
-15480
-
30960~

+
33257
X
[(1-
+
201n(1
+
2~)

+
(1
-
~)ln(1

-~)

-(2
+
~)ln(2

+
~)].(H)

Figure
4.1
is a pIot
of
equation H and shows that G is a minimum at
~

=
0.434,
which leads to essentially the same results as in the numerical solution
(preceding paragraph). The minimum value
of
G
is
-72,800
J re1ative to the
datum
implied by the
tJ.f
values.
4.3.2
System Involving Two Stoichiometric Equations
(R
=
2)
We consider here only the graphical method
of
solution for a system repre­
sented
by
two stoichiometric equations. The numerical method should be
implemented
by
the algorithm developed in the following section.
As
for
R
=
I, we may consider either the minimization or the nonlinear equatíon
point
of
view.
For
R
=
2,
the former involves finding the minimum point on a
three-dimensional surface, and the latter involves finding the intersection of
o
k I
-20.000
Q) :J
.2.
-40,000
"'" (:;
-60,000 -72,800
I
::c
I
--80,000 I I
I
11
I
-0.2
o
0.2
0.4°.434
0.6 0.8 1.0
~

Figure
4.1
Graphical
solution for
Example
4.1
showing minimum in
Ca)
at
equi­
librium
(point
E).
two curves in the
aI'
~2)

plane. In Example
4.1
we
used the minimization
poim of view, and here
we
illustrate the use
of
the alternative. This graphical
solution involves first establishing two nonlinear equations in
~

I
and
~
l'
the
extents of reaction for the two stoichiometric equations, from the equilibrium
criteria, the chemical potential expressions,
and
equation 2.3-la. We
usethe
system involving gaseous polymeric forms
of
carbon ai high temperature
to
illustraie the procedure.
Example 4.2 For the system {(C
j
,
C
2
,
C
3
),
(C)}, calculate the equilibrium
distribution of the three species at 4200 K and I atm, given that
J.L0
/
RT
is
1.695
for
C[ (species 1),1.119 for C
2
(species 2), and
0.171
for C
3
(species
3)
(JANAF,
1971).
Also assume that the system behaves as an ideal-gas solution.
Solution
The system may be represented by the following two stoicruomet­
ric equations with corresponding extent-of-reaction variables
as
indicated:
2C
I
=
C
2
:
(A)
~l'

3C
1
=
C
1
:
~2'

(B)

80
81
Computation
oI
Chemical Equílibrium for Relatively Simple Systems
Applyillg equation 2.3-1a
and
taking, for convenience,
n~

=
3,
n~

=
n~

=
O,
weh~e

.
n, =
3 -
2~1

-
3~2'

(C)
n
2
=
~1'

(D)
and
n
3
=
~2'

(E)
The equilibrium conditions, from equations
A,
B,
and
3.4-5, are
2JlI
=
J-Lz,
(F)
3JlI
=J-L3·
(H)
Substituting chemical potential expressions for
J-LI'
J-Lz,
and
J-L3
from equation
3.7-12a into equations F
and
H,
together with the use
of
equations
C
to
E
to
eliminate
n
I'
n2' n3,
and
the use
of
the numerical
data
given and rearranging,
we have (from equation
F)
~I(3

-
~I

-
2~2)

_
9.689
(J)
fIal;
~2)

=
(3
-
2~I

-
3~2)2

=0,
and
from equation
H
~2(J

-
~l

-
2~2

)_~

_
136.18
(K)
fi~l'

~2)

=
(3
-
2~1

-
3~2)

=
O.
It
is mathematically convenient to replace equation K by
J
/K
(which is
equivalent to replacing equation B
by
A - B
or
C
3
=
C
1
+
C
2
).
This results in
~1
(3 -
2~I

-
3~2)

_
0.07115
(L)
f{(~l'

~2)

=
~2(3

-
~l

-
2~2)

=0.
Values of
~l

may be calculated from specified values
of
~2

for each
of
equations
J
and
L.
Figure 4.2
is
a pIot
of
the two sets
of
values of
~I

against
~2'

The
solution lies
at
the intersection
of
the two curves,
wh.ich
then gives
the
equilibrium values
of
~I

and
~2'

0.315 and 0.723, respectively. From these,
Stoichiometric Formulation for Relatively Simple Systems
~1

0.7 0.723 0.8
~2

Figure 4.2 Graphical solution for Example 4.2 showing equilibrium values
of
~l

and
~
2
at
point
E.
ihe equilibrium mole fractions as
a
measure of the distribution are
XI
=
0.162,
x
2
=
0.254,
and
x
3
=
0.584."
.
4.3.3 Stoichiometric
Algorithm
To consider the general case
of
any number of stoíchiometric equations for
relatively simple systems, we begin with the equilibrium conditions
N L
PiJJL/~)

=
o;
j=
1,2,
...
,R:
(3.4-5)
;==
I
From an estimate
o(m)
of
the solution of equation 3.4-5, mole numbers at the
next iteration are obtained by means
of
(see equation 2.3-1a)
R
l1(m+1)
=
n(m
J
+
W(m)
""
v..
8(:(m)
i
I
~

IJ
~J

'
(4.3-1)
j=1

82
Computation of Chemical Equilibrium for RelativeJy Simple
Systems
Stoicbiometric Formulation for Relatively Simple Systems
83
where
d
m
)
is a positive step-size parameter, which is usually set
to
unity
or
less
(see Section 5.4.1 for general discussion).
Expanding
equation 3.4-5 about
n(m)
in a Taylor series, neglecting the
second-
and
higher-order terms, and setting the result to zero, we
obtain
the
Newton-Raphson
method (see Section 5.3.1 for general discussion).
This
gives
R N N
(a
)(m)(
a
)(m)
N
2:
2:
2:
Vi)
--.!2
~

s~~m)

=
~

V.II(m
l •
LJ
IJr,
,
1=lk=li=
on
k
a~,

i=1
j
=
1,2,
...
,R,
(4.3-2)
where superscript
(m)
denotes evaluation
at
nem).
For
an ideal solution,
we
introduce
the
chemical potential expression from equation 3.7-15a, which is
rewri
t
tco
as
IJ-.
I
=
rI11*
+
RT
ln!!.i
.
(4.3-3)
n
r
From
this.
it
follows
that
op.;
(
0ik
-=RT
---
1)
(4.3-4)
on
k
n
i
n
r
'
where
8,,<
is
the Kronecker delta. Substituting equations 4.3-4
and
2.3-6
In
equation 4.3-2, we have
(m)
N
VijJli
.
.
~

o~~ml(

i.
v/J"i! _
iii, )
-2:~,

,~-"

I :
i=
I
n~m)

n(m)
r
i:=
I
j=1,2,
...
,R
(4.3-5)
where
N
~.
=
2:
Vi)'
(4.3-6)
i=1
Equations 4.3-5 are solved for
l)~(ml,

and
the resuli is used in
equation
4.3-1
to determine
o(m+
J).
The
procedure is repeated until convergence
is
attained.
(This
approach
is essentially
lhat
suggested
by
Hutchison (1962),
Stone
(1966),
and
Bos
and
Meerschoek (1972).] A flow
chart
for this algorithm is given in
Figure 4.3.
Computer
program listings for the HP-41C and in BASIC are
provided in Appendix
B.
Suitabte
Make new

l
w
lm
?.
..
estimate
ofn
\01
Yes
No
/
~~

. 5
l:t.c.Gjl
<
10­
);,:B
Figure
4.3
Flow chart for the stoichiometric algorithm for relatively simple solutions.
Example 4.3 Calculate the equilibrium mole numbers for the system {(C0
2
,
N
2
,
H
2
0,
CO,O
2
,
NO,
H]),
(C
H, O, N)} at 2200 K and
40
atm. result­
ing from the combustion
of
one mole
of
propane
in air with the stoichiometric
amount
af oxygen (for complete combustion); assume
that
air consists
of
N
2
and
02
in
a
4:
1 ratio. [This is·a simplified version
of
a problem originally
considered by Damkohler
and
Edse (1943),
in
which the presence
of
the
species
H,
O and
OH
is neglected here.]

85 84
Computation
of
Chemical Equilibrium
for
Relatively Simple Systems
Table
4.1 Summary
of
loput
Data
and
Results for
Example
4.3
n{O)
0(91
Species
Formula
Vector
p,0,
kJ
mole-I
CO
2
1
O
2 O
-396.410
2.0 2.923
N
2
O O O 2 O 19 1.999 X
10
H
2
0
O 2 1 O
-123.93
1.5
3.980
CO
I
O
I
O
-302.65
\.0
7.667 X
1O~2

O
2
O
O
2 O
O
0.75 3.471 X 10--
2
NO
O
O I
I
62.51 2.0 2.732 X
10-
2
H
2
O 2 O O
O
2.5 2.006 X
10-
2
Solution
The stoichiometric algorithm
is
appropriate in this case since
N
<
2M
..
For
illustration, we use the HP-41C program given in Appendix
B.
From
the statement of the problem, b
=
(3,8,
1O,40f.
We enter data
and
execute the program in accordance with the
User's GuMe
in Appendix
B.
A
summary
of
the input
data
and
the results is given in Table 4.1. We have
ordered the species in column
1
in accordance with
the
note at the end of the
User's Guide.
The
P.0
in column 3 is taken from
JANAF
(1971).
The initial
estimate
0(0)
in column 4 has been arbitrarily set to satisfy
b.
The solution,
obtained after nine iterations, is given in column
5.
The
dominant species are
CO
2
and
H
2
0
as
reaction products and N
2
as relatively inert.
If
the combus­
lion were indeed stoichiometrically complete, the amounts of these species
wou]d be
3,
4,
and
20,
respectively.
Since
N
=
7 and rank (A) is 4,
R=
3.
The three chemical equations used by
lhe algorithm are
1
2e0
2
-
2CO
=
02'
2 CO
l
+
i
N
2
-
co
=
NO,
and
3
-C0
2
+
H
2
0
+
CO
=
H
2

aGI
RT
fortheseequations
at
n(9)
is
(-1.12
X
10-
7
, -
5.70
X
10-
8
,
-1.20
X
IQ-8f. 4.4
NONSTOICHIOMETRIC
FORMULATION
FOR
RELA
T1VELY
SIMPLE
SYSTEMS
4.4.1 System Consisting
of
ODe Element
(M
=
1)
We eonsider the simplest case
of
a system consisting
of
a single element
to
illustrate the minimization problem given in equation
3.5-1,
subject to the
constraints
of
equation 2.2-1. First, to provide geometric insight into lhe nature
Nonstoichiometric FOrnlulation for Relatively Simple Systems of
the nonstoichiometric formulation in terms of the Lagrange multipliers, we
use the case of
N
=
2.
Then we consider a procedure for arbitrary
N
that can
be generali2:ed to the numerical algorithm given in the following seetion.
We note, however, that the computer programs of Appendix
B.2
do not
allow the case
M
=
1,
although they could be suitably modified to do
so.
4.4.1.1 Geometric lllustration
for
N
=
2
Consider a system of species 1
and
2 involving one element. The problem
is
to
minimize
G(n
l, n 2)
=
nlJLI
+
n2JL2
(4.4-1)
at given
T
and
P
sueh that
a1n
l
+
a
2
n
2
=
b,
(4.4-2)
where
b
is the number
of
moles
of
the element in the (closed) system. The
solution
is
obtained from equations 3.2-8 and 3.3-1, with
dG
=
JL
1
dn
I
+
JL
2
dn
2
=
O,
(4.4-3)
from which
dn
2
__
!!:.l
dn
l
fLz
(4.4-4)
Since, fram equation
4.4-2,
dn
2
-~

(4.4-5 )
dn] a
2
it follows
tha1,
at equilibrium,
fJ-l
=
f.L2
(=
À),
(4.4-6)
ai
a
2
where the parameter
li.
has been introduced to represent the common fatio.
These
two
equations can be rearranged as
JLI
=
ajÀ,
(4.4-7)
JL2
=
a 2
/...,
(4.4-8)
which
we
reeognize
as
the equilibrium conditions of equation 3.5-3, with
li.
as
the (single) Lagrange multiplier.

86 Computation
of
Otemical Equilibrium for Relatively
Simple
Systems Nonstoichiometric Fonnulation
for
Relatively Simple
卹獴敭猁
87
The quantity
dn
2
/d11
I
in equation 4.4-4
is
the slope of a tangent to the curve
G
=
constant. Similarly,
dn
2
/d11)
in
equation 4.4-5 is the slope
of
a tangent to
the constraint (which is coincident with the constraint itself in this case).
Equations 4.4-7
and
4.4-8 express the equality of these slopes. This condition,
coupled with the requirement that the solution lie on the constraint, means that
graphically the constraint itself must be tangent to a contour of
constant
G.
For
a linear constraint, the solution occurs graphically where
the
element­
abundance constraint line (equation 4.4-2) is tangent to the
G(n
l
,
112)
surface
(equation 4.4-1). This can
be
illustrated by constructing contours
of
fixed
G
values
and
showing tangency of one
of
the contours
to
the constraint line.
Example
4.4
Use the system described in Example
4.1
to illustrate the
Lagrange multiplier method graphically.
Solution
Equations 4.4-1 and 4.4-2 are, respectively,
G
=
33257[11
l
ln
11
1
+
11
2
1n
11
2
-
0.465511
1
-
(/lI
+
/l2)ln(n,
+
11
2
)],
(A)
where G is
in
joules and
11
1
+
2/l
2
=
㌬Ġ
(B)
based
on
a
sy::;tem
containing one mole of each species initially.
The graphical construction
is
shown in Figure 4.4, wruch
is
a pIot
of
11,(I1
H
)
against
nl11
H
,),
showing the constraint line of equation
B
together with
contours
ofcónstant
G
calculated from equation
A.
Figure 4.4 shows the
constraint line tangent to the coIÍtour
G=
-72,800
J
at
the equilibrium point
E.
The coordinates
of
this point are
11
1
=
1.87
and
11
2
=
0.56,
in
~ssential

agreement with the l'esult given in Example 4.1. The value of
G
at
point
E
is
consistent with lhe minimum value
of
G
in
Example 4.1.
4.4.1. 2
General C,!se
(N
~

2)
Consider the general system for
M=
1{(A
j,A
2
,
.••
,A
N
),
(A)}.
The
N+
1
conditions
at
equilibrium fram equations
3.5-3
and
3.5-4
are
j.tj
=
iÀ;
i
=
1,2,
...
,N
(4.4-9) .
and
N ~

i11
i
=
b.
(4.4-10)
i=
Using equation 3.7-15a for
䩌椁
in
equation 4.4-9, we obtain

-
p.1
).
n
j
=
n
rexp
(
RT
.,
i

1,2,
..
.
,N.
(4.4-11)
'3
2
1.
87
1 \
11
1
o
0.56
112
Figure 4.4 Graphícal solution for Example 4.4; equilibrium
is
at poínt
E,
Substituting equation 4.4-11
in
equation 4.4-10
and
summing equation 4.4-11.
we
have, respectively,
N (
iÀ-
/17
)
=
b
llt
L
iexp
-~

(4.4-·12)
i=1
and
~

exp (
i
A;:
j )
=

(
4.4-13)
i=1
Equations 4.4-12 and 4.4-13 are two equations in the two unknowns
A
and
111"
Since equation 4.4-13 contains only the unknown
A,
n
r
and
the
mole fractions
of
the species can be obtained by solving this equation and substituting the
result
in
equations 4.4-12 and 4.4-11, respectively.
The general prablem for
M
=
1
is
thus equivalent to solving lhe single
Nth-degree polynomial equation
IV ~

I
1-0
LJ
aiz --
ⴭⴁ
(4.4-14)
1 -.,
i=l

88
Computation
of
Chemical Equilibrium for Relatively Simple
Systems
Nonstoichiometric
Fonnulation
ror
Relative!y Simple Systems
89
where
ai
=
(
-p-j
)
exp ,
RT
(4.4-15)
and
z
=
exp
(:r).
(4.4-16)
From
Descartes's mIe
of
signs (Wilf, 1962, p. 94), equations
4.4-14
has a
unique, positive, real root.
Example 4.5 Repeat Example 4.2, using the nonstoiehiometric fOfffiulation
and
the Lagrange multiplier method.
Solut;on
The solution involves the polynomial equation of degree 3 given
by
equation
4.4-14,
whieh,
on
substitution
of
the
data
given in Example
4.2,
becames
0'.1836exp
(R~)

+
0.3266[ex
p
(:T)
r
+
0.8428[ex
p
(:r)
r-I
=
o.
This equatíon may be solved analytically
or
graphically. The result is
XI
RT
=
-0.123.
The mole fractions calculated from tlús result, with the use of
equation 4.4-11,
are
XI
=
0.162,
x
2
=
0.255,
and
X
3
=
0.583,
essentially the
same
as
in Example
4.2.
In
cases where not all speeies
Ai
are present in the system, equation 4.4-14
beeornes
N " ~

a.za,; -
1
=
O
(4.4-17)
1 ,
i==
I
where
a
li
is
the subscript to species
Ai
(i.e"
its formula vector) and
N
is the
number of species present. In equation
4.4-11,

is replaced by
aliÀ.
4.4.2 NODstoichiometric Algorithm
In this section
we
deseribe
aD
algorithm for the eomputation of equilibrium in
a system consisting of a single phase that is
an
ideal solution, based
on
the
minimizatíon problem stated in Section
3.5,
for whieh the solution is given in
general by equations
3.5-3
and
3.5-4.
For
an ideal solution, we introduce the appropriate chemical potential
expression (equation 3.7-15a), wriUen as
*

/Li
=
JLi
+
RT
In
---.!.,
(4.3-3)
n(
iuto the first equilibrium condition
M
P-i
-
~

a,j\k
=
0;
i
=
1,2,
..
.
,N.
(3.5-3)
k=1
This results in
M

=
n
o'
II
zu/,.
i
=
1,2,
...
,N.
(
4.4-18)
I
til'
1=1
where
Zl
=
exp (
:~
),
(4.4-19)
and
we
have replaced lhe dummy index
k
by
I
to avoid two dummy indices in
the following equation being denoted by the same symbol.
We
substitute
equation
4.4-18
into the second equilibrium condition, equation
3.5-4,
to give
N'
M
n
l
~

akio
i
TI
Zflt
=
b
k;
k
=
1,2
•...
,M,
(4.4-20)
1=1
I--:=.)
where lhe sum to
N'
exc1udes inert specíes.* The total number
of
moles
is
N'
n
1
=
2:
n
j
+
n;;,
(4.4-21)
i=
I
where
n;;
is
lhe
total number
of
moles
of
inert species, Substituting equation
4.4-18
into equation
4.4-21,
we
obtain
N'
M )
n(
(
1 -
.2:
Oi
fi
z?
=
nz-
(
4.4-22)
1=1
1=1
FIOm
equation
4.4-20,
with
k
=
1
and
b
1
=t=
O,
N'
M
b
1
2:
al/JI
TI
zft'
=
--;;
(4.4-23
)
i=l
1=1
t
*Henceforth
we
frequently distinguish reacting species from inert species in order to
reàuce
the
number
()f
nonlinear equations
that
must
be
solved. The number
of
reacting
species
is
r,'"
(cf-
i\',
the totai
number
of
species,
induding
inert
species).

90
91
Computation
of
Oremical Equitibrium
for
Relatively Simple Systems
We combine equations
4.4··20
and
4.4-23
to eliminate
n
t
:
N'
M
N'
M
L
ak/J
i
TI
z,/i
=
r
k
L
aliai
II
z,li;
i=1
1=1
i=)
1=1
k
=
2,3,
...
,M,
(4.4-24)
where
b
k •
'k
=
k
=
2,3,
...
,M.
(4.4-25)
b":'
Similarly, equations
4.4-22
and
4.4-23
yield
N'
M
L
0/(1
+
r1a
li
)
II
zf/
=
1,
(4.4-26)
i=
f=J
where
n
z
rI
=b;'
(4.4-27)
Finally, equations
4.4-24
and
4.4-26
may be written as
N'
M
L
f3
ki
o
i
TI
z[',
=
0k\;
k
=
1,2,
...
,M,
(4.4-28)
i-= I
f=
I
where
f3
li
=
1
+
rla
li
,
(4.4-29)
/3
ki
=
G
ki
-
'kali;
k
=
2,3,
...
,M.
(4.4-30)
Equations
(4.4-28)
are
M
equations in the
M
unknown
z's
(or
À's). These
equations have been considered previously
by
Brinkley
(1966),
White
(1967),
and Vonka and Holub
(1971),
except that they did not incorporate inert
species.
Equations
4.4-28
require storage
of
both
ali
and
f3
1i
ar
recalculation of one
fram lhe other at each ileration. For better efficiency, we use only
/3//
by
transforming
ali
into
f3'i
fIom equation
4.4-30:
ali
=
f3
1i
+
',ali;
1=
2,3,
...
,M.
(4.4-31)
Substituting this result into equation
4.4-28
and rearranging, we have
,v'
M ( M )
ali
(4.4-32)
;~l

f3
ki
o;
,g2
zfu.
ZI,g2
z?
=
°"1'
NonsloichiometTic Formulalion for Relatively
Simpte
Sys1ems
or
S'
M
L
f3
ki
oi
IlOt',
=
0kl'
k
=
1,2,
...
,M
(4.4-33 )
i=

1=
I
where
(),
=
Z"
1=2,3
....
,M
(4.4-34)
and
O -
II
,\,(
~rl

(4.4-35)
1-
Zl
"'/,
1=2
where
(X"
=
f3
1i
;
1
=
2,3,
...
,M
(4.4-36 )
and
(Xli
=
ali'
(4.4-37)
Henc~

we need store only the
(3
matrix and the ali 's.
lf
desired, lhe total
nllmber of
molescan
be
determined from equation
4.4-23,
which can be
written, together with eqllation
4.4-18.
as
_
h)
..
'
Il[
-
-~N'

_
(4.4-_,8,
k.1=lalixi
The mole fractions are determined
from
the solution
af
equation
4.4-33
and
Ai
XI
=
ai
Il
zf/' (4.4-39)
I=l
The Newton-Raphson
method (see
Section
5.3.1
for
general
discussion)
for
solving equations
4.4-33
for
In
O,
(we
use
In
0I
to ensure that
fJ,
remains positive)
is
given
by
~.

(~)

o(lnO,)(ml
=
-!k;
k
=
L 2,
...
,
M'
, (
4.4-40)
1=
I
a
In
O,
,
6('''1
In
Bfm+
I)
=
In
0;111)
+
(,P,,)
o(ln
8
1
f"l;
m=O,I,2
•....
(4.4-41)
where equation
4.4-33
has been written as
f
=
O,
and
w
is
a step-size parame­
ter. From equation
4.4-33,
we
obtain
ai:,
,'V'
M
a
In
O-
=
L
{3k,a/i(Jj
,Il
0/,"
';""1
,=
X' l:
{3k,Ci.!t X

(4.4-42)
/=-1

92
Computation
of
Chemical Equilibrium for Relatively Simple Systems
A flow chart for this algorithm is given
in
Figure 4.5.
Computer
program
listings
for
the HP-41C
and
in BASIC are provided in Appendix
B.
We illustrate tbis procedure first
by
a very simple system involving only two
elements, to show explicitly the structure
of
equations
4.4-33.
We
then
present
a more complex example
to
illustrate the use
of
the BASIC
computer
program
in Appendix
B.
Choose
M
species with smallest
p.
i
and
linearly independent
ai Yes
Make
new estimate
of
M
species
Xi>
100?
Stop
Figure 4.5 Flow chart for the
nonstoidúometric
algoriLhm for relatively simple
systems.
93
Nonstoichiometric Fonnulation for Relatively Simple Systems Example 4.6
Calculate the fraction of S02 converte<!
at
equilibrium
to
S03
on
oxidation with
02
at
900 K
and
1 atm. Assume S02
and
02
are present initially
in
an
equimolar ratio
and
lhat the reacting system is
an
ideal-gas solution.
At
900 K,
,...o/RT
is O for O
2
(species I), -39.603 for S02 (species 2),
and
-41.509
for S03 (species 3) (JANAF, 1971).
Solution
The
system is represented
by
{(02,S02,S03)'
(S,O)};
b
=
(1,4)T.
ali
a
l2
1
a
=
13
)=(o
A
(
a
)
a
22
2
2
~)
2
a
23
b
2
'2
= - =
4
b)
/3)1
=
/3
12
=
/3
13
=
I
/3
2
1
=
a
21
-
'2all
=
2 -
4(D)
=
2
/3
22
=
a22
-r
2
a
l2
=
2 -4(1)
=
-2
/3
23
=
a
23-
'2
a
13
=
3 -
4(1)
= -
1
ai)
al2
a
13
)
(0
1
(
a
21
an
a
23
2
-2
-
~)

-J-t~

)
(11
=
exp
(
RT
=
1
(12
=
exp (
~i
)
=
1.5826
X
10
17
(13
=
exp (
~1
)
=
1.0645 X
10
18
Equations 4.4-33 become, for
k
=
1,
/3l1a/JfIIO{21
+
f3dJi1fI2(J{n
+
f3
13
(13(Jf
13
fJ{23
=
1,
and
for
k =
2,
f32t
o )
fJ
f
IlO
{21
+
f322(12fJfI2(J{22
+
f323(13(}'I13(Jf23
=
O.
Inserting values in these two equations for
f3ki'
(1i'
and
ali'
we
have
1
!I(
8),
(J2)=
(Ji
+
1.5826
X
10
17
fJ)O;2
+
1.0645
X
10188)(J2-
-
1
0,
(A)
=

95
94
Computation of Chemical Equilibrium
for
Relatively Simple Systems
and
2
h.«()\,
(
2 )
=
20!:
-
2(1.5826 X
10
17
)00
- -
1.0645 X
10
18
0
0;1
12 1
=0
(B)
for
k
=
I
and
k =
2,
respectively. These two equations may be solved by
means
of
one
of
the two nonstoichiometric computer programs in Appendix
B,
or
graphical1y.
For
illustration, a graphical solution is shown
in
Figure 4.6,
which
is
a pIot
of
0I'
calculated from each of equations A
and
B for assigned
values
of
°
2 ,
against
°
2,
The intersection provides the equilibrium values of
19
0l
=
2.90 X
10-
and
°
2
=
0.612. From these results and equation 4.4-39, the
mole fractions are
XI
=
Oi
=
0.374,
X
=
(J201
=
O
122
2 2
.,
°z
-(J3()1
=
0.504.
X
3
°
-
2
~

Ol Ó
2 O'
!
1
11
,
I
0.3
- ­
0.7
6
2
Figure 4.6 Graphical solution for Example
4.6.
Nonstoichiometric Formulation for Relativ·ely Simple Systems From
equation 4.4-38,
n
t
=
I
j(x
2
+
x
3
)
=
1.594. Thus the fraction
of
SOz
converted
at
equilibrium
is
[l
-
0.122(1.594)]/1
=
0.806.
Example 4.7 We reconsider the system described in Example 4.3,
but
now
assume
that
N
z
is
inert and that the species
OH, H,
and
0,
previously
neglected, are present. The first assumption means that the species
NO
is
omitted.
ENTER OEVICE
NUMBER
FOR
偒䥎呉乇Ġ
㘱ĠENTER
NUMBER
OF
SPECIES
ANO
ELEMENTS:
8,3 TYPE
OF
CHEM.
POTe
:KJ,
KCAL
OR
MU!RT
ENTER
1,
2
OR
3 RESPECTIVELY
1 HOW
MANY
SIGNIFICANT
䙉䝕剅匿Ġ
㠁 ENTER
SPECIES
NAME
C02 ENTER
FORMULA
VECTOR,CHEM POTENTIAL
4
NUMBERS
1,0,2,-396.41 ENTER
SPECIES
NAME
CO ENTER
FORMULA
VECTOR,CHEM POTENTIAL 4
NUMBERS
1,0,1,-302.65 ENTER
SPECIES
NAME
H20 ENTER
FORMULA
VECTOR,CHEM POTENTIAL
4
NUMBERS
0,2,1,-123.93 ENTER
SPECIES
NAME
H2 ENTER
FORMULA
VECTOR,CHEM POTENTIAL
4
NUMBERS
0,2,0,0 ENTER
SPECIES
NAME
02 ENTER
FORMULA
VECTOR,CHEM POTENTIAL 4
NUMBERS
0,0,2,0 ENTER
SPECIES
NAME
OH ENTER
FORMULA
VECTOR,CHEM POTENTIAL 4
NUMBERS
0,1,1,6.954 ENTER
SPECIES
NAME
H
ENTER
FORMULA
VECTOR,CHEM POTENTIAL 4
NUMBERS
0,1,0,94.81
Figur~

4.7 Computer input display for Examp1e 4.7 with use
of
BASrC program in
Appendix
B.

CHAPTER FIVE _
Survey
of
Numerical Methods I
TI
this
chapter we provide some elementary background on numerical methods
prior
to
considering the general-purpose algorithms discussed in Chapter
6.
In
Chapter
3
we
provided
an
introduction to the two main approaches used
throughout this book, the stoichiometric
and
the nonstoichiometric ap­
proaches, primarily from the thermodynamic point of
view.
In Chapter
4
we
applied these to relative1y simple (ideal, single-phase) systems
and
for this
purpose developed special-purpose algorithms to be used in conjunction with
small
computers.
Numerous generaI-purpose algorithms have appeared in lhe literature relat­
ing
te
the
solution
of
the chemical equilibrium problem, motivated by one
of
the
two
equivalent mathematical formulations described in Chapter
3
(cf.
Smith, 1980a).
Most
of
these algorithms can be classified as to whether they
are methods for function minimization
OI"
for
solving sets of nonlinear equa­
tions. In
this
chapter
we
outline some of the relations between these two types
of
method and some numerical ways of using them, as a prelude to detailed
discussion of existing algorith.ms.
We
do
not
attempt to give an exhaustive
discussion of such numerical methods.
For
example,
we
focus primarily
00
necessary conditions and consider only problems and approaches that are
particularly appropriate to the formulations
of
the equilihrium problem dis­
cussed
in
Chapter
3.
We also discuss only methods that use analytical
expressions for first and second derivatives since these are usually readily
available for chemical equilibrium problems. Recent treatments
of
general
numerical aspects of optimization and nonlinear equations are given by, for
example, Walsh
(1975),
Ralston and Rabinowitz (1978), Bazaraa and Shetty
(1979), and Fletcher (1980).
We
believe that the general discussion given here
is
useful for two reasons:
(1) it
i5
important for
an
understanding
of
existing chemical equilibrium
algorithms in terros
of
these general techniques; and (2) it should enable
recognition of the basis of other equilibrium algorithms that may
beencoun­
tered.
Two
Oasses
of Numerical Problem
L01
5.1 TWO CLASSES
OF
NUMERICAL
PROBLENI
The
approacnes we discuss for solving the chemical equilibrium problem
involve consideration of two
classesof
numerical problem. These are
(1)
the
minimization
of
a function
f(x),
perhaps subject
to
certainconstraints, and (2)
the solution of a set of nonlinear algebraic
or
transcendental equations. Thus
we wish to solve either
minf(x),
(5.1-1)
xEO
or
g(x)
=
O,
(5.1-2)
where
~

is
a constraint set
and
g
and
x
are N-vectors. In the following,
we
assume that
f
and
g
are twice continuously differentiable.
Figure
5.1
shows the methods discussed in this chapter
for
solving these
1WO
types
Df
problem. The numbers indicate the sections
in
which the various
methods are treated, and the dashed lines indicate interrelationships
or
links,
with precedence indicat.ed
by
arrows. There are five such links shown, indi­
cated by the letters
A,
B,
C,
D,
and
E.
Link
A
in Figure
5.1
reflects
the
fact
that, when
~l

=
R
N
,
the first-order
necessary conditions for
f(x)
to
take on a local minimum at
x*
are that
x*
satisfy the nonlinear equations
(
_.-I d
f
--o
(5.1-3)*
__
o
, dx
J
~....
Converse1y, if
x*
is a solution
af
equation
5.1-2,
ít
is
also
a
solution
af
the
minirnization problem
N
min
2:
g?(x*).
(s
.1-4)
i=·'
I
A sufficient condition for
x*
to be a local minimum
of
f
is
that eguation
5.1-3
holds and that the Hessian matrix
(a
2//ax
j
dX
i
)
is
positive definite at x*.
At the outset
we
note
that
we
cannot
ül
general solve such nonlinear
problems in closed forro except in the simplest of special cases. However, the
solution of sets
of
linear aigebraic equations on a digital computer
is
usuaHy a
relatively straightforward task. Hence most numerical algorithms for solving
nonlinear problems proceed by solving a sequence
af
problems whose degree
of
difficulty
is
no greater
than
that of solving sets of linear equations. Each
step
in
this sequence is called
an
iteration.
The sequence
is
usuaUy
terminated
*a/(lx
is a colUllln vector with
entoes
a/ih,.
100

103
Minirnization Problems
0-0 ....
Q>
.2·§
~

@
~

~:g~----..,

ggc.
I
U::::l
I
(V)
I
c
o
I
.~

~

~~


I
ㅬĠ
:;-
'"
8

....
-0
c

o..
.~

.g
-g
I
*~

"@
E~

(.>

~E

·C
l~

~----,

I
~

Q)
8
o:
E
@
I
I
N
E
N
~

ll
:

-
::I
N
(\/
â;
I
I
(.j
ç;

!ri

o
~

<l) '"
L
8 䤁
~

㫵Ġ
~
~
~.~"o

~

I I
a.
e
c - o

u
a.
«)
.9--S
I
c
L .....
W
I
o
o
j~

E
I
.~

~

::::l
·1
~

I
t
I I
g
00
❅Ġ
"E
I
~
'c
晀Ġ
~~

I
'" '"
.;;:
~

õ
t:
cn
N
:
~

@
I
.~



I
z
✢∂ .8
r----~-----J

(§)
~

I
ⴭⴭⴭⴁ
"O'"
LO
o
I
r--
--------:-----
oS
<l) E
't
t.
@)
L~

Q)
I
~"O

g.\J
a
olt
i€'
~

ⵅĠ
t
.s
o
r/)
- 5
E---------------
B
E
g

~

~
~

@
z
-!ri
.~

M
~


Lei
::s

Oi)
c
㨺㨾Ġ
~

Q>
㰧潩Ġ
"O

~

Li:
when the left and right sides
of
equation 5.1-2 agree
to
within some specified
tolerance
or
the components
of
x change from iteration to iteration
by
less
than
some specífied srnall amount.
The
success of any such numerical algo­
rithm depends
on
two
main
factors.
The
first is the complexity
of
each
iteration
(the
amount
ofcalculation
that
must
be
performed), and the second
is
the convergence properties
of
the algorithm
(the
number
of
iterations required).
AIgorithms thus proceed from an initial estimate
x(O)
of
a solution and
calculate a sequence
by
means of
x(m+
I)
=
x(m)
+
w(m)
l)x(m);
m
=-0,
1,2,
...
, (5.1-5)
where
m
is
an
iteration
indexo
The
scalar quantity
w
is calIed a
step-size
parameter, which determines the distance between successive iterations in the
direction defined
by
l)x(m).
Equation
5.1-5
is applied
in
general, and algo­
rithms differ
by
the
way in which
l)x(m)
is determined.
We
discuss ways
of
choosing
w(m)
[the so-calIed line-search algorithm (FIetcher,
1980,
p.
17)]
in
Section
5.4.
1.
5.2 MINIMIZATION PROBLEMS
We consider here
the
minimization of
a
functionj(x),
where
x
E
R
N
,
perhaps
subject to linear equality
and
nonnegativity constraints.
In
the absence of
constraints,
we
have the unconstrained
problem
min
樨砩⸁
(5.2-1
)
xER
N
The constrained minimization problern
that
we consider
is
I
min
昨砩Ⰱ
(5.2-2)

xEQ
I
where the constraint set
Q
is
defined
by
Q
=
{x:Ax
=
b,
XI
~

O}

(5.2-3)
j
Here
A
is
an
M
X
N
matrix
and
b
ís an M-vector
of
real constants.
I
In equation
5.1-5,
ôx(m)
is
usualIy chosen
at
each iteration
so
that
i 䤁
df
2:
N (
jf
)
ôx{m)
<
O
(s
.2-4)
I
( dw,m) )
w'.'~o

i~'

aX
i
,'""
-,
,
I
畮汥獳Ġ
(aj/ax;)x(mJ
=
O.
An algorithm satisfying equation
5.2-4
is called a
i ℁
descent method.
Different algorithms use different ways
ofchoosing
ôx(m),
but
alI
have
the
commOil property that,
once
l)x(ml
is chosen, the (positive)
102

105
104
Survey oI Numerical Methods
step-size parameter
w(m)
is chosen so
thatf(x(m)
+
w(m)
ôx(m»)
is smaller
than
f(x(m
J
).
Equation
5.2-4
ensures
that
this is possible.
5.2.1 Unconstrained Minimization Methods
5.2.1.1
First-Order
Method
An
intuitively appealing choice
of
ôx(tn>
is the vector along which
f(x)
decreases most rapidly
at
x(m).
This is the gradient vector
Vf,
with entries
af
/'dx
i

This choice
of
8x(m)
yields a first-order method usually called the
gradient method (also referred
to
as the method
of
steepest descent
or
the
first-variation method), which is defined
by
ôx(m)
= - (
a
f
)
==
-
(Vf)x(m
l.
(5.2-5)
ax
x(m)
The
rate
of
change
of
f
at
x(m)
in the direction defined by equations
5.1-5
and
5.2-5
is
N (
af
)2
(5.2-6)
(
d:{m>
)
w(m)=Q
.L
ÔX
i
x(m)'
i=1
This
satisfies relation
5.2-4,
unless we are at a value
of
x(m)
that ma.kes
the
gradient vector vanish [in which case
x(m)
satisfies the first-order necessary
conditions for
a
minimum]. Unfortunately, the gradient method can
be
quite
slow to converge, especially near the minimum
x*.
The rcason for this is
lhat
the
behavior of
I
near
x*
is
determined largely
by
its second derivatives since
the
first derivatives become vanishingly small.
5.2.1.2 Second-Order Method
\Ve may use information concerning second derivatives by approximating
f
near
each
x(m)
by a quadratic function and then finding the minimurn
of
that
approximation. This
is
sometimes called
the
second-variation method.
The
algorithm
is
based on minimizing the local quadratic approximation to
f(x)
at
x(m),
given
by
Q(x)
=
j(x(~»)

+
~

(jL)
(Xi
-
xJm»
;=1
aX
i
x(m)
1
N N (
'?Pj
)
+-
2:
.L
--
(xi-x}m»)(xj-xjm»).
(5.2-7)
2
'-1
.-
1
ex;
'dx
J
,
(I
1-
j-
X
m
Here
Q(x)
is
the quadratic function
that
agrees with the first two terros
of
the
Taylor
series expansion of
f(x)
about
x(m).
Minimization Problems
The
necessary conditions
that
Q
be
a minimum with respect
to
x are
aQ
=
O;
i
==
1,2,
.
..
,N.
(5.2-8)
dX
i
This yields
f)
N (
ali
)
(
-a
+.L
--
(x
j
-
xjm
l
)
==
o;
i=1,2,
...
,N.
aX
i
x(no)
j=
I
3x
i
a,x
i
x(no}
(5.2-9)
Equation
5.2-9
is
a
set
of
N
linear equations in the
N
unknown elements
af
the
vector
ôx(m)
==
x -
x(m).
Thus the second-variation method
i5
formally given
by
equation
5.1-5
with
2
)-1
8x(m)
==
-
fl
ai
(5.2-10)1<
.(
ax
2
x(no}
(
OX
)
x(no)'
where superscript ( -
I)
denotes a matrix inverse.
The
rate of change
of
f
at
x(m)
in the direction defined
by
equations
5.1-5
and
5.2-10
is
N N
Id
f)
(ai)
(iJ~)~1

(5.2-11 )
(
dJm)
)
w(m)~o

i~1

j;j
~a~il

dX
j /
,ax
ij
where alI quantities
OH
lhe right side are evaluated at
x(m).
lf
Lhe
Hessían
matrix is positive definite
at
x(m),
the criterion
of
equation
5.2-4
is satisfied.
5.2.2 Constrained Minimization Methods
5.2.2.1
Lagrange
Multiplier
Method
When the constraints on x are
Ax=b
(5.2-12)
(cf.
equation
2.2-3),
the classical method
of
Lagrange multipliers may be used
(Walsh,
1975,
p.
7),
as was
done
in
Chapter
3.
(For
simplicity, we assume tha!
.0
2
//0,,2
=
(d/3x«(jf/oX)T)T

107
106
Survey of Numerical Methods
A
is
of
fuH
rank
M.)
We form the Lagrangian
fUl1ction
M ( N )
(5.2-13)
t'.(x,
A)
=
I(x)
+
k~1

À
k
b
k -
i~1

Akjx
j
and
then minimize
e
with respect to x, while ensuring
that
the constraints are
satisfied. This results in the set
of
nonlinear equations
M
~

=
~-
L
AkjÀ
k
=
o;
i=
1,2,
,N
)
dX
i
aX
j
k=1
(5.2-14)
N
ae
-
b -
~

A
OI
x;
=
O;
j=
1,2,
--
o
~

J
,M.
a,
J
i=1
Equations
5.2-14
correspond to link B in Figure 5.1. As
in
the case of
unconstrained minirnization methods, there are first-and second-order imple­
mentations of the Lagrange multiplier method.
5.2.2.1.1
Hrst-Order
Method
lf
we
usea
fír~t-order

method analogous to the gradient method employed in
equation
5.2-5,
we obtain
ox~mJ

=
(
ar::
)
ax;
x(m,.""",;
M
= -
+
À(;I)A
ki
;
i
=
1,2,
...
,N,
(5.2-15)
(!L)
~

ax;
xlm)
k==
I
where the Lagrange multipliers
Nm)
are determined by using equation
5.2-15
in
conjunction with equation 5.2-12 to yield the set of
M
linear equations:
M N l\i
(O
ai)
L
À(;:')
~

AjiA
kj
=
~

Aji
a: ;
j=
1,2,
...
,M.
(5.2-16)
k=l
i=1
j=1
Xl
x(m)
We have assumed here that
x(m)
satisfies the constraints
of
equation
5.2-12.
Equations
5.2-16
ensure that
x(m+I),
as ultimately determined by equation
5.1-5, also satisfies these constraints.
If
the constraints are not satisfied
at
x(m),
that is,
if
Ax(m)
==
b(m)
=F
b,
(5.2-17)
then equation
5.2-16
is modified to become
M N N
(I)
~

À(m)
~

A
oA
=
~

A
00
~

+
bo
-b(m).
j
=
1,2,
...
,M.
o
~

k
~

JI
kl
~

JI
ax
J '
o
-'
k=l
j=1
i=!
I
x(m}
(5.2-18)
Minimization Problems 5.2.2.1.2 Second-Order Method A second-order method analogous to the second-variation method of equation 5.2-9
results when
ôx(m)
is
determined from the
(N
+
A1)
linear equations
~

l\.(t)A
ki
--
~

(~l

oxjm)
=
í~)

;
i
=
1,2,
...
,N
k=
I
j=
1
àX
j
aX
j
x(nn

àx;
x(-I)
(5.2-19)
and
N ~

A .ox(m)
=

1=
1,2,
...
,M
o
(5.2-20)

~

I;
J '
j=1
Again, if equation
5.2-17
applies, equation
5.2-20
becomes
N ~

A
oox(m
i
=
b -
bem).
1
=
1,2,
...
,M.
(5.2-21 )
kJ
1;.1
,
䤧Ġ
樽椁
5.2.2.2 Projection Methods Projection methods (Walsh,
1975,
pp.
146-148)
are based on lhe use of an
N
X
N
matrix
P,
such that
AP=O,
(5.2-22)
where A is the matrix
of
the linear constraints
of
equation
5.2-12.
For any
vector
y
E
R
N
,
the direction defined by
ôx(m)
=
Pj!
(5.2-23)
satisfies
Aox(m)
=
O.
(5.2-24)
Thus, from equation
5.1-5,
if
x(m)
satisfies the constraints, so also does
x(m+l).
The matrix
P
can be regarded as "projecting" the direction
y
onto the linear
constraint set. Several choices are possible for
y,
including the right sides of
equations 5.2-5 and 5.2-10.
One way
of
obtaining the matrix
P
is by considering the first-order
Lagrange multipiier method used in equations
5.2-15
and
5.2-16.
These equa­
tions may be written in -vector-rnatrix fonu as
ôx=
--V'f
-+-
A
F
>..
{5.2-25)

109
lOS
Survey
of
NumericaJ Methods
and
(AAT)À
=
A
Vf,
(5.2-26)
where, for ease of notation,
we
have dropped the iteration index
m.
Solving
equation
5.2-26
for
À
and
substituting the result
in
equation
5.2-25,
we
have
Ih
= -
(1-
AT(AAT)-IA)vf.
(5.2-27)
This way
of
determining
l$x
is
a projection method since it satisfies equation
5.2-23,
with
P
=
1-
AT(AAT)-I
A
(5.2-28)
and
Y
=
-Vf.
(5.2-29)
The
quantity P given by equation
5.2-28
may be used in conjunction with any
direction
y;
with
y
given by
~uation

5.2-29,
this method
is
called the
gradient-projection method.
Link C in Figure
5.1
reflects the way in which this
projection
method
has been derived.
5.2.2.3
Method
of
Conversion to Unconstrained Problem
Constrained minimization problems may be converted to unconstrained prob­
lems in several ways (Walsh,
1975,
Chapter
5),
as indicated by link D in Figure
5.1.
In
the special case when the constraints are linear, as in equation
5.2-12,
a
linear transformation
of
variables may be used to
obtain
an uneonstrained
problem. We have already explored the chemical implieations
of
such a
transformation in Chapter 2
as
it relates
to
chemieal stoichiometry and have
deve10ped some prelimínary ideas for a "stoichiometric" algorithm in Chapter
3
and
a special-purpose algorithm
of
this type in
Chapter
4.
Here
we
briefly
review those results in relation to a general numerieal algorithm for minimizing
a nonlinear function subject to
á
set of linear equality constraints, whieh
we
refer to as
the method
of
stoichiometric elimination.
The
stoichiometric elimination technique focuses
on
a set of independent
variables
~

related to x through the linear transformation
ôx
=
N~~

(5.2-30)
and
seeks to minimize
f(
Ü.
The matrix N satisfies
AN=O,
(5.2-31)
and
has
R =
(N
-
M)
linearly independent columns. Equation
5.2-31
ensures
Nonlinear Equatioll Problems that
A~x

=
O.
(5.2-32)
Thus, from equation
5.1-5,
if
x(m)
satisfies equation
5.2-12,
so also does
x(m+
I).
The
matrix N
is
arbitrary apart from equation
5.2-31
and may be redefined on
each iteration, if required. However, a convenient way of forming
N
is first to
choose a set of
M
linearly independent eolumns of
A
and then express the
remaining
R
columns as a linear combination
of
these. Formation of this
particular
N
matrix thus entails the solution
of
(N
-
M)
sets of
J1
linear
algebraic equations.
As before,
we
may employ either a first-
or
a second-order method for
choosing the
l$~

in equation
5.2-30.
The
first-order method sets
(m)
_(
aI)
o~)

-
a~)

x("')
N
.
= -
~

(a
ÔX
j
)
x(ml'
j
=
1,2,
...
,R.
(5.2-33)
1Iij
j
i=l
As in Chapter
2,
11;}
denotes entry
(i,
j)
of
N.
The seeond-order method sets
2 ) --I.
ô~(m)
= _
11
(
a
f
(
(5.2-34)
ae
.
Xl"')

ao(;)
x("'I'
The
gradient veetor
afj'à~

in equation
5.2-34
is expressed in terms of
affax
in
equation
5.2-33.
The Hessian matrix
a2f/a~2

is
related to
a
2fj'i3x 2
by
a2f N
N
í.
a2
1 )
--

=
~

)'k.J
(---_.-

1-'
I)'
(:
"'-'
11
ki
(5.2-35)
d(
d",}
k
==
1
1=,
J
3x,:<1:\:/
!
Equation
5.2-34
essentially entails the solution of a set of
R =
(N
-
M)
linear
equations
on
each iteration. This should be contrasted with the second-order
Lagrange multiplier method described in Section
5.2.2,
whieh requires the
solution
of
a
set
of
(N
+
M)
linear equations in general.
5.3 NONLINEAR EQUATION
PR,)BLEMS
As noted previously, the minimization problem
is
associated with the problem
of solving sets of nonlinear equations. Here
we
first recapitulate various forms
of these equations and then deseribe two methods for soIving sets
of
nonlinear
equations.

no
Survey of Numerical
Methods
The nonlinear equations associated with the unconstrained minimization
of
f(x)
are
af
=
o.
(5.3-1)
àx
For
the constrained minimization problem given
by
equations 5.2-2 and 5.2-12,
if Lagrange multipliers
are
used
to
incorporate
the
constraints, we have
the
set
of
(N
+
M)
nonlinear equations (cf. equation 5.2-14)
ATÀ
=
aj }ox'
(5.3-2)
Ax
=
b.
When the stoichiometric elimination technique is used to eliminate
the
constraints specified by equation 5.2-12,
we
have
the
set
of
nonlinear equations
aj
=
o.
(5.3-3)
a~

This
may be written in. terms
of
the original
x
variables through lhe chain ruIe
for differenüation to yield (cf. equation 5.2-33)
NT
;~

=
o.
(5.3-4)
As
we have seen in Chapter
3,
for chemicaI equilibrium problems, this yields
the
so-cailed classical
forro
of
the chemical equilibrium conditions.
5.3.1
Newton-R~phson

Method
The
Newton-Raphson method (RaIston and Rabinowitz,
1978,
p.
360)
is
one
of
the oldest
and
stíll most widely used numericaI techniques for solving the
N
nonlinear equations
g(x)
=
O.
(5.1-2)
The
technique sets to
zero
the local linear
approximation
to
g(x)
at
x(
n1
l,
I(ml(x),
given by
1(n1l(x)
=
g.(x(n1l)
+
~

(agi)
(x.
-x(ml);
i
=
1,2,
...
,N.
(5.3-5)
I •
I.
.
J J
aX
j=
1
J
x(no
l
The
resulling equations for
ôx(m)
=
X -
x(m)
are
lV
(a )
2:
agi
úx)nJ)
=
-gi(X<rnl
);
i
=
1.2"
..
,N.
(5.3-6)
j=l
X
j
Xl""
Nonlinear Equation Problems
IH
Equation
5.3-6 is identical
to
the
second-variation method for minimizing
f(x)
when g(x)
=
Vf(x),
as
given
by
equation 5.2-9 (link E in Figure
5.1).
The
equivalence results frem
the
fact
that
the Hessian matrix
of
f
appearing in
equation
5.2-9
is identical to
the
lacobian
matrix
of
g given by
(ogT
/3x),T
appearing in equation 5.3-6.
The
Newton-Raphson
method
is a descent method for the objective fune­
tion
1
N
S
="2
~

g}(x).
(5.3-7)
j=1
This
is
demonstrated by differentiation
of
equation 5.3-7 to yield
N N
(a)
~

=
~ ~

g
(,,(1>1»)
~

~X(m)

J
~
~

<I..
1
'
j
( d""m) )
.''''=0
,=
I
J=
I
UX
J
.''''
N ~

g}(x(I>I»)
~

o.
(5.3-8)
j:=:1
Equation
5.3-8
allows us
to
choose the step-size parameter
w(m)
in equation
5.1-5 so as
to
minimize approximately
S(x(m+
lI)
at each iteration.
We
may
aIso apply the
Newton-Raphson
method to the nonlinear equations
5.3-2.
This yields
(cf.
equations
5.2-19
and
5.2-21)
M N (
a
2
r )
~

A
~À(m)

-~.

_._1_.
.
ôx(m)
-'.J
kJ
k
L.J
OX
3x
J
1<=1
}-:=.:1
I
J
x(no)
M ~

AA.(ml..
i
=
I,2,
,N
(5.3-9) .
=
(:;
)x
,
"-
k.r
k '
1m
欽㄁
/11

~

Aôx(m
l
=
b -
~

A
x(m
l 锁
-'.J
IJ -
J /
-'.J
I)
J '
1=
1,2,
,,"1
j=l
J=I
which are used in conjunction with
À(m+
Il
=
Nml
+
w(m)
l)A.(m)
and
x(m+
I)
=
x(m)
+
w(m)
ôx(m).
5.3.2 Parameter-Variation l\1ethods
The general approach
af
parameter-variation
methods
has been
or
mterest
recently in numerica! analysis (Raiston and Rabinowitz,
1978,
p. 363).
It

113
112
Suney
of
Numerkal Methods
attempts to solve a set
of
N
nonlinear equations
g(x)
=
O
by
introducing one
or
more auxiliary parameters
a
and
then
solvil1g
the equations
h(x,
a)
=
O
(5.3-10)
at
a sequence
of
values of
a
that approach zero. The parameters
a
must be
incorporated in
h
in such a way that
h(x,
O)
==
g(x).
(5.3-11 )
In the use
of
this method there are the two important questions
of
the
choices of
h
and
the sequence
of
a
values. One possibility is
to
choose
h(x,
a)
=
g(x) -
a,
(5.3.12)
and
an
initial value
a(O)
=
g(x(O»,
(5.3-13)
where
x(O)
is arbitrarily chosen. At
x
=
x(O)
we
have
h(x(O),
0'(0»
=
O.
(5.3-14)
We then gradually change
a
to
O
through some sequence of values and at the
same time solve the sequence of problems
h(x(m>,
a(m»
=
O;
m
=
1,2,
....
(5.3-15)
The plúlosophy of the method
is
that if
O'(m+l)
differs only slightly from
O'(m
the solutions
x(m)
and
x(m+l)
should also differ only slightly. Thus
we
might
expect
that
x(
nl
l
should be a good initial estimate
of
the solution
of
h(x(m+
ll

a(m+I)
=
O.
(5.3-16)
One possibility for choosing the sequence
{O'(nl)}
is to regard equation
5.3-15
as
defining
x(a)
and
then to differentiate this equation to obtain the
differential equation
}:
N
(d
_I
g
) (
-dX
j
)
=ô.'
i,
k
=
1.,2,
...

N,
(5.3-17)
j=
I
dX
j
dO'k
ik'
where
Ô
ik
is the Kronecker delta. Equation
5.3-17
may be rewritten as
T
dX
=
J-l(X),
(5.3-18)
aO'
Step-Size Parameter and Convergence Criteria where J is the Jacobian matrix of
g.
Equation
5.3-18
is
a matrix set
of
ordínary
differentíalequations, which
we
can integrate from
x(
0'(0»)
=
x(O)
to
a
=
O
along
an
appropriate path. This can be performed by using a computer
algorithm for solving initial-value problems for ordinary differential equations.
The
value
of
x(O)
is
then the desired solution to
g(x) =
O.
Another way of choosing
h
in equation
5.3-10
is to incorporate
a
single
auxiliary parameter
t
and to write
g(x,
t)
=
g(x) -
tg(x(O»
=
O,
(5.3-19)
where
x(O)
is arbitrarily chosen. Differentiating equation
5.3-19
with respect to
t,
we
have
}:
(
agi
dX
j
N
i
1,2
•...
,N.
J~
I
axJ
(
dt )
~

tg,(x'O»);
=
(5.3-20)
This may be rewritten
as
dxClt
=
tJ-lg(X(O».
(5.3-21)
We then integrate equation
5.3-21
[rom
t
=
1,
where
x(1) = x(ül,
to
t
=
O.
The
value
of
x(O)
is 'lhe desired solution.
In
practice, these differential equation methods fail if the Jacobian matrix
J(x) becomes singular at any stage of the integration. In that case, one must
resort to additional techniques for computing a "path"
of
x
values that
terminates at the solution to the problem.
5.4
STEP-SIZE
PARAMETER
AND
CONVERGENCE
CRfTERIA
5.4.1
Computation
of
the Step-Size Parameter
All
the previous methods for minimization
and
for solving sets
of
nonlinear
equations, except for the parameter-variation technique, involve computation
of
new
values
of
x
from current ones by means of
x(m+
1)
=
x(m)
+
w(11I)
ôx(ml,
(5.1-5)
where
ôx(m)
is deterrnined by the particular algorithm used
and
",(111)
is
a
positive step-size parameter. In this section
we
discuss the computation of
",(ml.
If
the problem can be posed in the form
of
a minimization problem for
x
of
the forro
minG(x),
(5.4-1)

114
115
Survey
of
Numericai
Methods
a convenient way
of
choosing
d
m
)
is
by
finding the value
of
w
that
approxi­
mately minimizes
G(x(m)
+
w
ôx(nr»
on
each iteration. AlI minimization prob­
Iems
are
natural1y
of
the form
of
probIem 5.4-1, and we have seen
that
N
G(x)
=
2:
gj2(X)
(5.4-2)
i=l
is
a
function
whose minimum yields the solution
of
the nonlinear equations
g(x)
=
O.
(5.4-3)
Thus
the
determination
of
a step-size parameter is of general
importance
in the
practical
application
of most of the numerical methods previously discussed.
We
have
seen
that
the concept of a descent method is especially
important
since for
such
a method,
G
is
a decreasing function
of
w(m)
at
x(m};
that
is, the
method
yields
ôx(m)
satisfying
( dG)
=
~

(
3G
)
6x~m)

<
O,
(5.4-4)
dw(m)
",(01)=0
-;=1
3X
i
x(m)
I
provided
that
3G
faX
=1=
O.
Equation 5.4-4 ensures
that
a positive value
01'
w(m)
in
equation
5.1-5
can
be
found so
that
G(x
em
+
1))
<
G(x(m»).
Determination
of
the
optimal
step-size pararneter on each iteration is thus equivalent to the
one··dimensional optimization problem
minG(x(nl)
+
w
ÔX(I11».
(5.4-5)
..,>0
In
the
solution
of
this problem, care must be taken
that
toa
much
computation
time is
not
spent
searching for the
exact
minimizing value
of
w.
Usually
it
is
preferable
to
determine this value onIy approximately and
then
proceed
to the
next iteration.
Methods
for solving this one-dimensional optimization
problem
are
of two
types.
The
first
type
brackets the minimum in smaller
and
smaller intervals.
Techniques
such
as
interval halving, golden-section search,
and
Fibonacci search
may
be
used (Fletcher, 1980, pp. 25-29). These methods use values
of
G(
ú»)
for
comparison
purposes only
and
do
not
use
G(
w)
values explicitly.
The
second
type fits
G(
ú»)
to
a suitable low-order polynomial, whose
minimum
is then
found analytically.
For
example, the paraboIa fitted
to
three values may be
used.
Davidon,
as
cited
by
Walsh (1975, pp. 97-101), fits a
cubic
polynomial
to two
points
and
the
derivatives
at
these two points.
We
now
discuss a very simple procedure, when
w
=
1
is
known
to
provide
an
estimate
of
the
optimum value [e.g., when ôx(m) is determined from the
Step-Size
ParaOleter
and
Conver.gence
Criteria
Newton-Raphson method]. First, the value
of
(
dG
)
=
~

(
?G ) ôxfnl)
(504-6)
dw
",=1
i=1
aX
i
",=1
is calculated.
If
this quantity is negative
or
zero, we assume lhat we have not
passed the minimizing value
of
w,
and
we proceed to the next iteration, with
w(m)
=
1 in equation 5.1-5.
If
the
quantity
in
equation
5.4-6
is
positive,
we
set
w(m)
=
(dG/dwL=o
.
(5.4-7)
(dG/dwL=o
--
(dG/dw)"'=l
Equatio115.4-7 ensures that
O
<
w(m)
<
1 since
we
assume that we have passed
a minimum in
G(w)
at
w
=
1,
and
ôx(m) defines a descent method. This
technique has been used with sóme success in
a
simple optimization algorithm
(Smith and Missen,
1967)
and
is
employed in the general-purpose computer
programs given in Appendixes C
and
D.
Final1y, if it is known that alI
Xi
of
the solution
of
equation
5.4-1
are
positive,
we
must
a150
choose
w
to ensure
that
all
Xi
remain positive.
A
convenient way of doing this
is
to ensure that
w
satisfies
?)x(m)
w.ç
max
1,-
__
I
-(I
(5.4·8)
j,,;;,;.,;;;,N
{
x~m)

-.+
where e
is
a small number (e.g., 0.01).
5.4.2
Convergence Criteria
The
iterative procedure defined
by
equation
5.1-5
is
ideally terminated when
I
xjm) -
x:
l.ç
e;
i
=
1,2,
...
,N.
(5.4-9)
where
x*
is
the solution
and
ê
is some small positive number. Since
x*
is
nol
known, practical criteria are often chosen as
one
or more of the foilowing:
max
I
ôximll.ç
e, (5.4-10)
l";;;'i.,;;;,N
I
ôxJm>

max
1---

t:,
(5.4-11)
l<>;i";;;'N!
x;m)
I
' a ' ,
I
max
\
(
~
~
J.çe
(5.4-12 )
l<>;I<>;N!
dx,/x,""j

1I6
Survey of Numerical Metbods
and
max
I
gj(x(m))
I~

e.
(5.4-13)
l':;;'j':;;'N
Criteria 5.4-10
and/or
5.4-11 may
be
used for
both
optimization
and
nonlinear equation problems. Criterion 5.4-11 is relevant only when
it
is
known
that
x~m)

=1=
O.
Criterion 5.4-12 is relevant to minimizing
f(x)
and
criterion 5.4-13, to solving
g(x)
=
O.
In
the
programs
presented in Appendixes
B,
C,
and
D, criteria 5.4-11
and
5.4-12 are used, with the former for non­
stoichiometríc algorithms
and
the latter for stoichíometric algoríthms.
CHAPTER SIX _
Chemical Equilibrium
Algorithms
for
Ideal Systems In
Chapter
4
we
developed special-pUfpose algorithrns for use
on
small
computers to treat single-phase equílibrium problems for ideal systems with
a
relatively small
number
of
specíes
and
eIements.
For
these problems. the
chemical potential of each species
is
given by the ideal-solution form
of
equation 3.7-15a, which we rewFite as
_
*(
T)
/1
i
J-t,
--
J-ti

P
+
RTln-.
(6.1-1)
/1{
In this chapter
we
díscuss general-purpose algorithms to treat problems wíth
any
number of phases, species.
and
elements. We continue to assume that
equation
6.1-1
holds for each species. The quantity
n
I
is
the total number
01'
moles in the phase in which species
i
i5
a constituent. Thus when a pbase
contains
only species
t,
the
logarithmic term vanishes. Composition variables
other
than the mole fraction. whích
is
indicated in equation 6.1-1. can be used
for an ideal solution.
and
we
discuss this at the end
of
the chapter.
ComputeI' programs for two
sdected
general-purpose algorithms developeà
in
this chapter are given in Appendixes C and O. In the literature
sLlch
algorithms have been applied primarily to equilibrium problems involving a
single
gas
phase, with perhaps pUfe condensed phases also presenL Gas-phase
reactors and metallurgical problems involving gases and condensed solids are
examples of
these situations.
We derive
alI
the algorithms on the assumption
that
á
solution to the
equilibrium problem exists and
is
unique. We recall from Chapter 3 that. for
ideal systems. this
is
guaranteed only in general in the case
of
problems
consisting
of
one phase. Existence seldom presents practical difficulties.
but
the mathematical possibility
of
nonuniqueness can cause difficulties in the
implementation of certain equilibríum algorithms, as can the nonnegativity
constraints on the equilibrium mole numbers. In the ensuing discussion we
occasionally refer
lO
these potential difficulties. but a complete discussion
af
them
is
postponed to
Chaptcr
9.
H7

118
Otemical Equilibrium Algoritbmsfor Ideal Systems
Reviews
of
equilibrium algorithms have been given by Zeleznik
and
Gordon
(1968), Van Zeggeren and Storey (1970), Klein (1971), Holub
and
Vonka
(1976), Seider et ai. (1980), and Smith (1980a, 1980b). We are concerned here
primarily with a detailed criticaI analysis of the most important algorithms
themselves and
do
not attempt an exhaustive review.
6.1
CLASSIFICATIONS
OF
ALGORIlBMS
Many algorithms for calculating chemical equilibrium have appeared in the
literature. It
is
useful to classify them into groups with common characteristics
to understand relations between them. Any such c1assification is, however, not
unique, and in what follows
we
discuss algorithms in the context
of
four
alternative classification schemes.
1
One broad way of c1assifying equilibrium algorithms fram a numerical
point of view
is
according to whether they are based on minimization
methods
or
on
methods for solving sets of nonlinear equations. This
classification may sometimes
be
an
artificial one,
as
we
have seen in
Chapter
5.
2 A second way of c1assifying algorithms
is
with respect to their incorpora­
tion of the element-abundance constraints and the equilibrium condi­
tions, as described in Chapters 2 and
3.
Some algorithms satisfy the
element-abundance constraínts at every iteration of the calculation and
proceed to a solution
of
the equilibrium conditions. Conversely, some
algorithms satisfy the equilibrium conditions at every iteration and
proceed to a solution of the element-abundance constraints. Still other
algorithms satisfy neither condition at each iteration and proceed to
satisfy
both
simultaneously. This classification scheme has been sug­
gested by Johansen (1967).
3
A third classification scheme that has been used
is
equilibrium-constant
methods
versus
free-energy-minimization methods.
We
believe that this
classification
is
often misleading,
and
its use in the past has had the
historical result of obscuring basic similarities between certain algo­
rithms.
4 Finally, as a fourth way, we may classify algorithms as to the particular
way in which the element-abundance constraints are utilized in the
calculations.
As
in Chapter
4,
we refer to algorithms that elíminate these
constraints by means
of
the technique discussed in Section 5.2.2.3 as
stoichiometric algorithms.
Such methods essentially treat
the
number
of
unknown independent variables as
(N'
-
M).
AIso,
we
refer to algo­
rithms that explicitiy utilize the element-abundance constraints
in
the
forro of equation 2.2-3 as
nonstoichiometric algorithms.
For
these algo­
rithms, the nurnber of variables is
(N'
+
M),
a1though for ideal systems,
119
Structul"e of
Otaptcr
this number is usually effectively reduced to
(lI!
+
7T),
where
rr
is the
number of phases in the system.
In
summary, equilibrium algorithms can be examined from several points of
view.
This chapter is structured to focus
on
the fourth classification,
but
reference
is
also made to the others where appropriate. We have adopted the
philosophy that, by taking various points of view into account and by studying
the structures
of
some representative algorithms,
we
can better understal1d the
basic features of
any
equilibrium algorithm.
6.2
STRUcrDRE
OF
CHAPTER
The presentation
in
this chapter approximately parallels the disçussion of
nurrierical methods in Chapter 5 and
is
outlined in Figure
6.1.
We consider
nonstoichiometric algorithms first (Section
6.3
as indicated) and then stoichio­
metric algorithms (Section 6.4). Within the former, and following the develop­
ment
of
Section 5.2.2 (on constrained minimization methods), we discuss
first-order methods (Section
.6.3.1)
and then the Brinkley, NASA, and
RAND
algorithms, which are essentially variations
of
the same second-order method
(Section 6.3.2); some other approaches are also mentioned (Section 6.3.3).
Within the latter,
and
following lhe developrnent of Section
5.2.1
(on
uncon­
6.3 Nonstoichiometric algorithms
I
I I
I
6.3.1
First·order
6.3.2
Second-order
6.3.3
Other
I I
I I I
l--~

1 Gradient
--~

2
Nonlinear
1
RANO*
-ooE-
~

2 Brinkley--olE--::O-3
NASA
projection gradient
projection
6.4. Stoichiometric algorithms
I
I
I
I I
I
6.4.2
First-order
6.4.3 Second-order 6.4.4
Optimized stoichiometry
I
VCS'
"Genera!-purpose
a!gorithms
for
which
computer
programs are given in Appendices C
and
D.
Figure
6.1
Chem.icai
equilihrium algoríthms.

121
no
Chemical Equilibrium Algoritluns for Ideal
Systems
strained minimization methods), we also discuss first-
and
second-order meth­
ods
(Sections
6.4.2
and
6.4.3);
an
important
method reIated to the second-order
method
is developed separately using the concept
of
optimized stoichiometry
(Section
6.4.4).
We derive alI the algorithms primarily in the case
of
a single
ideal-solution phase
and
indicate any extensions required to treat
other
types
of
problems.
6.3 NON8TOICHIOMETRIC ALGORITHMS 6.3.1
First-Order
Algorithms.
6.3.1.1 Gradient Projection The
gradient-projection algorithm resulls from equation
5.2-23.
Mole-number
changes
[rom
a
given estirnate
n(m)
are computed
by
means
of
6n(m)
=
_P
(
-aG)
=
_pp(rn
(6.3-1)
an
n(m)
n(m+l)
=
n(m)
+
w(m)6n(m).
(6.3-2)
The
projection matrix
P
is given
by
P
=
1·-
AT(AAT)-I
A.
(5.2-28)
lt
is assumed that
n(m)
satisfies lhe element-abundance constraints; equations
6.3-1
and
6.3-2 are used iteratively to minimize
lhe
Gibbs
function
of
the
system. This method has
not
appeared in the literature, allhough
it
has some
useful computational features.
For
exampIe, onIy a single matrix inversion is
required
(in
equation 5.2-28), which need
be
performed only once
at
the
beginning
of
thealgorithm.
6.3.1. 2
Nonlinear Gradient Projection
A
related first-order algorithm has been proposed by Storey
and
Van Zeggeren
(1964).
The
nonnegativity constraints
on
the mole
numbers
are incorporated
by
means
of
the logarithmic transformation
Yi
=
In
n
j

(6.3-3)
This results
in
the transformed problem
minG(Y),
such
that
N ~

akiexp(y;)
=
b
k
;
k
=
1,2,
...
,M.
(6.3-4)
j=l
1
Nonstoichiometric Algorithms Since the constraint equations are now nonlinear, the gradient-projection
method ís
not
strictly applicable. However.,
if
we
use the local linear Taylor
series approximation to the constraints,
we
obtain, assumíng that
y(m)
salisfies
equation
6.3-4,
N2:
akin~m)

~y/m)

=
O;
k
=
1,2,
...
,M.
(6.3-5 )
i=l
We
can utilize the gradient-projection
method
for minimizing
G(
ôy)
subject to
the linear constraints
of
equation
6.3-5,
which may
be
expressed
in
the form
AD(m)ôy(m)
=
0,
(6.3-6)
where
D(m)
is the diagonal matrix with entries
n~m).

The
resulting algorithm
computes changes to
y(m)
by
means
of
6y(m)
= _
p(
aG
)
=
._
PDp.(m),
(6.3-7)

ay
y(m)
where we
have
omitted the superscript
(m)
on
P
and
D
for ease
of
notation.
The
projection matrix
P,
which must
be
recalculated on each iteration. results
from replacing
A
in
equation 5.2-28 by
AD,
thus yielding (
P
=
I -
DTAT(ADDTAT)-lAD.
(6.3-8)
Storey
and
Van Zeggeren
(1964)
originally derived the preceding algorithm
(equations
6.3-7
and
6.3-8)
in a
quite
different manner. We
can
see lhe
connection with their approach by considering the Lagrange multiplier formu­
lation
of
the
gradient-projéction algorithm discussed in Section
5.2.2. V'h
first
define Lagrange multipliers
i
by
means
of
the linear equations
(cf.
cquation
5.2-26)
ADDTATÀ
=
AD
2
p.(m).
(6.3-9)
Then
we
set
(cf.
equation 5.2-25)
õy(m)
= -
Dp.(m)
+
D
1
A,
T
À.
(6.3-10)
Equations
6.3-9
and
6.3-10
are the working equations used by Storey
and
Van Zeggeren
(1964).
They are simply a minor rearrangement
af
equations
6.3-7
and 6.3-8.
One
practical difficulty with the preceding method is that the satisfaction
ofl
the element-abundance constraints

equation 6.3-4 tends to deteriorate as
th
iterations proceed, uniess the step-size parameter
w
is very smal!.
It
is
dear
l
from lhe derivation that this is a consequence
af
lhe linear approximation
t

123
122
Chemical Equilibrium Algoritluns for Ideal
Systems
the
nonlinear constraints. This "drifting" phenomenon may also occur to a
minor
extent in the use of the gradient-projection algorithm in equation 6.3-1.
However,
in
that case the drifting oeeurs solely due
to
the accumulation
of
computer
rounding errors.
The
drifting phenomenon may be alleviated by using the modification
discussed in Section 5.2.2.1.1. Equation 6.3-7 then becomes
ôy(m)
= -
PDp.(m)
+
pem)DTAT(ADDTAT)
-
ôb,
(6.3-11)
where
ôb
=
b -
An
em
);
(6.3-12)
f3
is
an
additional step-size parameter, which is usually set to unity.
An
approach
equivalent to that
of
equation 6.3-11 was proposed by Storey and
Van
Zeggeren
(1970).
This
modification may
a1so
be applied to equation
6.3-1
to minimize the
effeets
of
eomputer rounding errors. Equation 6.3-1 then becomes
ôn(m)
= -
Pp,(f>1)
+
f3(m)A
T
(AA
T
)
-
ôb.
(6.3-13)
We
note tha! equations 6.3-] 1 and 6.3-13 in principie permit the use of
initial-s01ution estimates
n(O)
that
do
not satisfy the element-abundance con­
straints.
We
remark in passing that these projection methods can also be viewed as
types
of
stoichiometric techniques, which
we
discuss in detail in Section 6.4.
This
is
due
to the fact that the projection matrix used in each case can be
viewed
as
a stoichiometric matrix. Thus, for P defined in equation 5.2-28, AP
vanishes. We recall fram Chapter 2 that
th.is
means that the columns of
Pare
stoichiometric vectors. However, P is not a
complete
stoichiometric matrix
since the
number
of columns
N
is larger than
R
=
(N
-
M).
We
finally note that the two algorithms discussed in this section make
no
special assumptions
as
to the algebraic form of
p..
Thus they can also be
utilized for nonideal systems (Chapter
7).
6.3.2
Second-Order
Algorithms-the
BrinkIey-NASA-RAND (BNR)
Algorithm We
consider here the nonstoichiometric formulation (discussed in Chapter 3)
on
which the Brinkley algorithm (Brinkley, 1947), the NASA algorithm (Huff
ct
aI., 1951), and the
RAND
algorithm (White et aL,
1958)
are based. This
views the problem as one of solving a set
of
nonlinear equations.
Nonstoichiometric Algorithms
The
equilibrium conditions (equation 3.5-3), with the ideal-solution chemi­
cal potential incorporated, are
Itr
M
+
In
n -
In
n.
-
~

.1.
a .::::

i
=
1.2
....
,N',
(6.3-14)
I •
t:.J
'fI;
k1
'
RT
k=\
where
'A
k
(6.3-15)
1J;k::::
RT'
Equations 6.3-14 are linear in the logarithms of the mole numbers
n
j
and the
logarithm of the total number
of
moles
n
I'
where
N'
(4.4-21 )
n(=
2:n
j
+
n
;;.
i=1
In
contrast to this, equation 4.4-21
and
the element-abundance constraints
N' 2:
akjn
j -
b
k
=
O;
k:=.
1,2,
...
,M.
(6.3-16)
i=
are linear in
n;
and
n
I'
The
three variations (Brinkley, NASA, and RAND) of the
basi.c
algorithm
discussed in this section differ essentially only in the way in which they
numerically treat lhe mole-number variables. The
RAND
version uses
n,
as
variables, and employs the Newton-Raphson method
on
equations 6.3-14.
4.4-21, and 6.3-16. which is equivalent to linearizing the logarithmic tcrms in
equation 6.3-14. The Brinkley
and
NASA versions use
In
11;
as variab1es and
employ the Newton-Raphson method on the same set of equations, which
is
equivalent to linearizíng the resulting exponential terms in equations 4.4-21 and
6.3-16
(cf.
Section 6.3.1.2). We discuss the
RAND
variation first and then
the Brinkley and N
ASA
variations and show how all three algorithms are
intimately related.
We
emphasize
that
in lhe
fol1owing
discussion
we
explicitly
include the possibility
of
inert species through equation 4.4-21. This has not
previously been considered in the literature, although Apse (1965) discussed
their effect
00
the RAND variation
of
the algorithm.
6.3.1.1 The RA ND Varwtion
We consider problems consisting
of
a single multispecies phase first and theu
generalize to multiphase problems. At
the outset we allow the phase to
be
nonidear and then show the simpiifícations that ide;ility introduces. Lineariza­
tion
of
equation 3.5-3 about
an
arbitrary estimate of the solutiün
(n(m),
l/J(m))

124
125
Chemical Equilibrium Algoritluns for Ideal
S~'stems

yidds,
after rearrangement,
]
N'
(d
)
M
(m)
M
-_
~

(m)
(m)_~_

(m).
RT.
L
dn. on
j
+
L
akiO\h
-
RT
2:
akil/Jk •
;=!
j
n(m)
k=1
k=!
i
=
1,2,
...
,N',
(6.3-17)
where
olj;i
m
)
=
l/Jk
-lj;k
m
}
(6.3-18)
and
on(m)
=
n.
-
n(m)
j
j
(6.3-19)
j'
As
before, superscript
(m)
denotes evaluation
at
(n(m),
lj;(m)).
The quantities n
and
n(m)
are related through the element-abundance constraints (equation
6.3-16)
by
N' " a
.on(m)
=
b -
b(m).
.:;,.
kj
j
k
k,
k
=
1,2,
...
,M,
(6.3-20)
j-=-l
where
lV'
b(m)
=
)'
a
n(m).
k .....
kj
j ,
k
=
I,2,
...
,M.
(6.3-21)
j=1
Equations 6.3-17 and 6.3-20 are a set
of
(N'
+
M)
linear equations in the
unknowns
ôn(m)
and
~I/;(m).

These linear equations are solved,
and
new
estimates
of
(u,
tJ;)
are obtained from
lj;(m+
I)
=
'lj;(m)
+
w(m)~1f;(m}

(6.3-22)
and
n(m+
I)
=
n(m)
+
w(m)~n(m).

(6.3-2)
The
process
is
then repeated, using these new solution estimates until conver­
gence is achieved.
The
usual working equations
of
the
RAND
algorithm in the literature
are
those for an
ideal
solution, although the preceding description applies to
nonideal systems in general.
For
ideal systems, the number of linear equations
Nonstoicltiometric Algorithms to
be
solved
on
each iteration
of
the procedure may
be
reduced
f
roro
(N'
+
M)
to
(M
+
I)
byeliminating
the variables
~n(m)

in equatiolls 6.3-17 and6.3-2ü.
This can be done because
of
the special
form
of equatiol1 6.1-1. Thus equation
6.1-1
gives
1
(dJ.1.j)
Oj}
_._
(6.3-23)
RT
an
j
n
j
n[
where
ô
íj
is
the Kronecker delta. Substitution of equation 6.3-23 in 6.3-17
allows
ôn(m)
to be obtained explicitly in terms
01'
tJ;
in equation 6.3-18:
M
ii(m)
)
on(m)
=
n;m)
(
~

akj""k
+
u -
~T

;
j
=
1,2,
...
,N',
(6.3-24)
j
k=
I
where the additional variable
u
is
defined
by
LN~

on(.m}
Orl(m)
j-I
j
.-
__

(6.3-25)
u=-~=
n(m)
n[
I
Substitution of equation 6.3-24 in 6.3-20 yields the
M
linear equations
M (
N'
"
"a.
a.
nem)
1
.I,.
+
],(m)u
.:;,.
.:;,.
Ik
jk
k
'1',
V
j
i=l
k=1
.
N'
(m)
" a
n(m)~

+
b -
bem).
j::::
1,2
....
,M.
(6.3-26)
~

jk
k
RT
j ) ,
k=1
A
further equation
is
obtained by using equation 6.3-25 and summing equation
6.3-24 over
i
to give
N'
(m)
M "
(m)!!:.L
L
Ó~m)l/Ji

-
nzu
=
~

n
k
RT
(6.3-27)
i=-~

I
k
""-o!
Each iteration
of
the
RAND
algorithm consists
of
soiving the set
of
(M
+
I) linear equations 6.3-26 and 6.3-27 and using equation 6.3-24
to
determine
13o(m).
The
values
of
o used
011
the next iteration are obtained from
n(m+
I)
=
n(m)
+
w(m)~n(m),

(6.3-2)
where
w
is
a step-size parameter.
Several minor modificaüons of the RAND algorithm appear
in
the litera­
ture. Although we have derived
it
as a method for soIving nonlinearequations,
it was originaHy formulated (White ei
aI.,
1958) as a second-variation method

127
126
Chemical Equilibrium Algorithms
for
Ideal
Systems
for minimizing
G
subject to the element-abundance
and
nonnegativity con­
straints (Section 5.2.2.1).
Thc
original formulation requires
that
each
nem}
satisfy lhe element-abundance constraints. This removes
thequantity
(b
j
­
bJm»
from
the
right side
of
equation 6.3-26. Another modification of the
algorithm consists
of
the reduction of the number of working equations in the
case
of
a single ideal-solution phase from
(M
+
1)
to
M.
This modification has
been presented several times in the literature (Brinkley, 1966;
White,1967;
Vonka
and
Holub, 1971) and is essentially the algorithm discussed in Section
4.4.2.
Equations 6.3-26 and 6.3-27 are due to Ze1eznik and
Gordon
(1962) and
Levine (1962), apart from our treatment
of
inerts. As Levine pointed out, even
when
nem)
satisfies the element-abundance constraints, it is useful numerical1y
to inc1ude the quantities
(b
j
-
bJm})
on the right side of equation 6.3-26 since
this prevents the accumulation
of
computer rounding errors.
The
RAND
algorithm
is
easily extended to any number of single-species
phases
(Kubert
and Stephanou, 1960; Oliver et aI., 1962; Core
et
al.,
1963;
Eriksson, 1971), and to more than one multispecies phase (Boynton, 1960;
Raju and Krishnaswami, 1966; Eriksson and Rosen, 1973; Eriksson, 1975). In
this general case, when there are
'lT
m
multispecies phases and
'l'{s
single-species
phases, equations 6.3-24, 6.3-26, and 6.3-27 become, respectively,
r
(M
/l(m)
)
on~m)

=
J
nt)
i~l

aijI/Ji
+
U
a -
~T

(for species in multispecies phases)
l
uanyn}
(for species in single-species phases)
(6.3-28)
M
,IV'
'IT
N'
(m)
~ ~

(m),
+ "
b(m)
=
~

(m)~

+
b -
b(m).
.t..I
~

aikajknk
ltIi
~

ja
u
a
~

ajkn
k
RT
j
j'
i=l
k=1
a=
k=
j=1,2,
...
,M,
(6.3-29)
and
M
N'
p,(m)
2:
b{milJ;.
--
J1
U
=
2:
n(m)~.

a
=
1,2,
...
,'l'{s
+
'l'{m'
j=

la
I
za
cc
k=
1
ka
RT'
(6.3-30)
where subscript
a
refers to a phase. We thus see that, in general, the
RAND
algorithm consists of iteratively solving the set of
(M
+
'1T)
linear equations
6.3-29
and
6.3-30, where
'l'{
=
'lT
m
+
7T
s
'
(6.3-31)
Equations 6.3-26 and 6.3-27 are the special case
7T
=
7T
m
=
I.
Nonstoichiometric Algorithms
In spite
of
the straightforward way in which
we
have generalized to the
multiphase situation, nontrivíal numerical problems may sometimes
be
en­
countered
in
lhe
use
of
equations 6.3-29 and 6.3-30. These problems arise when
the coefficient matrix
of
the linear equations becomes singular at some
point
in
the calculations.
It
can be shown that in principIe this
is
not possible in
problems consisting
of
only a single ideal phase
but
can
occur whenever there
is more than one phase. Such difficulties have been only briefly alluded to in
the literature (Oliver et aI.,
1962;
Barnhard and Hawkins, 1963; Samue1s,
1971;
Gordon
and
McBride,
1971,
1976; Madeley
and
Toguri, 1973a, 1973b;
Eriksson, 1975). We discuss these in detail in Section 9.2.
We observe from our discussion
of
classification schemes at the beginning
of
this chapter that the RAND algorithm, as originally formulated
by
White
et
aI.
(1958), is a minimization method. At each iteration the element-abun­
dance constraints are satisfied, and the algorithm iteratively minimizes the
Gibbs free energy. We have also shown
that
the sarne algorithm may be
considered
to
be
a method of solving the nonlinear equations 6.3-14
and
6.3-16.
We
have seen that the mole numbers
and
chemical potentials
on
each
iteration need
not
necessari1y satisfy either equation 6.3-14
or
6.3-16,
and
the
algorithm may iterate to satisfy
both
theseconditions
simultaneously.
It
is
usually called
a
jree-energy-minimization method.
Finally, the
RAND
algorithm
solves a numerical problem in which there are essential1y
(M
+
7T)
variables
that must
be
ultimately determined. These are the
M
Lagrange multipliers and
the
7T
values
of
the total number of moles in each phase. This
is
the
case,
however, only when
a11
phases are ideal
and
is
due to the fact that only then
are we able to reduce the
(N'
+
M)
equations
6.3-17
and 6.3-20
to
the
(M
+
1)
equations 6.3-26 and 6.3-27. We have demonstrated the reduction for
the case
7T
=
1.
In general, for nonideal systems (Chapter 7),
we
carmot reduce
the number
of
equations in the set.
In Figure 6.2 a flow chart
is
shown for the
RAND
algorithm as developed
here.
In
view
of
the discussion
in
the foHowing two sections,
we
also refer to
this as the
BNR
algorithm.
In
Appendix
C
we present a
FORTRAN
computer
program that implements
this
algorithm.
6.3.2.2
The
Brinkley Variation
Although this variation was historically the earliest (Brinkley,
1947,
1951, 1956,
1960,
1966;
Kandiner and Brinkley, 1950a, 1950b), it has been displaced by the
RAND
variation. This has been partly
due
to the use
af
the apparently
appealing term "free-energy-minimization method" used to describe it,
but
also because Brinkley chose to discuss his algorithm by using notation
that
made it
appear
to be quite different f
Tom
the
RAND
variation. In
thissection
we show that the Brinkley algorithm differs from the
RAND
algorithm
in
only
a minor
way.
This observation was apparent1y first made by Zeleznik and
Gordon
(1960).
We again start from equations 6.3-14
and
6.3-16,
but
we now use In
n
i
as
independent variables, rather than
n
j'
In
the
RAND
variation
nem)
usuaHy

128
129
Chemical Equilibrium Algorithms for Ideal Systems
Compute step-size parameter w
lm
)
No
Figure 6.2
Flow
chart
for
the
RAND
algorithm.
satisfies the element-abundance constraints,
and
iterations proceed until the
equilibrium
conditions are satisfied.
In
contrast,
in
the
Brinkley variation,
n(m)
satisfies
the
equilibrium
conditions
on
each iteration, and iterations
proceed
until
the
element-abundance
constraints
are
satisfied. Since In
n
i
are
the
independent
variables.
it
is convenient to set
(cf.
Section
6.3.1.2)
y,
=
In
n,.
(6.3-3)
Nonstoichiometric Algorithms Then for a single ideal phase
equations
6.3-14
and
6.3-16 become, respectively;
ll.{
..
)
exp(Yi)
=
11;
=:
exp
(
2
Qkz"if'k
-
;1-
+
ln
n[
;
i=
1.2,
...
,N'.
k=1
(6.3-32)
S' 2:
ajiexp(
JJ
=
b
j
;
j=
1,2,
.....
~.

(6.3-33)
;=1
Substitution
of
equation 6.3-32
into
63-33 yields
N'
(
AI
p.*
1
i~1

ajiexp
k~\

akitJ;k
-
RT
+
In
n,.
=
b
j ;
j
=
1.2
....
,A1.
(6.3-34)
Finally,
we
also have, from
equations
4.4-21
and
6.3-32.
V'
(.\{
J.L"
)
11

I
~I

exp
k~
I
a
kI
tJ;
k -
R
T
=
1
_.
11~

.
(6.3-35)
Equations 6.3-34 and 6.3-35
are
a set of
(.\1
+
1)
nonlinear equations in lhe
(M
+
1)
unknowns
.y
and
n(.
);ote
that lhe mole fractions obtained from
equation
6.3-3i
for an
arbitra!)'
set
01'
Lagrange multipliers
l/;
define
an
equilibrium composition for
some
hypotheticaJ set
of
element abundances b*.
Thus the Brinkley variation
of
lhe
BNR
algorithm iteratively modifies
b*
unlil
it coincides with b specified
by
lhe
right side of equation 6.3-33.
Ir
we choose estimates
(tf;lm).
n;
m))
and determine
n(
m )
from equation 6.3-32.
lhe Newton-Raphson iteration equations obtained from Enearizing equations
6.3-34 and 6.3-35 are
M
I
".
)
'"
l
~

a

nlm)
S
r("ll
-'--
b(rn)t:
=
b -
.
b
lml
~
~

lI<
JI.:'
k
'1-'(
} }
J'
j
=
1.
2,
....
A1
i==1
1<==1
(6.3-36)
and
M
N'
2:
b;'n)
ôlJ!/m)
11=V
=
t1~""

-
2.:
n~m!

-
n

(6.3-37)
z
i=1
Á=]
where
.
n.
(6.3-38)
c
=
in
f1'.~';;'

130
131
ChemicalEquilibrium Algorithms
for
Ideal
Systems
and
ôl/;
is
defined
by
equation
6.3-18.
On
each
iteration
the
linear
equations
6.3-36
and
6.3-37
are
solved
for
the
(M
+
1)
unknowns
8..J;(m)
and
v.
Then
new
values
of
If;
and
In
n,
are
obtained
from
lf;(m+l)
=
..J;(m)
+
w(m)ô�1{m)
(6.3-22)
and
In
n~m+

I)
=
In
n~m)
+
w(m)v.
(6.3-39)
The
resulting
values
of
..J;(m+
I)
and
In
n~m+

I)
are
used
in
equations
6.3-32
to
determine
n{m+
Il,
and
the
iteration
is
repeated.
Note
the
similarity
of
the
linear
equations
of
the
RAND
variation
(equa­
tions 6.3-26
and
6.3-27)
to
those
of
the
Brinkley
variation
(equations
6.3-36
and
6.3-37).
The
coefficient
matrices
of
the·
two sets
of
linear
equations
are
identical.
Only
the
[ight
sides
differ
slightly. This is
because
in
Brinkley's
variation
nem)
satisfies
the
equilibrium
conditions, whereas
in
the
RAND
variation
this
is
not
the
case.
We
cal!
equations
6.3-32, 6.3-36,
and
6.3-37
the
Brinkley algorilhm
here,
although
in
Brinkley's
earlier
papers
it
appeared
in a
somewhat
different,
but
completely
equivalent,
fonn.
The
main
differences
are
twofold:
(1) Brinkley
chose
to
express
the
element-abundance
constraints
of
equation
6.3-16
in
terros
of
stoichiometric coefficients
(this
was
primarily
because
he
discussed two
other
methods
for
solving
the
resulting
equations-intended
for
use
in
hand
ca1culations
and
nol
discussed
here-for
which this
form
of
the
constraints
was
essential);
and
(2)
he
chose
to
express
the
equilibrium
conditions
of
equation
6.3-32
in
terms
of
equilibrium
constants.
We
now
examine
the
progression
from
the
form
in
equations
6.3-32, 6.3-36,
and
6.3-37
to
the
form
in
Brinkley's
papers.
Wben
the
equilibrium
conditions
and
the
element-abundance
constraints
are
expressed
in
stoichiometric
forro,
equations
6.3-32, 6.3-34,
and
6.3-35
become, respe?tively,
M
J.t7
)
n
i
=
exp
(
2:
Pkit/J
k -
RT
+
In
n, ;
i
=
1,2,
..
.
,N',
(6.3-40)
k=1
N'
( M
J.t*
)
2:
V)iexP
2:
Pkit/J
k -
R~

+
In
n,
=
q); j
=
1,2,
...
,M,
(6.3-41)
j=1
k=1
and
N'
(M
/li )
=
1 _
n
z
2:
exp
2:
Pkit/J
k -
RI'
(6.3-42)
11
'
i=1

k=
,
t
Nonstoichiometric Algorithms where
N'
q)
=
2:
P)ini;
j=
1,2,
...
,M.
(6.3-43)
i=;
1
When
i
is
greater
than
M,
l'k/
are
the
negatives
of
the
stoichiomclric coeffi­
cients
in
the
stoichiometric
equation in which
one
mole
of
species
i
is formed
from
a set
of
M
component
species. However, when
i
is less
than
or
equal
to
M,
we
define,
for
the
component
species,
P
ki
=
8
ki
;
i,k=I,2,
...
,M,
(6.3-44)
where
li"i
is
the
Kronecker
delta. In
equations
6.3-40
to
6.3-42,
10/;
denotes
the
chemical
potentials
divided
by
RI'
af
the
component
species used in the
stoichiometric
equations.
Note
the formal similarity between
the
two sets
of
equations
6.3-32, 6.3-34,
and
6.3-35
and
6.3-40
to
6.3-42.
The
Newton-Raphson
iteration
equations
resulting from
equations
6.3-41
and
6.3-42
are
M
N'
'"
'"
" P
n(m)~.1

(m)
-+-
q(m)t-
=:.
fi
_
q(m).
~

~"ik

jk
k
()
't'i
')
J
"1)
j'
j
=
1,2,
.
....
"'1.
(6.3-45)
i=-o
1
k=
1
and
M
;v'
)'
q(ml
>::./,(m)
_
11
"
=
n(l7I)
-
'V
nem)
-
11
.....
I
V
'rI
=v
t
~

k
='
(6.3-46 )
i
;=;
I
k
0'0
I
where
V'
q
<'/III
=
".
l'
.n(nI).
J ,.;..
Ii
I ,
j=
1.2,
...
,/'.1.
(6.3-47)
i=l
Equations
6.3-22
and
6.3-38
Lo
6.3-40
are
then
used to
determine
if;<'>J--II.
In
n~m+

1),
and
d'"
+
1).
As
in the case
of
the
RAN
O
variation,
the Brinkley
variation is readily
cxtended
to
consider
more
than
one
phase
(see Prob1em
6.2).
Brinkley's
papers
differ
in some
minor
ways from this
description.
In
his
earlier
papers he
replaced
v
by
u
since
ôn
li
t (
on
I )
:::::::;_.
(
v=ln~-=Jn

1+---
(6.3-48 )
n(-;;;)
=
U,
n~m)

.
n~m)

t
which
resulted in a
minor
modification
of
eqwuion
6.3-39.
:\iso,
instead
of

132 133
Otemical
Equilibrium Algorithms for Ideal
Systems
using equation 6.3-40 for the component species, Brinkley used the approxima­
tion
n~m+

I)
n(m)
(m)
n;m+l>
=
;m>exp(ôtP;(m»)
~

n;
)
(1
+
ôl/;(ftl»
(6.3-49)
1
f1(
n
m
I
t
and
seI
ôl/;i
m
>
~

ln(
1
+
Ôafk
m
»).
(6.3-50)
The
modifications of equations 6.3-45 to 6.3-50 are minor. Equations 6.3-32
and
6.3-34 to 6.3-37 are respectively equivalent to equations 6.3-40 to 6.3-42,
6.3-45, and 6.3-46. However, in his earlier papers Brinkley's equations
appear
very different from the latter set of equations. This is
due
only to his
notation.
Brinkley's notation also had the effeet of causing his algorithm to be regarded
as
an
equilibrium-constant method when, in fact,
it
is essentially equivalent to
the
RAND
algorithm. This notation, involving equilibrium constants,
is
the
second main way in which his algorithm differs from equations 6.3-32 and
6.3-34 to 6.3-37.
Brinkley expressed equation 6.3-40 in terms of equilibrium constants. Equa­
tions 6.3-45 and 6.3-46, the basic working equations
of
his algorithm, appear in
the literature essentially as
we
have given them here (Brinkley,
1947).
Since
RT1fJ.:
in equations 6.3-40 to 6.3-42
is
the chemical potential of component
species
k,
we have
. _
JLk
i"
-
RT
+
In
n
k -
In
n
r;
k
=
1,2,
.
..
,M.
(6.3-51)
For
a mixture of ideal gases, equation
6.3-51
becomes
fLO,
P
l/J"
=
R:'
+
lo
I1
k
+
ln-'
k
=
1,2,
.
..
,M.
(6.3-52)
i
I1
'
t
Using equation 6.3-52,
we
may rewrite equation 6.3-40 for
ali
the species as
P )
Vi
M
I1
Vki
'

=
K . -
TI
i
=
1,2,
...
,N',
(6.3-53)
I
pl
(
11
k=1
k ,
1
where
M
IL~

_
fL?
)
K .
=
exp
2:
"k;
RT
RT
(6.3-54)
(
pl
k=l
and
M
Vi
=
2:
"ki
-
1.
(6.3-55)
k=l
Nonstoichiometric Algorithms (Note that, for the component species, equations 6.3-40
and6.3-53
gíve
trivially
11;
=
11;).
In equati-on 6.3-54
K
pi
is
the chemical equilibrium constant
for the 'sloichiometríc equation forming one mole of species
i
from the
component species. Equation 6.3-53
is
completely equivalent to equation
6.3-40. Equation 6.3-53, when used in place of equation 6.3-40, would make
equations
6.3-41
and 6.3-42 quite different in
appearance
from their present
form, although they would remain mathematically identical.
In terms of the classification schemes discussed
at
the beginning
of
lhe
chapter, the Brinkley algorithm
is
essential1y a nonlinear equation method. The
equilibrium conditions are satisfied
at
each iteration,
and
the algorithm iterates
to satisfy lhe element-abundance constraints.
It
is
either anequilibrium-con­
stant method or not, depending on one's point of view (i.e., depending on
whether equation 6.3-53
is
used). As in the case
of
the
RAND
variation, there
are in general
(M
+
11)
unknown variables to be determined. These are the
total number
of
moles in each phase and the chemical potentials of
M
component species. 6.3.2.3
The
NASA
Variation
In
our
discussion of lhe
RAND
variation we have seen that in the original
formulation (White et
a1.,
1958)
the mole numbers on each iteration satisfy the
element-abundance constraints and
that
this restriction was relaxed in
a
later
modification
(Zelez.ník
and Gordou, 1962; Levioe, 1962). In the Brinkley
variation
we
have seen that the (Iogarithmic) mole-number variables
on
each
iteration satisfy the equilibrium conditions. This restríction may also
be
re1axed, resulting in the NASA variation of the algorithm (Huff et
aI.,
1951;
Gordon et
aI.,
1959).
The NASA a\gorithm
was
oríginaUy formulated to consider equilibrium
ca1culations at specified pressure
P
and enthalpy
H.
However,
we
consider its
derivation here for the usual case
of
specified temperature
T
and pressure
P.
to
facilitate comparíson
with
the
RAND
and
Brínkley variations.
Agaio consíderíng the case
of
an ideal solution and using \ogarithmic
variables for the mole numbers (equation
6.3-32),
we
linearize equations
6.3-14
and 6.3-16 about estimates
(n(m),
l/;(ftl.»
to yield, respective1y,
M
Im}
l:'(l
.
)(m)
_
t'(l
)(m)
= "
a
..
(.I.(m)
+
(j.,,(m))
_
~.

u
fi
n
k
U
o
n(
.4..
,k,
'/'.1
'rJ
RT
'
j=!
k
=
L 2
....
,N'
(6.3-56)
and
N' 2:
a;knim'8( n
k
)(m)
=
b
j
-
b:m)~

j
=
1,2
....
~M.

(6.3-57)
1,=01

134
135
Chemical Equilibrium
Algorithms
for Ideal Systems
The
NASA variation always includes the atornic e1ements as species in the
calculations. Numbering the species so
that
the first
M
are the elements, we
have
p,.
)
.
j
=
1,2,
...
,M.
(6.3-58)
l/;j=
RT'
Hence for the elemental species, from
equation
6.3-56,
we
have
(m)
.,.~m)

+
e5.,.~m)
=
e5(ln
n
.)(m)
~

e5(ln
n
)(m)
+
!!1-.
j
=
1,2,
...
,M.
'1') '1')
J
r
RT
'
(6.3-59)
When
k
does
not
denote an elernental species, equation 6.3-56 is written
by
using equation 6.3-59 as
8(ln
n,)'m)
=
8(ln
n,)(m,(
1 -
JI
a;,)
+
'~I

a'k~(ln

n,)(m)
M .
(m)
p.(m)
+
~

aik~T

-
;1'-;
k:
=
M
+
1,
...
,N'.
(6.3-60)
i=
Substitution of equation 6.3-60 in 6.3-57 yields a set of
M
linear equations
involving
{e5(ln
n)(m);
j
=
1,2,
...
,M}:
M (
N'
)
n;m)ô(ln
nJ(m)
+
.~

ô(ln
ni)(rn)
~
~

aikajkn~m)

.,
1--1
k-M+!
N'
(M)
+e5(ln
n~m»)

L
ajkn~m)

1 -
.2:
a
ik
k=M+1
1=1
N'
M
(m)
(m»)
_
em)
~
~

~

(m).
L
ajkn
k
(
i~l

a
ik
RT
+
RT
+
b
j
b
j,
k=M+l
j
=
1,2,
...
,M.
(6.3-61)
A final equation is obtained
by
linearizing
N' L
exp(1n
n
i
)
=
exp(1n
nJ
-n
z
(6.3-62)
i=
Nonstoichiometric Algoritbms about
(n(fl1),
n~m»).

This gives
M (
N'
)
i~j

8(In
ni)(m)
n~m)
+
k=~+l

aikn~m)

+e5(lnnr)(m){-n~m)
+
~

n~m)(1

-
.~

a
ik
)}
k=M+
1=1
N'
N'
(Mp,(m)
p.{m)
)
=
n~m)

-
L
n~m)

-
n
z -
~

n~m}

-
,L
a
ik
~T

+
;T
.
(6.3-63)
k=1
k=M+1
1=1
Equations 6.3-61
and
6.3-63 are a set
of
(M
+
1)
linear equations
in
the
(M
+
1)
unknowns
{e5(ln
ni)(m);
i
=
1,2,
...
,M
and
o(ln
n
t
)(fl1)}.
The
changes
(o
In
n
k
)(m)
in the remaining species mole numbers are given by equation
6.3-60. These equations essentially çomprise the NASA algorithm. The only
minor difference betw,een this presentation
and
the algorithm as
it
appears in
the literature arises from the fact that the pressure
P
is
used as a variable
instead
of
the total
number
of
moles
n
t

We can see the similarity
to
the Brinkley variation by noting that if
the
initial
(n(m),
n~m»)

satisfied the equilibrium conditions, the first term
on
the
right side
of
equation 6.3-61 would be absent.
In
additíon, we see fcom
equation
6.3-60
that
the new mole numbers would also satisfy the equilibrium
conditions. The resulting algorithm in this case would hence
be
exactly
equivalent
to
the Brinkley variation, except for the minor fact that changes in
the chemical potentials
of
the elemental species (or component species in
the
Brinkiey variation) are given in tbe NASA algorithm by equation 6.3-59,'
whereas in the Brinkley variation these are determined by exponentiating
equations
(i.3-59
and
cornbining this with the linear approximation
eX
~

1
+
x
(6.3-64)
to yield equation 6.3-49.
We thus see
that
the only essential difference between the Brinkley
and
NASA variations is the fact that successive iterations satisfy
lhe
equilibrium
conditions
in
the former,
but
not
in the latter. The inclusion
of
the elements as
species in the NASA variation
is
not an essential
part
of
the rnethod. Thus
the
NASA variation complements the Brinkley variation similar to the way
that
the modification
due
to Zeleznik and
Gordon
(1962)
and
Levine (1962)
complements the original
RAND
variation.
The
ma
in difference between the
three variations is between
(1)
the
RAND
variation and (2) the Brinkley
and
NASA variations.

136
Chemical Equilibrium Algorithms
for
Ideal Systems
NOllstoichiometric Algorithms
137
I
This difference consists solely
of
lhe fact that the former variation uses lhe When the element-abundance constraints are formulated appropriately, these
mole numbers
n
i
as variables
and
the latter variations use In
n
i
as variables.
Computationally, one would expect little difference between the performance
of the three variations,
and
this has been confirmed by Zeleznik
and
Gordon
(1960).
In terms
of
lhe
classifications in Section
6.1,
the NASA algorithm
is
a
nonlinear-equation method. It satisfies neither the element-abundance
nor
the
equilibrium conditions
on
each iteration. It can be, although
it
seldom is,
formulated
by
using equilibrium conslants. There are in general
(M
+
'lT)
variables to
be
determined, which are the chemical potentials
of
the elemental
species
and
the total number
of
moles in each phase.
6.3.3
Other
Nonstoichiometric Algorithms
In this section we briefly discuss some other chemical equilibrium algorithms
that have
appeared
in the literature and that are based direct1y
on
equations
6.3-14
and
6.3-16. They are motivated from the numerical viewpoint of either
minimization
or
nonlinear equations,
but
it seems that none of these has any
particular advantage over the
BNR
algorithm.
Several numerical schemes other than the BNR algorithm have been
published for solving the set of nonlinear equations that result when the
equilibrium conditions (equations 6.3-14) are substituted into the element­
abundance constraints (equations 6.3-16).
As
we
have seen, the Brinkley
algorithm results from the application
Df
the Newton-Raphson method to these
nonlinear equations. Other ways of solving these equations have
been
de­
scribed
by
Scully (1962), Storey
and
Van Zeggeren (1967),
and
Stadtherr
and
Scriven (1974).
Other methods based
on
minimization techniques have also been suggested
in the literature. Madeley
and
Toguri (l973a) have developed an
approach
that
uses the first-order algorithm due to Storey and Van Zeggeren (1964, 1970) in
the initial stages
and
the
RAND
algorithm in the final stages. George et
aI.
(1976) use Powell's method
of
rninimization (Powell, 1970)
on
an
uncon­
strained objective function that incorporates G and the element-abundance and
nonnegativity constraints.
Gautam
and Seider (1979) have suggested a method
based
on
the use of quadratic programming. Finally, Castillo
and
Grossman
(1979) have used the variable-metric projection method
due
to Sargent
and
Murtagh (1973).
A somewhat different approach uses an optimization technique called geometric prograrnrning
(Duffin et
aI.,
1967). Minimization
of
any
function is
equivalent to maximization of the exponential of the negative of the function.
Thus the chemical equilibrium problem may be formulated (for
one
phase) as
m:x
(exp(
;n]
=
n;'
ig,
[
exp(
-:;
I
RT)
r
(6.3-65)
equations together with equation 6.3-65 form a problem in geometric program­
ming. AIgorithms have been developed for solving such a problem, and these
have been applied
to
the chemical equilibrium problem (Wilde and Beightler,
1967; Passey
and
Wilde, 1968; Dinkel and Lakshmanan, 1977).
6.3.4 Illustrative Example for the BNR Algorithm
Example 6.1 We illustrate the use of the
RAND
variation of the
BNR
algorithm by considering equilibrium in a system investigated by White et
aI.
(1958). This involves determination of the composition of the gas resulting
from thecombustionofhydrazine(N
2
H
4
)
with
oxygenin
aI:
I ratioat 3500
K
and 51.0 atm. Using the species listed by White ct
aI.,
we
rcpresent the
system by
{(H
2
0,
N
2
,
H
2,
OH,
H,
02'
NO, O,
N,
NH),
(H,
N,
O)}.
We
use the
free-energy
data
provided by them and one mole of initial reacting system.
So/ut;on
We first construct an input
data
file for the
BNR
computeI'
program given in Appendix
C,
in accordance with the
User's
Guide
(sec Figure
6.3). The first line indicates that there
is
one problem to be considered,
and
the
second that there are
10
species and three components (in tbis case, equal to
the number of elements). Each of the following
10
lines contains a species
name, its formula vector, its phase designation
(1
denotes a gaseous multi­
species phase),
and
its standard chemical potential
(p.°/RT
in this case).
The
next two lines contain the initial equilibrium estimate (taken from the original
paper),
and
these are followed by a line giving the element abundances.
The
final three lines show, respectively, the temperature
and
pressure, the names
of
the elements,
and
an arbitrary title.
Using this input file, we obtain the
output
shown in Figure 6.4. Conver­
gence is achieved after eight iterations,
and
the results are given
both
as
equilibrium mole numbers and as mole fractions. They essentially agree with
001 010003 H
1
o o
1-10.021
H2
2
o o
1-21.096
H20
2
o
1
1-37.986
N
o
1
o
1-9.846
N2
o
2
o
1-28.653
NH
1 1
o
1-18.918
NO
o
1 1
1-28.032
o o o
1
1-14.M
02
o o
2
1-30.594
OH
1
o
1
1-26.111
0.1
0.35
0.5
0.1
0.35
0.1
0.1
0.1
0.1
0.1
2.0
1.0
1.0
3500.0
51.0
H
NO
HYDRAZINE
COMBUSTION Figure 6.3
lnput
data
file
for
Examples
6.1
and
6.2.

139
138
Chemical Equilibrium Algorithms for Ideal Systems
RAND
CALCULATION
METHOD
HYDRAZINE
COMBUSTION
10
SPECIES
3
ELEMENTS
3
COMPONENTS
10
PHASE1
SPECIES
O PHASE2
SPECIES
O SINGLE
SPECIES
PHASES
PRESSURE
51.000
䅔䴁
TEMPERATURE
3500.000

MOLES
INERT
GAS
〮、
ELEMENTAL
ABUNDANCES
CORRECT
FROM
ESTIMATE
H
2.000000000000D
00
1.9999998211860
00
N
1.000000000000D
00
9.9999982118610-01
o
1.0000000000000
00
9.999998211861Q-01
STAN.
CREM.
POT.
IS
MU/RT
SPECIES
FORMULA
VEC'TOR
STAN. CREM.
PO"'.
F.QUILIERIUM
EST.
H
N O
SI
汉紁
H 1
O
O
1
-1.00210
01
氮〰〰䐭〱Ġ
H2
2O
O
1
-2.10960
01
㌮㔰〰〭〱Ġ
H20
2
O
1
1
-3.7986D
01
㔮〰〰䐭〱Ġ
N
O
1
O
1
-9.84600
00
ㄮ〰〰〭〱Ġ
N2
O
2
O
1
-2.8653D
01
㌮㔰〰渭佬Ġ
NR
1
1
O
1
-1.8918D
01
ㄮ〰〰䐭佬Ġ
NO
O
1
1
1
-2.8032D
01
ㄮ〰〰䐭佬Ġ
O O
O
1 1
-1.46401)
01
ㄮ〰〰〭〱Ġ
02
O O
2
1
-3.0594D
01
l.
住住䐭佬Ġ
OH
1
O
1
1
-2.6111D
01
ㄮ〰〰䐭佬Ġ
8 ITERATIONS
SPECIES
EQUILIBRIUM
MOLES
MOLE
FRACTION FINAl,
DELTA
H
4.0672821D-02
2.48240050-02
2.8357D-11
H2
1.47'737190-01
9.0169014D-02
㈮㠳㠳〭汬Ġ
H20
7.8314179D-Ol
4.77977990-01
ⴶ⸲㔰㘰ⴱ㄁
N
1.4143462D-03
8.6322341.D-04
㌮㠳㈷䐭〹Ġ
N2
4.8524621D-01
2.96162210-0l
ⴺⴱ⸸㤳㐰ⴧ⤹Ġ
NR
6.93189740-04
4.230777.00-04
-).
㈸∹䐭崿Ġ
NO
2.74000480-02
1.6723178D-02
ⴴ⸴㐹㌰ⴺ弱Ġ
o
1.79494160-02
1.0Q55137D-02
1.6693[1<
1.
02
3.7316357D-02
2.2775433D-02
2 • 4562D-" ㄁
OH
9.6876036D-02
5.9126729D-02
㐮ㄱ⸸㙄ⴱ㄁
G/RT
=
-4.77613680
〱Ġ
TOTAL PRASE1
MOLES
=
1.63840
〰Ġ
ELEMENTAL
䅂啎䑁乃䕓Ġ
H
2.0000000000000
〰Ġ
N
1.000000000000D
〰Ġ
O
1.000000000000D
〰Ġ
FINAL
LAGRANGE
MULTIPLIERS
tLAMBDA/RT)
-9.785118420
〰Ġ
-1.
29690111D
〱Ġ
-1.
522212060
〱Ġ
Figure 6.4 Computer output for Example
6.1
from
BNR
algOlithm in Appendix
C.
those
given by White et
aI.
(1958) to within four significant figures. The entries
under
"FINAL
DELTA" give lhe final mole-number corrections
at
conver­
gence.
The
dominant products of combustion are H
2
0
and
N
2
,
as
expected.
If
we
had
assumed that the system behaved as a simple system
(R
=
1)
with
complete combustion, the amount
of
H
20
would have been 1 mole (cf. 0.7831).
Stoichiometric Algorithms and
that of N
2
would have been 0.5 moles
(cf.
0.4852);
n
would have been
1.5
r
moles
(cf.
1.638).
It
hasbeenassumedthatN
2
H
4
is
completelyconsumed(note
that it has been excluded from the list of species). Finally, the amount of
02
remaining is
0.03732
mole, rather
than
zero.
6.4 STOICHIOMETRIC
ALGORITHMS
6.4.1 Introduction
Stoichiometric algorithms eliminate the element-abundance constraints from
the minimization problem, resulting in an unconstrained formulation. As
discussed in Section
3.4,
this is accomplished by transforming fram the N
unknown mole numbers
n,
which are constrained by the M element-abundance
equations, to a new set
of
"r.eaction-extent" variables
~,

equal in number to
R
=
(N'
-
M).
Mole numbers on each iteration for these methods always
satisfy the element-abundance constraints.
The changes in the mole numbers
~n(m}

from any estimate
n(m)
satisfying the
element-abundance constraints are related to new
~

variables by
R
l)n(m)
= "
p
..
l)d
m
).
(6.4-1)
I
~

"'./
i
=
1,2,
...
,N'.
I}
'
)='1
The matrix N has
R
=
(N'
-
M)
linearly independent colurnns and
is
related
to
the formula matrix
A
by
N'
k
=
1,2,
,M
2:
akiv
ij
=
O;
(6.4-2)
j=
1,2,
,R
i=
Viewing the Gibbs function G as a function of the reaction-extent variables
~,

we
see
that the chemical equilibrium problem is that of minimizing
G(~).

The necessary conditions for this are the nonlinear equations
(cf.
equation
3.4-2)
aG
=0.
(6.4-3)
a~

\Ve have seen in Chapter 3
that
equation 6.4-3 is equivalent to the classical
chemical formulation of the equilibrium conditions (cf. equation
3.4-5)
âG
:::=
NTp.(~)

=
O.
(6.4-4)
Analogous to the discussion in Section 6.3,
we
rnay treat this formulation
of
the chemical equilibrium problem numerically from either the minimization
ar
the nonlinear equation point
of
·view.

141
140 Chemical Equilibrium Algorithms for
Ideal
S)'stems
Qne
of
the main differences between stoichiometric
and
nonstoichiometric
algorithms concerns
the
total
number
of
independent
variables
that
must
essentially be determined. Using equations 6.3-14
and
6.3-16 direct1y,
non­
stoichiometric a1gorithms incorporate the e1ement-abundance constraints
by
the introduction
of
an
additiona1 set of
M
variab1es (the Lagrange multipliers).
We
have seen
that
in
several such algorithms a new variab1e is
a1so
introduced
for each phase in
the
system. This results in a total of
(N'
+
M
+
'1T)
variables
altogether. When
the
phases
are ideal, this
number
is reduced to
(M
+
'1T).
In
the stoichiometric algorithms the
number
of
variables is always
N'
-lv!,
regardless of whether
the
phases are ideal. Thus, for nonideal systems,
the
stoichiometric algorithms always have fewer variables.
For
ideal systems with a
smal1 number
of
phases, the nonstoichiometric algorithms usually have fewer
variables.
For
problems involving single-species phases, stoichiometric a1gorithms
have certain numerical advantages over nonstoichiometric algorithms,
and
these are discussed in
Chapter
9.
We
note that
the
mere
appearance of stoichiometric coefficients in an
algorithm does
not
justify
classifying
it
as a stoichiometric algorithm
in
terms
of
the classification schemes presented in Section 6.L
For
example,
the
Brinkley algorithm uses stoichiometric coefficients,
but
it does so only in
an
incidental way,
and
hence we
do
not classify
it
as a stoichiometric algorithm.
A
number
of
general-purpose algoríthms have appeared in the líterature
using the stoichiometric formulation.
One
of
the first
of
these was that
due
to
N
aphtali (1959, 1960, 1961), who suggested using a first-order method to
minimize
G(~).

At
about
the same time Villars (1959, 1960) devised
an
a1gorithm for solving
the
set
of
nonlínear equations 6.4-4. Cruise (1964)
subsequently made severa1 improvements to this algorithm. Smith (1966)
and
Smith and Missen (1968) reformulated the Villars-Cruise algorithm as a
minimization method, resulting in improved convergence properties. Hutchison
(1962) suggested the use
of
the Newton-Raphson method in equations 6.4-4.
This approach has also been suggested by Stone (1966) and
by
Bos
and
Meerschoek (1972).
The
coefficient matrix
of
the linear equations in the
algorithm
is
usually
so
large, however,
that
the method is rather unwieldy
and
apparently has
not
been
widely used. Finally, Meissner et
aI.
(1969) have
discussed an
approach
that
is very similar to the Villars algorithm. We consider
each
of
these in
turn
in
more'
detail.
Other stoichiometric methods, not discussed in detai1 here, have
a150
ap­
peared in the literaturc.
For
example, Sanderson
and
Chien (1973) have used
Marquardt's a1gorithm
(Marquardt,
1963) to solve equations 6.4-4.
6.4.2 First-Order Algorithm
Stoichiometric Algorithms adjusted by amounts
ôf"
where
Ô~)m)

= _ (
3G
)<m
1
a~.

=
_!1G<m)
/ J
.TV' ~

p
..
II(m).
..i:J
IJr-"1
,
j=
1,2,
...
,R.
(6.4-5)
i=
The
mole numbers are adjusted by means of equation 6.4-1. This algorithm
has been found to converge
rather
slowly, especially
near
the solution, as
ís
characteristic of first-order optimization methods in general.
lt
hence does not
appear
to be widely used.
6.4.3 Second-Order Algorithm
HutchisOIl (1962)
and
others (Stone, 1966;
Bos
and Meerschoek, 1972) have
suggested applying the Newlon-Raphson method to cquations
6.4-4.
This
yields
ô~(m)

= _ (
a
2
e )
-)
(
aG
)
(6.4-6)
ae
.
"(no]
(lf,
n(no)'
This approach requires the solutíon
of
a set of
R=
(N'
-
M)
linear equations
on
each iteration. Since
lJ'
is
usually large compared with
M,
the numerical
solution
af
these linear equations can be a very time-consuming scgment of the
algorilhm. Thus
this
approach
does not appear to have been widely used as a
general-purpose method,
but
we have used it in Chapter
4
for relatively simple
systems. Ma
and
Shipman (1972) have developed a
method
that uses the
first-order algorithm in the il1itial stages
and
the second-order a1gorithm
in
the
final stages. The next
approach
to be discussed
is
re1ated
to
equations 6.4-6
anà
is
essentially a
way
of
reducing the labor involved in
the
solution
af
the
linear equations.
6.4.4
Optimized
Stoichiometry-
The
ViUars-Cruise-Smith (VCS)
Algorithm
The
Villars-Cruise-Smith (VCS) algorithm
is
intermediate between a first-
and
second-order method.
The
algorithm begins with equation 6.4-6.
In
the case
of
a
single ideal phase, the Hessian matrix
(a
2G
/ae)
is
given
by
a
2e a
('
)
N'­
a~í

a~j

=
a~j

.
!c~i

PkiJ.Lk

N'
N'
(
0kl
1
I).
Naphtaii
(1959, 1960, 1961) suggested use
of
the
first-order method, discussed
i,
j =
1,2,
...
,
R,
(6.4-7)
=
RT
2:2:
vkivl.l

~-;

-;;
,
in Section 5.2.1.1, for minimizing
G(
~).

The
variables
t
at each iteration are
ko:=
I={

143
142
O1emical Equilibrium Algorithms for Ideal Systems
where
8
kl
is the Kronecker delta. We may rewrite equation 6.4-7 as
N'

_1_
~

=
~

Pk;Jl
kj
_ JliPj 㬁
i,j=I,2,
...
,R,
(6.4-8)
RT
a~i

a~j

k=1
n
k
n
l
where
N'
Vi
=
~

P
ki

(6.4-9)
k=1
We recall from Chapter
2
that
we
have considerable freedom
in
choosing
the stoichiometric matrix
N.
If
we can make use of this freedom to choose
N
so
that the Hessian matrix in equation 6.4-7 is easily inverted, the
useof
equation
6.4-6 is very attractive.
For
example, if
we
can make the first terms
in
equation
6.4-8
vanish for
i
=F
j,
the Hessian is easily inverted in closed
formo
We
can, in fact, choose
N
in this way by choosing
{Vj}
so that
N'
JlkiJlkj
_
j)
..
'
(6.4-10)
~

---;;;:-
-
I)
,
k=t
thal is.
{Jj}
is
orthonormal with respect to the inner product and vector norms,
N'
Vi

,,:
=
~

JJkiJJ
kj
)
~

.-
(6.4-11)
k=l
n
k
_and
N'
2)
1/2
11",.11
=
(
~

JJ
ki
,
(6.4-12)
k=l
n
k
respectively. Although it is possible in principIe to compute
{v}
in this way,
it
is probably
not
very useful since
we
would have to recalculate the
N
X
R
matrix N
on
each iteration, corresponding to each new composition
n(
m).
The VCS algorithm essentíally makes a compromise between computing N
in this way
on
each iteratíon and computing N onIy once
at
the beginning of
the procedure. We
note
that if
our
stoichiometric matrix is in canonical form,
the product
JJkiJJ
kj
for
i
=F
j
is
zero when
k
refers to a noncomponent species
(k
>
M)
since each noncomponent species has a nonzero stoichiometric coeffi­
cient only in
one
stoichiometric vector.
When
i
=
j,
JJkiJJ
kj
=
1 for such
k
values. The entries
of
the Hessian matrix are thus, numbering the
component
species from 1 to
M
and
the noncomponent species from
(M
+
1)
to
N',
I
a
2
G
j)íj
~

"kiJlkj
viv
j •
--+
~
----
i,
j =
1,
2,
...
,
R. (
6.4-13)
RT
ata~j

n
j
+
M
/(=1
n
k
n
r '
Stoiehiollletric Algorithms Ir
we choose the component species to
be
those with the largest mole numbers,
this tends to make the second term
on
the right side
of
equation 6.4-13 small
and
the first term large. The last term vanishes if either
Vi
or
v
j
vanishes,
and
in
any event it is often smallcompared with the first term because of the presence
of
n
t
in the denominator.
If
we
form the N matrix in this way, we may make the reasonable
approximation that the Hessian matrix may
be
considered to be diagonal,
and
we invert it directly to give
2 )
-·1
(
M
2
-2
) - I
RT~

~_I_+~"'ki_!!.i..-
j)ij'
(6.4-14)
(
a~ia~j

ni+M
k~1

nk n
t
{In
the literature (Villars,
1959,
1960;
Cruise,
1964;
Smith,
1966;
Smith
and
Missen,
1968),
a further approximation
is
usually made by neglecting the term
involving
Vi']
The VCS algorithm for a single ideal phase thus consists
of
using
equatiün 6.4-6 with 6.4-14 and iteratively adjusts each stoichiometric equation
by
an
amount
M2
--2
J
-1
j)t(m)
= _
1
~

Jlk]

6.G(m)
ç]
_.
_
+
--.L

(
n
j
+
M
k=1
n/n)
til
RT'

(m)
( -
j
=
1,2,
..
.
,R.
(6.4-15)
On
each iteration the species mole numbers are exam.ined to ensure that the
component species are those with the largest mole numbers.
lf
this is not the
case, a new stoichiometric matrix
is
calculated.
In
the case of
an
ideal multiphase system, equation
6.4-15
becomes
(
[0*
M
.,,2
0*
J+M,a
~

k;
Áa
1---+;-­
-
l1ím)
...
n(m)
j+M
k=l
Á
TT
m
N'
(vo
)21-
1
ÂGí
m
)
~
~

kJ
ka
)
,
~
---
--­
o~(m)=

a~lk=1

tI'a
RT
(6.4-16)
J
(provided that at least one species for which J/
kj
=I:-
O
is in a multispecies phase)
6.G{m)
-
~
T (
otherwise)
Here
a::
denotes a phase. The value of
oZa
is ullity if species
k
is in
any
multispecies phase
(X
and
is zero otherwise,
and
0ka
is unity
if
species
k
is in the

144
145
Chemical Equilibriurn AIgorithms
for
Ideal
S)'stems
particular multispecies phase
a
and is zero otherwise. We remark that lhe VCS
algorithm is well suited to handle multiphase problems, especialIy those
involving single-species phases, such as arise
in
metallurgical applications. Tlús
is due
to
the
fact that the nonnegativity constraints
on
the species mole
numbers
are
easily handled in this algorithm (as opposed, e.g.,
to
the
BNR
algorithm discussed
in
Section
6.3).
We discuss the treatment
of
the nonnega­
tivity constraints
in
detail in Chapter
9.
The
foregoing description
of
the VCS algorithm is essentially that due to
Smith
(1966).
However, historically this aIgorithm was
not
originally viewed
as
a free-energy-minimization method, but as a method for solving
the
nonlinear
equations represented
by
the classical equilibrium conditions
of
equation
6.4-4.
Villars
(1959,
1960)
originally proposed the use of equation
6.4-15
using an
arbitrarily chosen N matrix.
He
also adjusted each individual stoichiometric
equation
in
tum
and
recomputed the system composition before adjusting the
next equation.
He
viewed this approach as a way
of
using the Newton-Raphson
method
on
the
equilibrium conditions, adjusting the stoichiometric equatíons
one
at
a time.
The
analogous method for a single stoichiometric equation had
been proposed by Deming
(1930).
In
the approach due to Meissner et
a!.
(1969) each main iteration consists of bringing the reactions
one
at
a time
exactly,
rather
than
approximately, to equilibrium. Cruise
(1964)
incorporated
the optimized choice
of
N described previously, based
on
earlier work of
Browne
et
alo
(1960).
Cruise also advocated the simultaneous adjustment of all
stoichiometric equations by means of equation
6.4-15
on each iteration before
recomputing the system composition. He found that these two modifications to
Villars'
method
resulted in substantial improvements in computing speed and
convergenee. Finally, Smith (1966) and Smith
and
Missen (1968) reformulated
the method as a minimization algorithm and incorporated the step-size param­
eler
<..l.
This
minimization point of
view
resulted in
an
algorithm that
is
both
rapid
and
free
of
eonvergence problems.
We
remark
in conclusion that the VCS algorithm is a descent method of
I
minimization since, for a single ideal phase,
I
N'
2
-2
N'
( - )
2
I
1
a
2
G
"kJ"J
"kj"j
l
--
~
---=
~

n
k
---
>0,
(6.4-17)
RT
ae
k=l
nk
n
t
k=1
nk n
t
J
and
equation
6.4-15
lhus yields
on
each iteration
-1
R
âG
2
a
2
G
~

O.
(6.4-18)
w(m)=o
)
(
d~7m)
)
j~'
(
a~j
)
,f.'
(a~J

R'.'
Stoichiometric Algorithrns on
each iteration. These equations ean have a singular or nearly singular
eoefficient matrix for some problems,
and
this can cause practical dífficulties.
The
VCS
algorithm avoids these. We discuss some examples of this type
of
difficulty
in
Chapter
9.
In Figure
6.5
a flow ehart is displayed for the VCS algorithm, as developed
here. A
FORTRANcomputer
program that implements this algorithm
is
given
in
Appendix D.
Compute
s~rametef'
(,,)(m
I
~

r
!
,
0(",+11_
0
'",1
+(,,)("'1
N6~~

Qne
significant eomputational advahtage of lhis algorithm is the fact thar
there
are
no
linear equations to solve on each iteration.
We
recall
that
the
BNR
figure 6.5
Flowchart
for the VCS
algorithm for an ideal system requires the solution
of
(M
+
11')
linear equations
algorithm.

146 Otemical Equilibrium Algorithms for Ideal Systems 6.4.5 lIIustrative Example for the
VCS
Algorithm
Example 6.2 We illustrate the use
of
the
VCS algorithm by means
of
the
system
described in Example
6.1
(White et aI., 1958). The input
data
file is the
same
as for the
BNR
algorithm (Figure
6.3)-see
User's Guide
in Appendix D.
The
output
is shown in Figure 6.6. Convergence
is
achieved after
17
iterations,
during
wh:ich the stoichiometric matrix is calculated twice. Although the
number
of
iterations (17)
is
greater than in Example
6.1
(8),
the total
VCS CALCULATION
METHOO
HYORAZINE
COMBUSTION
10
SPECIES
3
ELEMENTS
3
COMPONENTS
10
PHASE1
SPECIES
O PHASE2
5PECIES
O SINGLE
SPECIES
PHASES
PRESSURE
51.000
䅔䴁
TEMPERATURE
3500.000

PHASE1 INERTS
〮、
ELEMENTAL
ABUNDANCES
CORRECT
FROM
ESTIMATE
H
2.000000000000D
00
2.000000000000D
00
N
1.0000000000000
00
1.000000000000D
00
o
1.0000000000000
00
1.0000000000000
00
USER ESTlMATE
OF
䕑啉䱉䉒䥕䴁
STAN.
CREM.
POT.
15
䵕⽒吁
SPECIES
FORMULA
VECTOR
STAN.
CREM.
PüT.
EQU1LIBRIUM
EST.
H N
o
SI
牉⤁
H20
2
o
1 ㄁
-3.798600
Dl
5.000000-01
N2
o
2
o
1
-2.865300
01
㌮㔰〰〰ⴰ㄁
82
2
o
O 1
-2.109600
OI
3.')0000C-01­
N
O 1
o
1
-9.846000
00
ㄮ〰〰〱㨺ⴰ㄁
H 1
o o
1
-1.002100
01
ㄮ〰〰〰ⴰ㄁
NH
1 1
o
1
-1.89180D
01
氮〰〰〰ⴰ㄁
NO
o
1 1 1
-2.803200
Ol.
1.000000-01
O
o o
1 1
-1.464000
01
1.000000-01
02
O
o
2 1
-3.05940D
01
1.00000D-Ol
OH
1
O
11
-2.611100
01
1.000000-01
ITERATIONS
=
ㄷĠ
EVALUATIONS
OF
STOICHIOMETRY

SPECIES
EQUILIBRIUM
MOLES
MOLE
FRACTION DG/RT REAC'rION
H20
7.83141530-01
㐮㜷㤷㜸ㅄⴰ㄁
H2
1.
477
37
390-01
㤮〱㘹ㄳ㙄ⴰ㈁
N2
4.852-46220-01
㈮㤶ㄶ㈲㄰ⴰ㄁
OH
9.6876244D-02
5.9126854D-02
ⴳ⸳㈲㠰ⴰ㜁
H
4.0672719D-02
2.48239390-02
㈮㤳ㄶ〭〸Ġ
〲Ġ
3.7316404D-02
2.2775466D-02
ⴲ⸳㐴㡄ⴱ㈁
NO
2.7400034D-02
1.6723169D-02
ⴴ⸴㜱㄰ⴰ㜁
o
1.79493820-02
l.Ü955116D-02
ⴲ⸰㤱㄰ⴰ㜁
N
1.4143465D-03
8.6322362D-04
㈮㐸㈱〭〸Ġ
NH
6.93187730-04
4.2307596D-04
ⴷ⸹㤹㌰ⴰ㜁
G/RT
=
-4.7761377D
01
TOTAL PRASE 1
MOLES
=
1.63840
00
ELEMENTAL
ABUNOANCES
H
2.000000000
00
N
1.
000000000
00
o
1.00000000D
00
Compositíon Variables
Other
Than Mole Fraction
147
computation time
is
about the same in
both
cases. The results calcu1ated in trus
example agree with those in Example
6.1
to
within five significant figures.
Finally, each number below
"DG/RT
REACTION"
gives
!J.GjRT
for the
stoichiometric equation in which one mole
of
the indicated species is formed
from the first three species
(H
2
0,
H
2
,
and
N
2
)
as components.
6.5
COMPOSITION
VARIABLES
OTHER
THAN
MOLE
FRACTION
For
the algorithms in Chapters
4
and 6, we have expressed the composition in
terms of mole fractioll. The computer programs in the appendixes also use
mole fraction as the composition variable. This
is
appropriate for gaseous
systems and solutions of nonelectrolytes,
but
for solutions of electrolytes (e.g.,
aqueous solutiolls
of
acids, bases,
and
salts), the composition
is
usually
expressed in molality
or
molarity, as described in Chapter
3.
In this section
we
describe how the algorithms must be modified to consider problems involving
such systems.
For
the
RAND
algorithm, the equations corresponding to equations
6.3-24
to 6.3-27 must be rederived. We leave this as
an
exercise in Problem 6.9. For
the
VCS
algorithm, the only change
that
must be made
in
the computer
program in Appendix D
is
to calculate the chemical potential in the ap­
propriate way in the subroutine DFE.
We
illustrate how this
is
done by means
of
an example ffom Denbigh (1981, p.
328).
Example 6.3 Consider the system {(CI
2
(g),
C1
2
(
n,
H
+
(n,
CI-
(r).
HCIOU).
CIO-(r),
H
2
0(P»,
(CI.
H,
O,p)}
resulting from bubbling
Clig)
at a partial
pressure of
0.5
atm through watcr at 25°C. Calculate the concentrations
of
the
species
in
the liquid (aqueous) phase, if the solution
is
ideal, and the standard
frec energics of formatioll, in
kJ
mole-I,
are AGi
=
(O.
6.90,
O,
-131.25,
-79.58,
-
27.20, -
236.65)T.
Solution
The chemical potentíal
of
H
2
0
is
given by /l[H
2
0(e)J =
L\.G/[H
2
0(f)]
+
RTln
X
H20
and
of each
of
the other species in the liquid phase
by /li
=
t!.G~

+
RTln
m,.;
for
CI
2
(g),
/l[Clig)]
=
~G/[Clig)]

+
RTln
PC1
'
In
2
subroutine
DFE
in Appendix D three
FORTRAN
statements are modified
as
follows. Statement number
11
is
replaced by
11
FE(I)
=
FF(I)
+
ALOG(Z(I») -ALOG(Z(I)*O.018016DO)
IF(I.EQ.l
)FE(I)
=
FF(I)
+
ALOG(Z(I» - Y
Statement number
21
is
replaced by
Figure 6.6 Computer output for Examp1e 6.2 from
VCS
algorithm
in Appendix
D.
21
FE(L)
=
FF(L)
+
ALOG(Z(L)
-ALOG(Z( I
)*O.ü18016Dü)

148
Chemical Equilibrium Algoritluns for Ideal
Systems
偲潢汥浳Ġ 149
Statement number
31
is replaced
by
偒佂䱅䵓Ƞ
31
FE(L)
=
FF(L)
+
ALOG(Z(L» -䅌佇⡚⠱⤪〮〱㠰ㄶ䑏⤂
6.1
Derive equations 6.3-28
to
6.3-30, the RAND algorithm for a 浵汴楰桡獥Ƞ
The
vector b
is
defined
by
nO[H
2
0(e)]
=
1000/18.016 by choosing
an
arbi­ ideal 獹獴敭⸂
trarily large initial amount
of
CI
2
(g) so that all
of
it does not dissolve {here 睥Ƞ
6.2 Show that, in 瑨攁 case
of
a multiphase ideal system, the working
choose
nO[CI
2
(g)]
=
I} and, finally, by the electroneutrality requirement.
Thus
equations of the Brinkley algorithm, corresponding to equations 6.3-45
b
=
(2.0, 2000/18.016, 1000/18.016,
O)T.
The computer output from the VCS
and 6.3-46, are
algorithm
is
shown
in
Figure 6.7.
For
the species in the liquid phase, 瑨攂
equilibrium mole numbers are virtually the molalities because of the choice
of
M
N'
✱吁
nO[H
2
°(e)].
~

~".".

n(m)~.I,~m)

+
~

q(m)v
=
q.
_
q(m).
j=I,2,
...
,M­
~
~

ik
Jk
k
❲椁
~

J(I.
(I.
J
J'
;=1
欽㄂
a=1
VCS
CALCULATION
METHOO
and
CHLORINE-SOLUTION
PROBLEM
THIS
SPECIES:CL2IG)
IS
THE
ONLY
GAS.
IT
WILL
THEREFORE
BE
TREATEO
AS
A
SOLIO.
M
N'
~

(m)i:'./,(m)
_ -
(m)
_
~

(m)
- • -
I 2
+
7 SPECIES 4
ELEMENTS
4
䍏䵐低䕎呓Ġ
~

qj
U'rj
nz(l.v(I. -n((I.
~

nkc'
nz(l.'
a
--
, ,
...
,7T's
7T'm'
o PHASEl SPECIES 6 PHASE2 SPECIES
1
SINGLE
SPECIES
PHASES
㬽㄂
k=l
PRESSURE
0.500
䅔䴁
6.3
Prove equation 6.4-17.
TEMPERATURE
298.150
K
PHASE2 INERTS
〮、
6.4
Determine the composition
at
equilibrium at 4000 K and
1.5
atm
of
the
ELEMENTAL
ABUNOANCES
CORRECT
FROM
䕓❲䥍䅔䔁
product stream resulting from the reaction of 1 mole of
CH
4
and 1 mole
CL
2.0000000000000
00
2.0000000000000
00
of
N
2
,
based on the following standard free energies of fonnation at
H
1.1101243339250
02
1.1101200000000
02
o
5.5506216696270
01
5.5506000000000
01
4000 K (in kJ mole-'
l
)
(JANAF,
1971):
P
0.0
1.387778780781a-17
USER
ESTlMATE
OF
EQUILIBRIUM
.."
..
.~
..
STAN.
CHEM.
POT. IN
䭊ⸯ䵏䱅Ġ
C(gr): O
CH
3
:
236.98 H:
-15.32
-C(g): 90.06
CH
4
:
352.08 H
2
:
SPECIES
FORMULA
噅䍔佒Ġ
~

STAN.
CHEM.
POT. EQUILI8RIUM
EST.
C
2
⡧⤺Ġ
°
80.41
CHN:
9.991
HN:
258.66
CL
H O P
SI
⡉⤂
H201L)
O
21
O

-2.366500
02
5.520600
〱Ġ
Cig):
21.46
CN:
41.56 H
2
N: 331.16
CL2IG)
2
OO 企 O
-l.
718250
00
6.000000-01
H+
(L)
O
1
O
㄁ ㈠
0.0
㔮〰〰〰ⴰ㄁
C
4
(g): 142.13 C
2
H
2
:
14.46
H
3
N: 411.06
CL-IL)
1
O O
ⴱĠ
2
-l.
312500
02
㌮〰〰〰ⴰ㄂
RCLOIL) 1 1 1
O 2
-7.958000
01
l.000000-01
Cs(g): 169.55 C
2
H
4
:
367.25
N: 210.77
CLO-(L) 1
o
1
ⴱĠ
2
-2.720000
01
2.000000-01
CL2(L)
2
o
O

2
6.900000
00
1.00000D-Ol
CH:
154.41
C
2
N
2
:
133.62 N2㨠 伂
ITERATIONS
=
10
CH
2
:
238.27 C
4
N
2
: ㄸ㜮㐴Ƞ
EVALUATIONS
OF
STOICHIOMETRY
=
SPECIES
EQUILIBRIUM
MOLES
MOLF:
FRACTION OG/R'I' REAC'I'ION
6.5 Extend Problem 4.5 by considering equilibrium involving the
慤摩瑩潮慬Ƞ
䠲〱䰩Ƞ
5.54815940
01
㤮㤸ㄱ㔲㔰ⴰ㄁
species: C(gr), C(g),
Cz{g),
Cig),
Cig),
Cs(g), CH(g), CHz{g),
CH
3
(g),
䍌㉉䜩Ġ
9.44479570-01
1.00000000
00
H+
⡌⤁
2.46228670-02
C
2
H(g), C
2
Hz{g),
C2Hig),
O(g), H(g), OH(g), and HOz{g). Additional
4.42966000-04
CL-
IL)
2.4622867D-02
4.42965980-04
standard free energies
of
formation (JANAF, 1971), in the order cited,
CL2IL)
3.08975660-02
5.55847980-04
-3.'1043D-06
RCLO
(L)
2.46228660-02
4.42965970-04
8.04560-09
are
(O,
479.87, 546.98, 497.52, 658.98, 653.79, 426.11, 325.68, ㄷㄮ㔵Ⰲ
䍌伭䥌⤁
6.65344810-10
1.19695700-11
-4.70700-06
282.87, 143.00, 160.10, 154.93, 136.61,
16.90,
92.03)T,
in
kJ
mole--
1

G/RT
=
-5.29972110
〳Ƞ
TOTAL
PHASE2
MOLES
=
5.55860
o
䨮Ƞ
6.6 Ethylene can be made in a tubular reactor
by
the dehydrogenation
of
䕌䕍䕎呁䰁
ABUNOANCES
CL
2.000000000
00
ethane, with oudet conditions of about
1100
K and 2.0 atm. 卵灰潳攂
R
1.110124330
〲Ƞ
that the feed consists
of
steam (assume it to be inert) and ethane
in
the
O
5.550621670
〱Ƞ
p
7.18250180D-19
ratio 0.4 mole of steam
per
mole
of
ethane, and that the composition
潦Ƞ
Figure 6.7 Computer
output
for Example
6.3
from VCS algorithm in Appendix D.
the product stream
on
a steam-free basis
is
36.0 mole
%
H 2,
11.7%
CH
4

152
Chemical Equilibrium AlgQrithms
for
Ideal Systems
(d) Solubility
of
CaCO); system is
{(CaC0
(s, calcite), CaC0J<
n,
3
H
2
C0
3
(e),
HCO;
(e),
COf-
(e),
Ca
2
+
(e),
CO
(e),
H 0(C),
H+
(e),
2
2
OH-(e»,
(Ca,
C,
H, O)};
I1.GI
=(-1128.8,
-1081.4,
-623.2,
-586.8, -527.9,
-.
553.54, -385.0, -237.18,
O,
-157.29)T.
Note:
The
standard
free energies
of
formation are in
kJ
mole- "
and
for
dissolved species indicated by
(O,
other
than
H
2
0(e),
refer
to
the
infinitely
dilute
standard
state usually denoted
by
(aq).
Data
are from
Wagman
et
aI.
(1965-1973).
6.12 Consider
the
system described in Problem
4.10
with
the
additional
species C
2
H
5
0H(g),
CH
3
COOH(g),
CH
3
COOC
2
H
s
(g),
and
H
2
0(g).
Calculate
the
equilibrium composition
at
358
K
and
0.9
atm
with the
assumption
that
both
phases are ideal (vapor phase is
an
ideal-gas
so]ution,
and
liquid phase
is
an ideal solution). (We
note
that the
assumption is
not
a good one for the liquid phase, as indicated
by
the
existence
of
a ternary azeotrope involving ethyl alcohol, ethyl acetate,
and
water.)
At
358
K
the vapor pressures
of
the four substances are
1.286, 0.327, 1.299,
and
0.567
atm, respectively.
6.13 *Suppose
that
the product from a cru
de
styrene
unit
consists
of
2 mole
%
benzene
(C
6
H
6
),
3%
toluene (C
7
Hg),
45%
styrene (CgHg),
and
50%
ethyJbenzene (CgH
IO
)
and
enters a vacuum distillation column
for
separation between toluene and ethylbenzene.
If
the stream is
at
30°C
and
0.0]
5
atm,
what is the composition
of
each
of
the two phases (liquid
and
vapor) present?
At
30°C
the vapor pressures are
0.1570, 0.0482,
0.0166,
and
0.0109
atm, respectively. Assume that the
vapor
phase is an
ideal-gas solution,
that
the liquid phase
is
an ideal solution,
and
that
only
phase equilibrium
is
involved.
(In
solving this problem, consider
the
implications
of
the restriction to phase equilibrium with regard to
free-energy
data
for the individual species imd
an
appropriate formula
matiix
for
the
system, as discussed
in
Section
2.4.5.)
'"Because
of
lhe
assumptions made, this problem can be reduced to the solution
of
one
nonlinear
equation
in
one l.lnknown. Thus
it
does not require
an
elaborate algorithm for its solution.
However,
it
iHustrates
how
such a problem can bc solved
by
a general proccdure,
and
if
the phases
were nonic.eal (see
Chapter
7), the reduction could
not
be achieved.
CHAPTER SEVEN
Chemical Equilibrium AIgorithms
for
Nonideal Systems
In
Chapters 4 and 6
we
presented algorithms for systems involving phases that
are
either pure species
or
ideal solutions, íncluding the special case for
the
latter
of
ideal-gas solutions. In this chapter we see how the general-purpose
algorithms presented
in.
Chapter
6
may be
adapted
for use when
the
assump­
tion
of ideal-solution behavior
is
not
appropriate.We
first
discU5S
in
general
terms the conditions and types
of
system for which nonideal behavior must
be
taken into account. We then prcsent further commcnts
on
lhe determination
and
representation
of
the chemical potential
of
a species in
a
nonideal solution,
as
a continuation
of
Section
3.7;
finally, we consider
the
basic structure
of
appropriate algúrithms, presenting three approaches to the problem.
7.
t
mE
TRAN81TION
FROM
iDEALITY
TO
NONIDEALIIT
As
has
been emphasized
in
previous chapters,
to
solve
the
equations expressing
the
conditions for equilibrium, we must have an appropriate expression for the
chemical potential
of
each species that relates it
to
composition, in addition
to
temperature and pressure.
The chemical potential for a species in
an
ideal solution given, for example,
by
1J.;(T,
P,
xJ
=
p,7(T,
P)
+
RTln
X;,
(3.7-l5a)
depends only
on
(the measure of) its own composition
(x;
in equation
3.7-15a)
and
not
on
the composition
of
other species
in
the solution. This applies
regardless of whether ideaiity is based on
the
Raoult
convention
or
the
Henry
convention and regardless of the particular variable used
toexpress
composi­
tion. This makes possible the construction
of
algorithms for lhe calculation
of
equilibrium whose relatively simple forros
are
due
to the fact that
{;p,Jan;
can
be
written
as
a simple analytical expression. ;
153

154
155
Chemical Equilibrium Algorithms for Nonideal
Systems
The chemical potential for a species in a nonideal solution given, for
example, by
pAT,
P,x)
=
p.f(T,
P)
+
RTln
Yj(T,
P,
x)x
j'
(3.7-29)
depends
on
composition in general, as reflected in the dependence
of
the
activity coefficient
Yi'
This dependence may be complex and difficult
to
represent even when considerable experimental information
is
available [see
Prausnitz (1969) for
ao
extensive discussion
of
the phenomenological behavior
and
treatment
of
activity coefficients].
In
principie, the accurate prediction
of
lhe composilional dependence
of
the chemical potential
of
a species is a
problem in statistical thermodynamics.
It
is only in relatively recent years
that
progress has been made in the statistical mechanics
of
fluids, for example,
and
such approaches are
just
beginning to be used in the treatment
of
real fluids
(Rowlinson, 1969; Reed
and
Gubbins,
1973).
Although we do not distinguish between phase equilibrium
and
reaction
equilibrium, as lhe terros are commonly used, we
note
that
much
of
the work
devoted to the treatment
of
nonideal behavior has been done in the context
of
single phases
and
phase equilibrium, without the consequences
of
"chemical
reaction" being taken ioto account. Relatively little attention has been paid to
the
general
problem
of
determining chemical equilibrium (both intra-
and
interphase) in systems made
up
of
nonideal solutions.
In considering the breakdown
of
ideal behavior as
an
appropriate assump­
tion,
we
should distinguish between the transitions
(l)
from ideal-gas
to
non-ideal-gas behavior
and
(2) from ideal-solution to non-ideal-solution behav­
ior.
The
former occurs as the density
of
the gas increases from a relatively low
value, as a result of either increasing pressure, decreasing temperature
Of
both.
Even
at
relatively high density, however, a non-ideal-gas mixture may
be
essentially an ideal solution.
It
is in liquid
and
solid solutions that we must be
mos! conscious
of
the likelihood
of
nonideal, rather than ideal, solution
behavior. In qualitative terms, the key to this likelihood lies in the loosely
defined term "chemicaJ similarity."
For
example, a solution of chemically
similar pentane
and
hexane, which are adjacent members of
an
homologous
series of hydrocarbons, may
be
considered to
be
virtually ideal,
but
if
one
of
the two
is
replaced by the dissimilar species methyl alcohol, lhe resulting
solution
is
very nonideal (Tenn
and
Missen, 1963).
For
nonideal solutions, since
p.
is
often a very complex function
of
composi­
tion, this results, in tum, in complex expressions for
3p.j3n

This complexity
J
destroys the relatively simple forms
of
the algorithms obtained for ideal
systems in Chapters 4
and
6.
Before examining the structure
of
algorithms for nonideal systems, we
consider further, following Section 3.7, the representation of the chemical
potentiaI for nonideai systems.
Further Discussion of Chemical Potentials in Nonideal Systcms 7.2
FURTHER
DISCUSSION
OF
CHEMICAL
POTENTIALS
IN
NONIDEAL
SYSTEMS
In this section
we
amplify
lhe
very brief comments given in Section 3.7.2.
The
chemical potential of a species in a solution
is
determined ultimately by the
nature of the intermolecular forces among the molecules.
AlI
thermodynamic
properties may
be
calculated in principIe from these forces by the methods of
statistical mechanics (Reed
and
Gubbins, 1973). The difficulties are formida­
ble, however, in the present state of knowledge. Not only is the precise nature
of these forces usually unknown,
but
also, even given such knowledge, the
exact numerical calculation
of
the properties
is
often impossible. Any reasona­
bly accurate solutions to this problem must involve approximations in terms of
both these aspects.
In face
of
these difficulties, most chemical potential information has been
obtained from macroscopic experimental data, guided, in the sense of correla­
tion and prediction, where possible, by the more fundamental approach, which
attempts to solve the statistical mechanical problem approximately for ap­
proximate intermolecular potential models. We outline three approaches: use
of excess free-energy expressions, equations
of
state.
and
corresponding states
theory. We then consider separately lhe case
of
electrolytes.
7.2.1
Us(~

of
Excess Free-Energy Expressions
For liquid solutions
of
nonelectrolytes, chemical-potential information
is
com­
monly given in terms
of
the molar cxcess frce energy
(gLo)
of
the solution
or
the activity coefficient
of
cach speci.es (see Section 3.7.2 for the definition of an
excess function).
The
former provides a convenient summary for all species,
and the interrelationships are as follows:
J.I.;;
=:;
RTln
Yi'
(7.2-1)
where
Ilr
is
the excess chemical potential of species
i
and
N
gE
=
L
XJtr.
(7.2-2)
j=l
The activity coefficient may
be
calculated from
gE
by means
of
an equation
analogous
to
equation 3.7-34:
E_
E_
~

X
(
_agE)
(7.2-3)
RTln
Y
,
=
ILi
-
g
j~j

J
dX
T.
P.
X","j
J
The compositional dependence
of
g
E
or
Y
I
is
often given by means
of
an
empirical
Oi
semiempirical correlation
af
experimental data.
The
temperature

156
Chemical Equilibrium Algorithms
for
Nonideal Systems
and pressure dependence
and
the Gibbs-Duhem relation are given
by
equa­
tions analogous
to
equations 3.2-10 to 3.2-17. We consider some of the
commonly used correlations for
gE
for binary systems; the extension to
multispecies systems may have to be done
on
an
ad hoc basis. More elaborate
methods,
not
described here, are
used.
by Prausnitz et
alo
(1980) in computing
vapor-liquid
and
liquid-liquid equílibria; see also Skjold-Jl1Srgensen et
aI.
(1982). 7.1.1.1
Power-Series Expansion
o{
gE
/x.x
2
An
example
of
the power-series expansion
of
gE
/X
1
X
2
is given
by
the
equation
of
Redlich
and
Kister (1948):
E k
~-
=
L
ak(T,
p)(X
1
-X
2
) ,
(7.2-4)
X 1X 2
k~O

where the
Qk
's
are
parameters deterrnined from experimental data
and
x
I
and
x
2
are
the
mole fractions
of
species I
and
2,
respective1y. Application of
equation 7.2-3 to equation 7.2-4 results
in
the power-series expansions
of
In)'1
and In)'2
that
are due to Margules (l895).
7.1.1.2
Power-Series Expansion o{
(gE
/X.X
2
)-1
The reciprocal
of
gE
/X
1X
2
may also be represented by a power-series expan­
sion (Vau Ness, 1959; Otterstedt
and
Missen, 1962):
(
L)-I
~bk(T,P)(XI-X2)k,

(7.2-5)
.x
t
x
2
k;;.O
where the
b
k
's are parameters determined from experimental data. The
first-order form
of
this leads
to
the van Laar equations for activity coefficients
(van Laar, 1910)
on
application of equation 7.2-3.
7.2.1.3 11te
Wohl
Expansion
The equation of Wohl (1946) is
gE
=
2a
z -
+
3
2
x1ql
+
x
Q2

12
1'"2
a
l12
z l z2
+
3a
l22
z)zi
2
+4a
II12
Z?Z2
+
4a
l2
22
Z
j
zi
+
6al122z~zi

+ ... ,
(7.2-6)
Further
Discussion of Chemical Potentials in Nonideal
Systems
157
where
q
is an effective volume parameter,
x1ql
(7.2-7)
ZI
=
x1ql
-1-
x
2
Q2
'
X2
Q2
(7.2-8)
Z2
=
x1ql
+
x2q2 '
and
the
a
's
are interaction parameters, the subscripts to which indicate the
nature and number of molecules involved in a particular interaction. Both the
Margules
and
van Laar equations can be obtained as special cases of the WohI
equation. The equation can also be extended to multispecies systems.
7.2.1.4 The Wilson Equation The
equation given
by
Wilson (1964) is
gE _ RT
-
-xlln(x
l
+
A
12
x
2
) -
x
2
ln(x
2
+
A
21
x
1
),
(7.2-9)
where
V2 [

--
À
)]
A
=
-exp
-
12
II
(7.2-10)
12
VI
RT'
V"
l

=
---!.exp
-
À
2J]
A
21
-
12 -
(7.2-11 )
v
2
RT'
and
V
I
and
v
2
are the molar volumes of pure (liquid) species I
and
2,
respectively, and the
À's
are interaction energies. This equation can also be
extended to multispecies systems.
7.2.1.5
lhe
Regular-Solution Equation
The concept of a regular solution (Hildebrand
et
aI.,
1970)
provides the
following expression for
gE:
gE
=
V(Íl!<P2
A
)2,
(7.2-12)
where
v
=
XIV)
+
X
2
V
2
'
(7.2-13)
1>1
and
4>2
are volume fractions of species
1
and
2,
respectively, with, for

158
159
Cbemical Equilibrium Algorithms for Nonidea Systems
example.
XlVI
</>1
=
(7.2-14)
-V
and
=
(SI -
S2)2.
(7.2-15)
A
12
ô
is the solubility parameter
and
is
formally defined as the square root of the
cohesive-energy density
of
the
species~

thus, for species
1,
va
01
=
(_~_,'
)'/2
~

(_!1_H......:
1
_
:_
_-_R_T)
1/2,
(7.2-16)
I
where
j,u
is
the cohesive energy. which is approximately equal to the energy
of
vaporization
(ó'Hvap
--
RT).
7.2.2. Use ofEquations of State The
fugacity
J;
of
a species in a solution, whether gas, liquid, or solid, can be
determined,
in principIe. from
PvTx
(volumetric) information by means
of
equation
3.7-32 (Prausnitz, 1969, p. 30),
h
JP(
-
RT)
(3.7-32)
RTln
xiP
=
o
Vi
-
P
dP.
The
activity coefficient
Yi
of
the species
is
related to the fugacity by (Vall Ness,
1964,p.31)
J;
(7.2-17)
Y
l
=
x1f;*'
where
/;*.
lhe fugacity
of
species
i
in the
standard
state,
is
similarly determined,
for
example, from equation 3.7-7.
It
follows
that
Yi
can
be determined from
volumetric
data by, in the case
of
a gaseous system, 1
P -
Yi
=
exp
[
RT
~

(Vi -
V:)
dPJ,
(7.2-18)
where
ct
is the molar volume
of
species
i
in the
standard
state [for the Raoult
convention,
it
is
the pure-cQmponent molar volume
at
(T.
P),
and
for
the
Henry
convention, it
is
the partial molar volume
at
infinite dilution at
(T,
P)].
Thus,
in principIe, it
is
possible
to
determine the chemical potentia1
of
a species
Further Discussioll oI Chemical Potentials
in
Nonideal Systems
in solution from volumetric
data
for
the
solution since
(3.7-29)
/li
=
/li
+
RTln
Y;x
i•
This procedure is limited by
the
requirement that the volumetric data be
available as a function
of
T, P,
and
x. This, in turn, requires
either
a very large
amount of experimental
data
or
an
appropriate equation
of
state,
<p(P,
v,
T,x)
=
O,
(7.2-19)
the form
of
which must be
obtained
from experimental
data
or
a theoretical .
model.
If
<p
is
volume explicit, it
is
convenient
to
use
equation
3.7-32.
If
<p
is
pressure explicit, it is more convenient
to
use the equivalent form (Prausnitz,
1969,
p.
41)
J;
oo[/ap)
RT]
I
RTln-'
=
f
1-
--
dV-RTlnz,
(7.2-20)
xiP
v
an;
T,
v,
li}""
V
1
where z
is
the compressibility factor defined by
PV
(7.2-21)
z
=
n/RT'
I I
In
spite
of
the limitations
notOO,
we briefly outline three of the most widely
used equations of state.
1 I
7.2.2./
The
Virial Equation
I i
The pressure-explicit (Leiden) form
of
the virial equation is
z
=
Pv
=
1
+
8(T,
x)
+
C(T,
x)
+ . "
(7.2-22)
RT
v
d '
where
B,
C,
...
are caUed the second, third,
...
viria1
coefficients.
The
composi­
tional dependence of the n
th
virial coefficient is ageneralized n th-degree linear
form in the mole fractions (Mason
and
Spurling, 1969, p. 57).
That
is,
B
=
L:
xixjB
i)
(7.2-23)
i.
)
and
(7.2-24)
c
=
L:
XiXjXkCi)k'
I
i.j.k
I I

161
160
OtemicaJ Equilibrium Algorithms
for
Nonideal Systems
Although
B
ij
,
C
jjk
,.
• •
are detenninable in principIe
from
intermolecular
potential functions, these are rarely known accurately except for the simplest
of
molecules.
The
virial coefficients for pure species can be obtained experi­
mental1y
from
volumetric data,
but
those for species in solutions are rarely
available.
It
is thus usually necessary to postulate "mixing mIes" relating the
virial coefficients
of
the solution to those of the pure species (Mason and
Spurling,
1969,
pp. 257-265).
Equation 7.2-22 may
be
inverted to give the volume-explicit (Berlin) form
of
the virial equation (Putnam and Kilpatrick,
1953).
The main disadvantage of the virial equation
is
its inapplicability to high
densities (and hence to liquids).
7.2.2.2 The Redlich-Kwong Equation The equation
of
Redlich and Kwong
(1949)
is a two-parameter, pressure-ex­
plicit form:
Pv
v a
(7.2-25)
Z
=
RT
=
v -b -
RT
3/ 2(
v
+
b)
,
where
a
and
b
are the two parameters. There are no rigorous expressions
relating these parameters
to
x corresponding to equations 7.2-23 and 7.2-24,
and
arbitrary mixing ruIes must be used (Redlich and Kwong,
1949).
7.
2.
2..
i
lhe
Benedict-Webb-Rubin Equation
The equation of Benedict, Webb, and Rubin
(1940, 1942)
is
also
in
pressure­
expliciL
form and requires arbitrary mixing rules;
it
contains eight parameters:
RT
BoRT
-
Ao
+
Co
/T
2
bRT
-a
P=-+
+--­
v
V2
V3
aa
c
1
+
"I (
-"I)
+-+-----exp
-
(7.2-26)
v6
T
2 3
v2
V2'
v
This equation has been widely used for liquid-vapor equilibrium
in
líght
hydrocarbon systems (Benedict et
aI.,
1951),
and values
of
the parameters are
available for a number
of
species (Holub and Vonka,
1976,
Appendix
li).
7.2.3
Use
of Corresponding
States
Theory
The theory of corresponding states provides an alternative, gencrally less
precise, approach to determining information about chemical potentials from
volumetric
data
[for a review, see Mentrer
et
alo
(1980)].
This approach is often
useful when insufficient data are available to use the methods of the previous
two sections. The theory has a rigorous statistical mechanical basis for simple
Further
Discussion
of
ChemicalPotentials in Nonideal
Systems
species with spherically symmetrical molecular force fields, such
as
argon
and
krypton (Pitzer,
1939).
For
these, in its simplest (two-parameter) macroscopic
form, the theory may be written as
(7.2-27)
z;(T
R
,
P
R
}
=
zo(T
R
,
P
R
),
where
Zi
is the compressibility factor of any species
i,
and
Zo
is
that of a
reference species;
T
and
P
R
are respectively the reduced temperature and
R
pressme defined
by
T
P
(7.2-27a)
T
R
=
Te'
P
R
=
Pc'
where
Te
and
Pc
are the criticai temperature and pressure, respectively, of
the
species. Equation 7.2-27 expresses the idea that any two species behave the
same volumetricaliy at the same reduced conditions of temperature and
pressure. This
is
only approximate for most species, however, but
it
can be
improved by the addition of
a
third parameter. Thus Pitzer
(1955)
and Pitzer et
aI.
(1955)
have introduced the
acentric factor
w
as a measure of the departure
from spherical symmetry and defined empirically by
(7.2-28)
w
=
-lOgIO(
~*

) - 1.000.
e
T
R
-=O.7
Tables of values of
w
and derived thermodynamic quantities
for
pUfe
species
("normal" fluids) are given by Lewis and Randall
(1961,
pp. 605-629).
Normal fluids are essentially nonpolar, and for polar species, an additional
parameter must be introduced.
The theory of corresponding states may be extended to solutions in
severa}
ways. One way
is
to assume that the properties
of
the solution are those
of
a
hypothetical fluid characterized
by
criticaI constants that depend
in
some way
on
ihe criticaI constants of
the
species in the solutiofi. This may
be
caUed a
one-fluid model
of the solution. Two-and three-fluid models rnay also be used
in which the properties of the solution are determined from averages of the
properties of two and three hypothetical species, respectively (Scott, 1956).
The implementation
of
a one-fluid model, to which
we
confine attention,
requires equations expressing the properties
of
the hypothetical fluid in terms
of
those of the (pure) species of the solution. The first and simplest
of
these
was suggested by Kay
(1936)
for the criticai
CORstants:
.
Te
=
LxjT
Ci
(7.2-29)
i
and
Pc
=
2
X
i
P
Ci'
(7.2-30)

163
162
OIemical Equilibrium Algorithms
for
Nonideal Systems
to which may
be
added
W
=
2:x
i
w
j

(7.2-31)
Eqt:ations 7.2-29
and
7.2-30
are
known
as
Kay's rule for pseudocritical con­
stants.
It
is not necessary
that
the equations
be
of
this form,
and
other
expressions have beeo postu1ated.
For
example,
Leland
et
aI.
(1962) have
proposed,
in
terms
of
Te
and
v
C
'
the criticaI volume,
rather
than
T
and
P
e,
c
Tcv
c
=
2:
xixjTC;jvC;j
(7.2-32)
i.
j
and
ve
=
2:
XiXjVC;j'
(7.2-33)
;.
j
where
T
c
;;
=
T
Ci
,
(7.2-34)
V
Cii
=
vc;,
(7.2-35)
1/3
__ I (
1/3
+
1/
3)
v
Cij
-"2
V
Cií
V
LJj
. '
(7.2-36)
and
T
eíj
=
~iATCi;TCjJ
1/2(
(j
~

I).
(7.2-37)
Once
lhe
criticaI properties
Df
the hypothetical fluid
are
determined,
the
compressibility factor is deterrnined
in
the
usual way
from
equation
7.2-27
or
its equivalent, augmented
by
the
acentric factoL
The
equations
due
to Leland
et aI. (1962) are
not
completely arbitrary since they
have
some
justification
from
statistical mechanics
(Leland
et
aI., 1968).
7.2.4 Electrolyte Solutions The
correlation
and
prediction
of
activity coefficients
of
electrolytes
in
solution
is
perhaps
an
even more difficult task than that for nonelectrolytes, to which
the
previous
three sections
have
primarily
been
directed.
Cau
tion (cf. N
ordstrom
et
aI., 1979) is required
in
selecting, interpreting,
and
applying
appropriate
equations
for
single ions
and
electrolytes, let alone rnixed electrolytes.
The
concept
of
excess free energy
has
been applied
to
solutions
of
electrolytes,
but
Further Oiscussion of Chemical Potentials in Nonideal Systems it is not necessarily defined
(Harned
and
Robinson, 1968,
pp.
10, 33) in the
same way as for solutions
of
nonelectrolytes (Section 3.7.2). These remarks
notwithstanding, we
attempt
a
brief
description
of
methods
for estimating
activity coefficients for single electrolytes,
but
original sources should be
consulted for greater detail
and
for rnixed electrolytes.
As
an
empirical extension
of
the
Debye-Hückellimiting
law,
the
following
equation
has
been provided
by
Davies
(1962) for the mean-ion activity
coefficient
of
a single electrolyte
in
dilute
aqueous solution
at
25°C:
1°·5 )
-loglo)'~

=
0.5I
z
+
z
_1
(
1
+
/0.5
-
0.30/
,
(7.2-38)
where
z+
and
z_
are the
cation
and
anion
charges, respectively,
and
1
is
the
ionic strength
of
the solution, defined by
1
=
0.52:
m,z;2.
(7.2-39)
Equation 7.2-38 is intended to
provide
a mean-íon actlvny coefficienl tha!
takes ion association into account.
For
uni-univalent electrolytes, equation
7.2-38 predicts
a
value
of
y""
=
0.785
at
m
=
0.1; experimental values for
50
electrolytes were shown
to
agree with a rnean deviation
of
less
than
2%.
For
40
uni-bivalent
and
bi-univalent electrolytes, the mean deviation from the calcu­
lated value
of
0.545 was
about
4%.
For
several bi-bivalent electrolytes, the
agreement
i5
less satisfactory,
and
the equation may be limited in its use for
these
to
concentrations
of
less
than
about
0.05
m.
The
relation between
rnean-ion activity coefficients
that
do
and
do
nol take association into account
is given by Davies (1962). Since
the
concentrations at which the
equation
is
valid are relative1y
10\".
activity coefficients calcuJated fram
equation
7.2-38
may be used either
on
a
molality
or
on
a molarity basis.
For
higher concentrations
01'
a
single electrolyte, Bromley
(1973)
has pre­
sented a correlation, which
for
25°C
becomes
__
0.511Iz+z_l1o.5
+
(O.06+0.6B)lz+z
__
1
+Bl,
1
log]()y",,--
1+/°.
5
(1+1.51/lz+z_lt
7
(7.2-40)
where
B
is a parameter, values
af
which are given by Brornley for many
electrolytes at 25°C.
Representatian
af
actlvlty coefficients for mixed electrolytes has been
considered, for example, by Meissner
and
Kusik (1972), Bromley (1973),
and
Pitzer and Kirn (1973):
and
has
been
rcviewed
by
Gautam
and
Seider (1979).

165
164
Chemical Equilibrium Algorithms for Nonideal
S~stems

7.3
ALGORITHMS
FOR
NONIDEAL
SYSTEMS
We describe three classes
of
method for performing equilibrium calculations in
nonideal systems.
The
first of these consists
of
"indirect" methods based on
algorithms for ideal systems, which are well developed and hence serve as
points
of
departure for algorithms for nonideal systems. The second class
consists of "direcC' methods, which consider the nonideality explicitly from the
outset and whose algorithms are derived in a manner similar to the
one
that
has been used for ideal systems in Chapter 6. The third class is intermediate
between the first two and consists of approaches that use the same work:ing
equations
of
the ideal-system algorithms
but
use the appropriate nonideal
values
of
the chemical potentials. We consider each
of
these three classes in
turno 7.3.1 Indirect Methods Based on Algorithms for Ideal Systems
An indirect method, first suggested by Brinkley (1947), has been used by
Fickett (1963, 1976)
and
Cowperthwaite and Zwisler (1973) in calculating the
detonation properties
of
explosives. Vonka and Holub (1975) have also used it
in computing equilibrium compositions
of
real gaseous systems.
The
approach is based
on
the fact that equation 3.7-29 may be written as
I
/Li
=
P.f
+
RTln
Yi(T, P,
n)
+
RTln
Xi'
(7.3-1 )
I
The first two terms are combined, and the equation is formally rewritten as
I
JLi
=
/lj[T,
P,n*(T,
P)]
+
RTlnx
i
,
(7.3-2)
I I
where
lL7
is
now a function of
T
and
P
through the (unknown) equílibrium
I
solution n*. Equation 7.3-2 is written in the ideal-solution forro for the
chemical potential (equation 3.7-15a). The calculation procedure is
an
iterative
one, in which the first step
is
to compute the equilibrium composition
assuming ideality
('ri
=
1),
yielding a first approximation to the system mole
numbers
n(I).
Then the activity coefficients
'Y
for the nonideal system are
computed from a known chemicaI potentiaI expression at this composition
n(l).
In the next step the equilibrium composition in the
"ideal"
system is computed
frem equation 7.3-2, with
Mi
replaced by
,...;(1)
=,...j
+
RTln'rj(T,
P,rfI»).
(7.3-3)
That is, we assume that
Yi
remains fixed at
y,<J).
This yields a second approxi­
mation
n(1).
The procedure
i5
repeated,
and
equation 7.3-3
is
replaced
in
Algoritbms for Nonideal Systems general
by
/li(m)
=
p.i
+
RTln
Yj(T, P,
n(tn»;
m
=
1,2,3,
...
,
(7.3-3a)
until the composition
on
successive iterations remains constant
to
within some
specified tolerance.
The
procedure
is
illustrated schematical1y in the flow
chart
shown in Figure 7.1.
This procedure
can
be
used in conjunction with any ideal-system calculation
method, such as the
BNR
Of
VCS
algorithm in Chapter
6.
Folkman and
Shapiro
(1968)
have given a set
of
sufficient conditions on the
Yi
for
such a
scheme to produce a decreasing sequence
of
free-energy values that converges
Calculate ldeal-system
equilibrium
composition,
using
lIi
=
II;*(T,
Pl
+
RT
In
Xi
yielding
the
estimate
n
l11
c:
Calcuiate
real-systeml'lml
from
"Im)
_==r=­
~~"'I~_=}J-j'(T.p)+RTlnljm!

Compute
ideal-system
equilíbrium
composition,
using
flj
=
Ilt
1m1
+
RT
In
Xi
yielding
01m+1
i
No
Ali I
n;
Im
+
1)
-
n/
m
II
small
enough?
Figure
7.1
Flow chart for calculating equilibrium composition in
nonideal
system
by
using ideal-system
algorithm in an
iterative
procedure.

167
Algorithms for Nonideal Systems
166
Chemical Equilibrium Algorithms for Nonideal
Slstems
on
the unique solution to the problem (provided that this exists). The iteration
procedure
may become subject to convergence difficulties, however.
if
the
deviations from ideality are large.
A simple approach to alleviate convergence difficulties
is
the parameter­
variation technique discussed in Chapter
5.
We write
P,i
=
Jii
+
aRTln"'fi
+
RTln
Xj,
(7.3-4)
in
which we regard
a
as a parameter that
is
zero in the ideal system and unity
in
the nonideal system. The technique is to calcula
te
equilibrium compositions
by
the method ilIustrated
in
Figure
7.1
for a sequence
of
values
{a(m)}
corresponding to a sequence of hypotheticaI nonideal systems with
Jii
==
p.1
+
a(m)RTln"'fi
+
RTln
Xi'
(7.3-5 )
The
value of
a(m)
is
changed gradually from zero to unity.
At
each step the
equilibrium composition for a
=
a(m)
is
used as the initial estimate of the
solution
for the calculation at
ex
=
a(m+I).
The important practical problem in
the
implementation of this approach is,
of
course, a wise choice
of
the sequence
{a(m)}. Example 7.1 Calculate the composition (mo]alities) at equi]ibrium at 25°C for
the
aqueous system {(H
3
P0
4
,
H
2
P0
4-,
HPol-,
pol-,
CaHP0
4

CaH
2
P0
4+,
CaPO;,
Ca2+,
CaOH+,
H
2
0,
H+,
OH-),
(H,P,O,Ca,p)}
(cf.
Feenstra, 1979). The value of b is based on 0.0009 mole
of
H
3
P0
4
and 0.0015
mole
of
CaHP0
4
dissolved in 1
kg
of water. The standard free energies
of
formation
01'
the species are
AGI /
RT
=
(-451.49,
-439.12,
-439.40,
-410.98,
-662.70,
-665.66,
-649.16,
-223.30,
-289.80,
-95.677,
O,
~63.452)T.

The data are fram Wagman et
aI.
(1965-]973), with the exception
of
lhe
values for
CaH
2
PO:
and
CaP0
4
- ,
which are calculated fram informa­
tion
given by Feenstra.
Solution
In this system, as for many electrolyte systems, C
=1=
M.
We
discuss such problems in general in Section
9.3.
and we note here that, in
solving this problem,
we
may ignore any row of
A,
provided that C
=
rank
(A, b).
The
solution follows the
flow
chart in Figure 7.1.
For
the activity coeffi­
éients,
it
is assumed that lhe Davies equation (equation 7.2-38)
is
valid for the
individual ionic species and that neutral species are ideal. The ideal-solution
values
and
results for the first three iterations for the nonideal solution are
shown
in the fol1owing tabular list (lhe fourth iteration gives the same values as
the third). The number of moles
of
H
2
0 and the ionic strength
1,
ca1culated
from equation 7.2-39, are given below lhe molalities. The charge balance (not
shown
in
the list)
is
satisfied to within
10-
14
on a mola1ity basis.
Species
Molality
Ideal Solution Iteration 1 ltcration 2 Iteration 3
H
3
P0
4
X
10
4
HzPO;
X
10
6
HPol-
X
10
3
pol-
X
10
12
CaHP0
4
X
10
6
CaH
2
P0
4+
X 10
8
CaPO;
X
10
9
Ca2+
X
10
3
3.817 1.564
2.014 0.881 3.0]4
5.996
3.825 1.497
3.055
1.304
2.092
1.364
1.533
3.500
2.027
1.498
3.045
1.301 2.093 1.372 1.519 3.474
2.010 1.498
3.044
1.300
2.093
1.372
1.519
3.473
2.010
1.498
CaOH+
X
10
13
H+
X
10
3
3.082 1.035
2.248
1.188
2.239
1.190
2.239
1.190
OH-
X
10
12
9.771
1.018
1.019
1.019
H
2
0,
moles 55.5062 55.5062 55.5062 55.5062
I X
10
3
7.5393 7.7746 7.7778 7.7778
7.3.2
Direct Methods
We consider here the structure of algorithms that attack the problem taking
into account nonideality from the outset. There are three types
of
approach:
(1) first-order methods; (2) second-order methods; and
(3)
quasi-Newton or
variable metric methods (Powell, 1980). As for ideal-system algorithms, basic
differences also result fram whether they are constructed
as
nonstoichiometric
a1gorithms or
as
stoichiometric algorithms.
In
the literature these have usually
been developed in the context of a specific form of chemícal potentíal. For this
reason, the general features of the algorithrns are somewhat obscured, and
we
elabora
te
each of these types in the fol1owing.
7.3.2.1 First-Order Methods In these methods
on1y
f..ti
itself
is
used. Any of the ideal-system algorithms
discussed in Chapter 6 that do not use compositional derivatives of
Ji
i
remain
relative1y unchanged for nonideal systems.
The
only difference is that the
appropriate nonideal model for
f..t
i
is
used instead of the ideal-solution
formo
The
stoichiometric algorithm given
by
Naphtali (1959.
1960,
and
1961), the
nonstoichiometric algorithm due to Storey and van Zeggeren (1964),
and
the
gradient-projection algorithm given
.1n
Section 6.3.1.1 are examples
of
this type.
7.3.2.2
Second-Order Methods
In
methods of this type
ap,jon
i
is
usedexplicitly. We consider bOlh the
nonideal versions
of
the
second~order

nonstoichiometric and stoichiometric
algorithms presented in Chapter 6.

168
Chemical Equilibrium Algoritluns for Nonideal Systems
The
nonideal versions
of
the nonstoichiometric Brinkley-NASA-RAND
(BNR)
algorithm result from direct consideration
of
theequilibrium conditions
(equations 3.5-3 and 3.5-4)
and
follow the derivation
of
Chapter 6 up to
the
point
where the ideal-solution model for the chemical potentials is invoked.
The
nonideal version
of
the
RAND
variation is obtained by employing the
Newton-Raphson method in equations 3.5-3
and
3.5-4. This gives
(cf.
Boynton,
1963; Michels and Schneiderman, 1963; Zeleznik
and
Gordon, 1966;
and
Gautam
and Seider, 1979)
丧Ġ
M
(m)
M
-
_1_
(a
-..!!i
)
(m)
(m)
_
~

_
(m).
RT.~

an.
Bn
j
+
i::
a
ki
l)lfk
-
RT
~

ak;lfk
,
J=I
J
,,1'''1
欽㄁
k=1
i=
1,2,
...
,N'
(6.3-17)
and
N' ~

Q
.81f~1II)

=
~

kJ
J
j=1
b
k
-b(m).
k,
k=
1,2,
...
,M,
(6.3-20)
where
N'
b
(m)
-
~

a
n(m).
k -
~

kj
j ,
k
=
1,2,
...
,M.
(6.3-21)
j=1
The
quantities
n(m)
and
1/;(m)
are
estimates
of
the solution at iteration
m.
Equations
6.3-17 and 6.3-20
are
a set
of
(N'
+
M)
linear algebraic equations
in
as
many unknowns, which must be solved on each iteration
of
the method.
For
an
ideal solution, this
number
may be reduced to
M,
as in Chapter
4,
or
to
(M
+
I), as in Chapter
6,
but
tbis is
not
possible in general.
The
nonideal version of the stoichiometric afgorithm in Section 6.4.3 is
based
on
consideration
of
equations 3.4-5.
On
each iteration, the linear
equations
resulting from the Newton-Raphson method,
R
N'
丧Ġ N'
~

l)l:(m)
~
~

(
ap';
) _
~

(m).
~

""
~
~

";j"k'
an
~

"ijILI' ,
j
=
1,2,
...
,R,
1=1
;==1
k=1
k
n(m)
;=1
(7.3-6)
(cf.
equation 4.3-2) must be solved for the reaction-adjustment parameters
8€(m).
Equation 7.3-6 consists
of
a total
of
R
=
(N'
-
M)
equations, as
opposed
to
(N'
+
M)
in
the case
of
equations 6.3-17 and 6.3-20. Thus
equation
7.3-6 is to
be
preferred. This should be contrasted with the situation
偲潢汥浳Ġ 169 discussed in Chapter
6,
where the ideal-solution form of equations 6.3-17
and
6.3-20 is preferabie for systems with relatively small numbers
of
elements
and
phases.
A number of stoichiometric algorithms have been developed since about 1970
for computing equilibrium in aqueous systems. These have been reviewed
by Nordstrom et
aI.
(1979), who compare a number of them and provide
an
extensive bibliography, mostly from the field of geochemistry. These algo­
rithrns generally use the Newton-Raphson
or
a related method to solve the
nonlinear equations 3.4-5.
The
computer programs are rather specialized for
this particular application
and
usually have thermodynamic data files as
internaI components.
7.3.2.3
Quasi-Newton or Variable Metric Methods
Essentially, numerical information about
J1.;
is used on successive iterations to
construct approximations to
oIL;/ôn
j
in these methods. This type of approach
has been used to solve chemical equilibrium problems by George et
aI.
(1976)
and Castillo and Grossman (1979).
7.3.3
Intermediate Methods Based on Algorithms for Ideal Systems
A
third class of algorithm, intermediate between the first two, consists
of
using
the working equations of an ideal-system algorithm, except that the chemical
potential is replaced by its nonideal value in the calculation procedure (e.g.,
Eriksson and Rosen, 1973). This amounts to using the ideal-solution values for
the compositional derivatives
of
p.
and
the nonideal values for
p.
itself.
7.3.4
Discussion
Computational experience with the three classes of method described in this
section is rather limited. Given this,
we
believe that the indirect and inter­
mediate classes appear to be most useful since they can be employed in
conjunction with any available ideal-system algorithm.
Of
the direct class
of
methods, the second-order stoichiometric algorithm is considerably simpler
than the nonstoichiometric version. The quasi-Newton methods also appear
prornising. PROBLEMS 㜮㄁
Continue Problem 6.8 by calculating theequilibrium mole numbers, using
the third model studied
by
Vonka and Holub
(1975)-a
nonideal solu­
tion. Use the Redlich-Kwong equation of state to calculate fugacity
coefficients
(and
hence activity coefficients).
For
a species in a nonideal
Tags