234 Chemical equilibrium
Software Box 5.1 Calculation of Gibbs free energy of ideal gas and incompressible phase
The file th_template_2.mw contains the following two new Maple procedures:
Gsurf_idealgas: calculates the Gibbs free energy of an ideal gas, or of a mixture
of ideal gases, with equation (5.1.11). Thermodynamic properties are entered in
the spreadsheet RefStateData, and the gas or mixture of gases are specified in
a table with two columns, as explained in Software Box 1.1. The procedure calls
on procedures in the package th_shomate.mw to perform the heat capacity
integrals, and then adds the pressure integral. It performs the calculations over
a P –T range and with P –T increments that are specified in the procedure call.
Output is sent to a text file whose name is specified in the procedure call.
Gsurf_Vconst: works as Gsurf_idealgas but assumes that the volume of the
phase or assemblage is constant (pressure integral as in equation (5.1.10)).
The data for hydrogen, oxygen and water are stored in tab-delimited format in a file
named waterprops.
There is, of course, more to this story. In the first place, we know that if the temper-
ature is lower than 100
◦
C at 1 bar, then the equilibrium condition is not H
2
O gas but
liquid H
2
O. The reason why this does not show up in Fig. 5.1a is that I have not included
the curve that represents the Gibbs free energy function for liquid H
2
O. This situation is
rectified in panel (b) of the figure. We can now compare Gibbs free energies for three
different possible states of a system with the same chemical composition. At any given
pressure and temperature, the equilibrium state, which we also call the stable state,is
the one in which Gibbs free energy is lowest. At 1 bar pressure molecular H
2
O is sta-
ble relative to H
2
+O
2
everywhere in the temperature interval 0–200
◦
C. At T<100
◦
C
the Gibbs free energy of liquid water is lower than that of H
2
O gas, so that the stable
state is liquid water. The converse is true at T>100
◦
C. At T = 100
◦
C and P = 1 bar
the Gibbs free energies of liquid and gaseous H
2
O are the same, so that both phases
are stable.
There is another aspect that we must consider. If we mix hydrogen and oxygen in a
container at room temperature we know from Fig. 5.1a that the system is not at equilibrium
and that a spontaneous reaction that lowers the system’s Gibbs free energy by forming
molecular H
2
O should take place. But does this happen? Hydrogen-filled airships were
built and flown in Germany for many years with no apparent inconveniences, until the
Hindenburg disaster in 1937. The answer is that in order for the reaction to take place we
need to “excite” the system, for example, by supplying heat in the form of an open flame or
an electrical spark (which is what apparently doomed the Hindenburg). The effect of this
excitation is to break the bonds in the H
2
and O
2
molecules, so that the atoms are able to
recombine as H
2
O molecules. This is the chemical equivalent of removing a restriction in a
system, such as a wall separating two different gases or an insulating layer between bodies
at different temperatures. We saw that, when such restrictions are removed, isolated systems
evolve spontaneously in the direction mandated by the Second Law of Thermodynamics.
In the case of a chemical reaction the restrictions are the chemical bonds in the molecules of
the reactant species. We remove that restriction by supplying the amount of energy required
to break those bonds. This energy is called the activation energy for the chemical reaction,
which we will discuss in Chapter 12.