Skip to content

Formation quantities and the database ​

The chemical potential and reactions writes every equilibrium in terms of standard potentials , which no measurement gives. This page shows what a database tabulates instead, how those numbers are measured, and how they are carried to any temperature and pressure, up to the apparent Gibbs energy the package reads, which is where Thermochemistry begins. It is the most technical of the foundations, and a first reading can come back to it later.

Questions this page answers

  • Energies are known only up to a constant: what can a database tabulate, and why is it enough?

  • How are enthalpies, entropies and Gibbs energies of formation measured?

  • What separates an absolute entropy, an entropy of formation and the conventional entropy of an ion?

  • How does a standard potential change with temperature and pressure, and what is the apparent Gibbs energy a database stores?

1. Energies known up to a constant, and the reactions of formation ​

The internal energy, the enthalpy and the Gibbs energy are known up to an additive constant only, since a measurement gives their changes and never their values. A database cannot tabulate the change of every reaction of interest, which are too many, and tabulates instead, for each substance, the change of the one reaction that forms it from its elements, each taken in its stable form at the conditions of reference,   K and   bar (Anderson and Crerar, 1993) (§7.1, §7.2): the standard enthalpy of formation and the standard Gibbs energy of formation . That these values determine follows from the conservation of the elements and of the charge in a reaction, and the argument below also delimits the freedom left in their definition, of which §2 makes use.

Balanced reactions ​

Let species contain atoms of element and carry the charge . The reaction    is balanced when it conserves every element and the charge,

The vector of the stoichiometric coefficients thus belongs to the null space of the matrix whose rows hold the of each element and the charges , which the package builds as the canonical stoichiometric matrix, the charge being its row Zz (Stoichiometric Matrix). The slaking of lime, CaO + H₂O → Ca(OH)₂, has     and conserves one calcium, two hydrogens and two oxygens.

Formation from the elements ​

The reaction of formation of takes atoms of each element in its reference form, half a mole of O₂ gas for each atom of oxygen for instance. An ion cannot be formed that way without a counter-charge, and the convention is to complete its formation with hydrogen ions turned into hydrogen gas (Anderson and Crerar, 1993) (§17.3), as in Ca + 2 H⁺ → Ca²⁺ + H₂ for the calcium ion. In both cases, the standard Gibbs energy of formation reads

where is the standard molar Gibbs energy of element in its reference form, counted per atom, and the Gibbs energy of formation of the hydrogen ion from hydrogen gas, being half the potential of H₂. Neither is known, and neither needs to be. No value is assigned to them: the zeros follow from the definition itself. For an element in its reference form, is times its number of atoms, and the formula gives zero; for H⁺, one atom of hydrogen and one charge give    , whatever the values of and . That the energy of formation of H⁺ is zero is the convention on ions, and it is built into the reaction of formation chosen for an ion rather than into a value given to an unknown: the energies of formation of all other ions follow from it. Inserted in   , the energies of formation give

in which the last two sums vanish for a balanced reaction, so that

The proof requires nothing of and besides being the same for all the species of the reaction: any values assigned to them on that condition leave unchanged. The same argument applied to the enthalpy yields   , which is Hess's law: the change in a reaction is the same whether the reaction is carried out directly or by decomposing the reactants into their elements and then forming the products from them.

Absolute entropy and entropy of formation ​

The entropy is in a different position from the energies. Calorimetry gives only its changes, but a zero common to all substances can be chosen: the third law takes the entropy of a pure substance in a perfect crystalline form, in internal equilibrium, to tend to zero as the temperature tends to 0 K (Anderson and Crerar, 1993) (§6.5). The choice leaves out what no chemical reaction changes, down to the constituents of the nuclei, and is a convention rather than a measurement (Richet, 2001; Sec. 4.4b, p. 75). The entropy at any other temperature then follows from the second law,     at constant pressure, integrated from 0 K, with the entropy of each phase transition met on the way, the ratio of its enthalpy to the temperature at which it occurs,

This is the absolute, or third-law, entropy, tabulated as at : the heat capacity is measured by calorimetry from a few kelvins upward and extrapolated to 0 K (§7.3, §7.5), and is a positive quantity. A substance that is not a perfect crystal at 0 K, a glass or a crystal whose disorder freezes in on cooling, retains there a residual entropy, which adds to the integral (§6.5.3); the glass of a blast-furnace slag is of this kind. That entropy is not a property of the substance alone: it is the configurational entropy the phase had when its structure stopped relaxing on cooling, and it depends on the temperature at which that happened, so on the thermal history of the sample (Richet, 2001; Sec. 6.3a, Eq. (6.38), p. 144).

The residual entropy escapes the calorimetry from 0 K, which starts from the glass as it already is, disorder included. It is obtained by closing a cycle with the crystal of the same composition. Both are heated to the melting temperature : the crystal melts there, while the glass has turned into a supercooled liquid and then into the same liquid, so the two paths end in one state. Equating the entropies of that liquid gives

the last heat capacity being that of the glass and, above its glass transition, of the supercooled liquid (Richet, 2001; Sec. 4.4c, p. 76). The cycle crosses the glass transition, which is not reversible, and integrating across it treats it as if it were; the entropy produced there is small against the residual entropy, which is why the cycle is accepted (Richet, 2001; Sec. 6.4d, p. 152); Richet and Bottinga (1986) put it at least an order of magnitude below. None of this enters a calculation of this package. No database carries the Gibbs energy of a slag glass: the glass enters the budget through its oxides, and its reaction is prescribed, by a rate law or by an imposed degree of reaction, rather than decided by its energy. What can be read off a measurement is its enthalpy, which CEM I 52.5 N and slag in an isothermal calorimeter, read off the states derives from the heat the pastes release.

The entropy of formation is of another nature: it is the change of entropy in the reaction of formation,

where is the absolute entropy of element in its reference form, counted per atom, half that of O₂ gas for oxygen. It is the entropy of formation that is bound to the enthalpy and the Gibbs energy of formation by the relation of The two laws, and what the Gibbs energy measures §5 applied to the reaction of formation,

whereas the entropy of a reaction is computed from the absolute entropies,  , the entropies of the elements canceling for the reason given above. The two are easily confused, and they differ even in sign: the absolute entropy of lime is positive, its entropy of formation from calcium metal and oxygen gas negative, since the gas it consumes is far more disordered than the solid it forms.

The aqueous ions carry a third kind of entropy. The convention that sets the formation properties of H⁺ to zero sets its tabulated entropy to zero as well, and the entropy tabulated for an ion of charge is then a conventional entropy,   , its absolute entropy less times that of the hydrogen ion, which thermodynamics alone does not determine (§17.3). A conventional entropy can be negative, as that of Ca²⁺ is, and the unknown term cancels from any reaction, whose charges balance,  . Heat capacities and volumes of ions are conventional in the same way, and they describe the ion at infinite dilution: those of OH⁻, its entropy, heat capacity and volume, are all negative, which reflects the water around the ion rather than an error of the data (Richet, 2001; Sec. 12.3b, p. 296).

How these numbers are measured

No instrument reads a Gibbs energy. Every tabulated value combines a few kinds of measurement (Anderson and Crerar, 1993).

  • Enthalpies of formation come from calorimetry. When a substance burns cleanly from its elements, the heat of combustion gives its enthalpy of formation directly; a bomb calorimeter works at constant volume, so it measures , which the change of converts to (The two laws, and what the Gibbs energy measures §2). Most substances cannot be formed that way, and their enthalpy is obtained by Hess's law from reactions that can be measured, typically the dissolution of the compound and of its oxides in the same acid: the heats combine as the reactions do.

  • Absolute entropies come from the heat capacity, measured from a few kelvins upward and integrated as above.

  • Gibbs energies of formation follow from the two, as   , or from an equilibrium measured directly. A solubility gives and hence   ; the reversible voltage of an electrochemical cell gives   , being the number of electrons the reaction transfers. Either fixes one unknown energy of formation once those of the other participants are known.

The hydrates of a cement can be neither burned nor formed from their elements, and most of the Gibbs energies CEMDATA18 gives them are derived from measured solubilities (Lothenbach et al., 2019). A solubility measured at several temperatures yields the enthalpy of reaction as well, through the van 't Hoff relation of §2.

The values of CEMDATA18 at show each of these quantities, the element entropies being read from the same file; the identity between the three formation quantities of lime holds to the internal consistency of the tabulated values:

julia
using ChemistryLab, Printf
db = Dict(symbol(s) => s for s in build_species(datapath("cemdata18-thermofun.json"); verbose = false))
S_e = Dict(e["symbol"] => only(e["entropy"]["values"])
           for e in ChemistryLab.JSON.parsefile(datapath("cemdata18-thermofun.json"))["elements"])
Tr = 298.15
G(s, T) = db[s][:ΔₐG⁰](T = T, unit = false)
H(s, T) = db[s][:ΔₐH⁰](T = T, unit = false)
S(s, T) = db[s][:S⁰](T = T, unit = false)
for s in ("O2", "H2", "H+", "Ca+2")
    @printf("%-4s  ΔfG = %9.0f, ΔfH = %9.0f J/mol, S = %6.2f J/(mol K)\n", s, G(s, Tr), H(s, Tr), S(s, Tr))
end
@printf("oxygen per atom: %.3f J/(mol K), half that of O2\n", S_e["O"])
ΔfS = S("Lim", Tr) - sum(k * S_e[string(e)] for (e, k) in atoms(db["Lim"]))
@printf("lime: S = %.2f, ΔfS = %.2f J/(mol K); ΔfG - (ΔfH - Tr ΔfS) = %.0f J/mol\n",
        S("Lim", Tr), ΔfS, G("Lim", Tr) - (H("Lim", Tr) - Tr * ΔfS))
O2    ΔfG =         0, ΔfH =         0 J/mol, S = 205.14 J/(mol K)
H2    ΔfG =         0, ΔfH =         0 J/mol, S = 130.68 J/(mol K)
H+    ΔfG =         0, ΔfH =         0 J/mol, S =   0.00 J/(mol K)
Ca+2  ΔfG =   -552790, ΔfH =   -543074 J/mol, S = -56.50 J/(mol K)
oxygen per atom: 102.569 J/(mol K), half that of O2
lime: S = 39.75, ΔfS = -104.41 J/(mol K); ΔfG - (ΔfH - Tr ΔfS) = -68 J/mol

With the entropy of reaction defined above, the three quantities of a reaction are bound by   , which the slaking of lime verifies with the same values:

julia
slaking = ("Portlandite" => 1, "Lim" => -1, "H2O@" => -1)
Δr(f, T) = sum(ν * f(s, T) for (s, ν) in slaking)
@printf("slaking: ΔrH = %.1f kJ/mol, ΔrG = %.1f kJ/mol, ΔrS = %.2f J/(mol K); ΔrG - (ΔrH - Tr ΔrS) = %.0f J/mol\n",
        Δr(H, Tr) / 1000, Δr(G, Tr) / 1000, Δr(S, Tr), Δr(G, Tr) - (Δr(H, Tr) - Tr * Δr(S, Tr)))
slaking: ΔrH = -63.7 kJ/mol, ΔrG = -55.8 kJ/mol, ΔrS = -26.27 J/(mol K); ΔrG - (ΔrH - Tr ΔrS) = 69 J/mol

Formation from primary species ​

The elements are not the only possible reference. Let be species of the system, called primary, whose columns of and are linearly independent and generate those of all the other species. Each species then decomposes in a unique way on the primaries,

which is the balanced reaction    forming from the primaries, with   if is the primary and zero otherwise. The matrix of the is the conservation matrix , SM.A in the package, whose rows are labeled by the primaries. Substituting this decomposition in the balance of the elements and of the charge shows that a reaction conserves them if and only if it conserves the primaries,

the converse resting on the independence of the columns of the primaries. The reaction forming from the primaries being balanced, its standard Gibbs energy follows from the Gibbs energies of formation by the result above, and it defines the equilibrium constant of that reaction,

The argument used for the elements applies with the primaries in their place, the unknown taking the part of and , and any balanced reaction satisfies

A table of formation constants from a basis of primary species, which is the form of the data of mass-action programs (Mass action or minimization), thus carries the same information as a table of Gibbs energies of formation, for the species it contains. For lime and portlandite, with Ca²⁺, H₂O and H⁺ as primaries, the matrix and the two routes to the Gibbs energy of slaking read:

julia
basis = [db["Ca+2"], db["H2O@"], db["H+"]]
SM = StoichMatrix([db["Lim"], db["Portlandite"], basis...], basis)
names = symbol.(SM.species)
ν = [get(Dict(slaking), s, 0) for s in names]     # slaking, in the order of the columns
# Gibbs energy of formation of each species from the primaries (rows of SM.A)
Gp = [G(symbol(b), Tr) for b in SM.primaries]
ΔrG_B = G.(names, Tr) .- transpose(SM.A) * Gp
logK(s) = -ΔrG_B[findfirst(==(s), names)] / (R_GAS * Tr * log(10))
@printf("log K of formation from the primaries: lime %.2f, portlandite %.2f\n", logK("Lim"), logK("Portlandite"))
@printf("primaries conserved by slaking: %s; ΔrG = %.3f kJ/mol from the primaries, %.3f from the elements\n",
        SM.A * ν, sum(ν .* ΔrG_B) / 1000, Δr(G, Tr) / 1000)
SM

The oxides of a silicate, a carbonate or a sulfate form such a basis, and the enthalpy of formation from the oxides is in use for these compounds (§7.4.4). Its values are much smaller in magnitude, and so are their uncertainties, which no longer include those of forming the oxides from the elements, but they cannot be combined with values of formation from the elements in one calculation. It is the natural scale for a glass, and CEM I 52.5 N and slag in an isothermal calorimeter, read off the states places the slag of a blended cement on it.

Energies counted from the primaries: the gauge of a database of reactions ​

A database of reactions, of which PHREEQC's are the common example, does not give the formation of its species from the elements but only from its master species: the log K of each reaction,  , as a function of temperature, with the master species defined by identity reactions (Ca+2 = Ca+2). By the relation above, it determines

and nothing else: the of the master species are not in it. The package reads such a database by setting them to zero at every temperature,

which is a choice of zero, a gauge, and not a measurement. It does not change an equilibrium. The energies so defined differ from any others consistent with the database by

a combination of the rows of the conservation matrix, the same for every species, solute or mineral, since each decomposes on the same master species. On a composition that meets the balances  , the Gibbs energy changes by

a constant of the feasible set, and the composition that minimizes it is the same. The master species of a database span the elements and the charge (one per element, H⁺ for hydrogen and H₂O for oxygen, with the electron for the charge), so that every species of the database decomposes on them and the argument applies to all.

It applies within one database only. Species taken from two databases, or from a database of reactions and a database of formation properties, carry energies whose differences from the formation energies are two different combinations and . Their sum over a feasible composition is no longer a constant, and the equilibrium is changed by an amount that has no physical meaning: a master species of PHREEQC is at zero where its formation energy from the elements is several hundred kilojoules per mole. Each species read from a database therefore records its gauge under :gauge (the database file and its digest for a database of reactions, the formation from the elements for ThermoFun), and ChemicalSystem refuses a system that mixes two.

The other standard quantities follow from the temperature dependence of , by the Gibbs–Helmholtz relation, and are counted in the same gauge:

With phreeqc.dat, the master species Ca²⁺ and CO₃²⁻ are at zero, and the Gibbs energy of calcite is that of its dissolution constant,   :

julia
_, pdb, _ = read_phreeqc_database(datapath("phreeqc.dat"))
ps = Dict(symbol(s) => s for s in build_species(pdb, ["Ca+2", "CO3-2", "CaCO3", "Calcite"]))
for s in ("Ca+2", "CO3-2", "CaCO3@", "Calcite")
    @printf("%-8s %9.3f kJ/mol\n", s, ps[s][:ΔₐG⁰](T = Tr) / 1000)
end
@printf("log10 K of the dissolution of calcite: %.2f\n", ps["Calcite"][:ΔₐG⁰](T = Tr) / (R_GAS * Tr * log(10)))
Ca+2        -0.000 kJ/mol
CO3-2       -0.000 kJ/mol
CaCO3@     -18.410 kJ/mol
Calcite    -48.404 kJ/mol
log10 K of the dissolution of calcite: -8.48

2. Temperature, pressure, and the apparent quantities of a database ​

The standard potential at any temperature and pressure ​

The standard state of a species being taken at the temperature and the pressure of the system, its potential obeys the relation of The two laws, and what the Gibbs energy measures §5 for a substance of fixed composition, with the standard molar entropy and volume,

whereas a gas, whose standard state stays at whatever the pressure, keeps the first term only and receives the pressure through its activity (Standard states). The relation is integrated from in temperature at , where    , and then in pressure at . The order follows the data: heat capacities are measured near 1 bar, and integrating in pressure first would need at , which only the equation of state gives, through     (Richet, 2001; Sec. 8.1a, Eq. (8.4), p. 174). The temperature step is a double integral,

and exchanging the order of its two integrations, running from to and from to , turns the last term into a single integral,

With the pressure step added, this gives (Anderson and Crerar, 1993) (§7.4, §7.6)

the heat capacity being taken at . The enthalpy follows in the same way from      ,

The entropy that multiplies   is the absolute entropy of §1, and both expressions involve properties of the species alone.

Apparent and formation Gibbs energies ​

Away from , an energy of formation depends on the conditions at which the elements are taken, and two choices are in use (Anderson and Crerar, 1993) (§7.4.1, §7.4.2). The traditional quantities of formation take the elements at the temperature and at 1 bar, which requires their heat capacities, and their phase changes, over the whole range. The apparent quantities of formation leave them at : in the definition of §1, becomes the constant and becomes  ,

so that the apparent Gibbs energy of H⁺ is zero at every temperature and pressure. This convention is that of the databases the package reads, which stores it as ΔₐG⁰, and as ΔₐH⁰ the apparent enthalpy defined in the same way. Both choices assign to the elements and to the charge energies common to all species, and the argument of §1 cancels them from any balanced reaction,

The two definitions coincide at , where the tabulated value is . Since the terms of the elements are constant, the apparent energy of a neutral species changes with and as its standard potential does, which the integral above gives explicitly,

and the apparent enthalpy is plus the increment given by the enthalpy relation above. For an ion, the term in subtracts times the variation of the hydrogen ion, and the same expression holds with the conventional entropy, heat capacity and volume of §1.

The chemical potential and the apparent Gibbs energy ​

Combining    with the definition of the apparent Gibbs energy relates the chemical potential of a species to the quantity a database stores,

The last two terms are unknown, and the package leaves them out: the potential it minimizes is  . The omission changes no equilibrium. Summed over the species with their amounts, the omitted terms add to the Gibbs energy of the system     , where    is the amount of element and    the charge. This sum takes the same value for every composition that satisfies the conservation constraints of the minimization, so that the two Gibbs energies reach their minimum at the same composition, and only the multipliers of the constraints, the component potentials of Thermochemistry §4, are shifted, by for element and by the bracket divided by for the charge. With primary species as components, the omitted terms are a combination of the by the decomposition of §1, and the conclusion is the same.

The enthalpy is treated likewise. In a closed system without net charge, the apparent enthalpy differs from the absolute one by  , a constant, and heats computed as differences of apparent enthalpies are therefore exact; the temperature derivative of an apparent enthalpy is the heat capacity of the species itself, the elements contributing nothing.

One relation does not survive for a species on its own. Since the elements are frozen at , the apparent Gibbs energy of a species divided by does not obey the Gibbs-Helmholtz relation (The two laws, and what the Gibbs energy measures §5) with its apparent enthalpy: for a neutral species the difference is     , the absolute entropies of the elements at appearing where their enthalpies and Gibbs energies cancel. The relation is recovered for any balanced reaction, where these terms cancel in turn. The slaking of lime shows both at 60 °C, a centered difference giving the left-hand side, up to the misfit of the tabulated values met in §1, which divides by in the same way:

julia
T, δ = 333.15, 0.01
# ∂(g/T)/∂T + h/T², which Gibbs-Helmholtz sets to zero, by a centered difference
gibbs_helmholtz(g, h) = (g(T + δ) / (T + δ) - g(T - δ) / (T - δ)) / 2δ + h(T) / T^2
# what the tabulated values miss of G = H - TS at Tr, divided by T²
misfit(g, h, s) = (h(Tr) - g(Tr) - Tr * s(Tr)) / T^2
@printf("slaking: %8.5f J/(mol K²), all of it the misfit %8.5f of the tabulated values\n",
        gibbs_helmholtz(t -> Δr(G, t), t -> Δr(H, t)), misfit(t -> Δr(G, t), t -> Δr(H, t), t -> Δr(S, t)))
@printf("lime:    %8.5f J/(mol K²) = %8.5f from the elements + %8.5f of misfit\n",
        gibbs_helmholtz(t -> G("Lim", t), t -> H("Lim", t)),
        -Tr * sum(k * S_e[string(e)] for (e, k) in atoms(db["Lim"])) / T^2,
        misfit(t -> G("Lim", t), t -> H("Lim", t), t -> ΔfS))
slaking: -0.00062 J/(mol K²), all of it the misfit -0.00062 of the tabulated values
lime:    -0.38664 J/(mol K²) = -0.38725 from the elements +  0.00061 of misfit

The heat of reaction ​

The standard enthalpy of reaction is the heat the system receives at constant pressure when the reaction proceeds by one mole, in the standard states; the heat it releases is , and a reaction is exothermic when   (Richet, 2001; Sec. 4.5b, p. 80). It decides how changes with temperature. Applying the relation of The chemical potential and reactions §1 to each constituent and summing over a balanced reaction, where it holds for apparent quantities, yields the van 't Hoff relation

by which an exothermic reaction is displaced towards its reactants on heating. The enthalpy of reaction varies with temperature in turn through the heat capacities,   (Kirchhoff's relation), and a database that stores for every species therefore determines completely (§13.3). The pressure acts through the volume of reaction: differentiating    at fixed temperature, with  , gives   .

The package computes heat without writing a reaction either. The enthalpy of a state being , the heat released between two states at the same temperature is the difference of their enthalpies, which is how heat_release and the calorimeters compute it. The heat of the calorimeters under partial equilibrium, the heat capacity of a semi-adiabatic cell at equilibrium and the sensitivities of the minimization all rest on the two remarks made above on the omitted terms (Kinetics under partial equilibrium).

Where to go next ​

Thermochemistry takes up these quantities in the notation of the code, with the chemical potential divided by that the solver differentiates and the models by which is evaluated, and Standard states states what each activity is measured from.