Lessons 7 and 9 gave us two equivalent descriptions of a system at equilibrium, and , together with the coefficients that relate their derivatives to measurable quantities. These two functions nevertheless have a practical drawback: their natural variables are almost never the ones the experimenter controls. Nobody knows how to impose the entropy of a system directly. On the other hand, it is very easy to fix its temperature, by immersing it in a large water bath or simply by leaving it in a room, or to fix its pressure, by leaving it open to the atmosphere. A chemical reaction in a beaker, water boiling in a saucepan, a battery discharging: all these processes take place at (roughly) constant external temperature and pressure.
In this lesson we will construct new state functions, called thermodynamic potentials, whose natural variables include precisely , , or both. We will see that they contain exactly the same information as the fundamental relation, but that each is better suited to a particular type of experiment. They make it easy to calculate the heat exchanged, to find the equilibrium state of a system in contact with a thermal reservoir, and to bound the work that can be extracted from it. The enthalpy and the Gibbs free energy will be especially useful in the next lesson, devoted to phase transitions.
As in the two previous lessons, we consider simple systems at , subject only to the work of pressure forces, unless otherwise stated.
1. Equilibrium of a non-isolated system
1.1. The maximum entropy principle
In Lesson 8, we assumed that at equilibrium the entropy of an isolated whole is stationary, and we deduced from this the equality of the temperatures, pressures and chemical potentials of two subsystems in contact. Stationarity is a necessary condition, but it does not tell us whether equilibrium corresponds to a maximum, a minimum or a saddle point of the entropy. Yet this is exactly what we will need to specify in order to understand which function must be extremal when the system is no longer isolated. Let us therefore return to the second law itself.
Consider an isolated system held in a constrained equilibrium state, which we denote by : for example, a partition prevents certain exchanges between two of its parts. We saw in Lesson 6 that, if this constraint is removed, the system evolves toward a new equilibrium state and its entropy cannot decrease: . Now suppose that all the constrained states that can be prepared with the same total energy, volume and number of particles lead, once the constraints are lifted, to the same equilibrium state . Each of them then has an entropy less than or equal to that of . In other words, among all these states, equilibrium is the one with the greatest entropy.
The second law alone guarantees that entropy increases when a constraint is lifted. The statement above further requires that the final state not depend on the constrained state from which we started: this is why we assume it as a principle, modeled on Callen's postulate II [1]. It strengthens the stationarity hypothesis of Lesson 8, since a maximum is in particular a stationary point. It does not, however, claim that every real evolution reaches this maximum: a system may remain trapped for a long time in a state that is not the most stable one. We will see spectacular examples of this in the next lesson, with supercooled water.
1.2. The minimum energy principle
This principle has an equivalent formulation in the energy representation. This time, let us compare constrained states with the same entropy, the same volume and the same number of particles. Among them, equilibrium is the state of minimum energy.
Let us prove it. Let denote the equilibrium state with entropy and energy , and a constrained state with the same entropy , the same and , but energy . If we isolated the system in state and lifted its constraints, it would evolve toward the equilibrium state of energy , whose entropy is given by the fundamental function: . The maximum principle therefore gives
But, by definition, we also have . It follows that . Since the equilibrium entropy is an increasing function of energy,
we conclude that .
We thus recover the familiar language of mechanics, in which the stable equilibrium of a point particle corresponds to a minimum of its potential energy. Note, however, that this statement compares states; it does not describe an evolution. An isolated system relaxing toward equilibrium conserves its energy and its entropy increases; it does not keep a constant entropy while lowering its energy.
The two preceding statements concern systems whose total energy, or total entropy, is fixed. This is not the case for a system that exchanges heat with a thermal reservoir: neither its energy nor its entropy is fixed. What then becomes of the equilibrium criterion?
1.3. A system in contact with a thermal reservoir
Consider a closed system of fixed volume in contact with a thermal reservoir at constant temperature . It receives no work, but it can receive heat from the reservoir. The first law simply gives
As in Lesson 6, the reservoir gives up this heat at constant temperature: its entropy changes by . The whole formed by the system and the reservoir is isolated, and the second law requires
where is the entropy change of the system alone. Replacing by and multiplying by , we obtain
The function can therefore only decrease as the system evolves in contact with the reservoir. In an isolated system, entropy could only increase; here, it is the combination that can only decrease.
It is important to note that is the temperature of the reservoir. It is not necessarily that of the system at the start of the evolution: think of a cup of hot coffee forgotten on a table, which cools down to room temperature. The function thus mixes two quantities of the system, and , with a parameter of the surroundings, .
But when the state under consideration is in thermal equilibrium with the reservoir, its temperature is precisely , and coincides with the state function
Let us then compare, as in the previous subsection, constrained states with the same and , each already at temperature , for example because an internal partition still prevents a redistribution of matter or volume. If each of these states reaches the same equilibrium when the constraints are lifted, inequality (1) gives for each of them. In contact with a thermal reservoir, equilibrium therefore achieves the minimum of among the states being compared.
This result can be read as a competition between energy and entropy. At low temperature, the term is small, and minimizing amounts almost to minimizing : equilibrium favors low-energy states, often highly ordered ones, such as a crystal. At high temperature, the term dominates, and equilibrium favors high-entropy states. We will encounter this competition again in phase transitions: ice, which is more ordered, wins in the cold, while liquid water, which has a higher entropy, wins in the warm.
For to be truly useful, however, we still need to express it in terms of the variables imposed by the experiment, here , and , rather than in terms of . This is the purpose of the Legendre transform.
2. The Legendre transform
2.1. Changes of variables
Let us start from the fundamental relation
We seek a state function whose natural variables are , and , that is, whose differential has the form
Comparing with , we see that the solution is very simple: we need only subtract . Indeed, with ,
The term has disappeared, and now appears instead. We recover the function introduced in the previous subsection for contact with a thermal reservoir.
One might be tempted to do something simpler: since , it would suffice to invert this relation to obtain , then substitute it into to write the internal energy as a function of , and . This is a perfectly legitimate state function, which we have in fact often used, for example for the monatomic ideal gas. But it is not a fundamental equation: information has been lost. We saw this in Lesson 7: knowing alone does not allow us to calculate the pressure of the ideal gas. The reason is that . Knowing as a function of means knowing as a function of its own derivative with respect to , which is a differential equation. If is a solution, then is another one for any constant : the fundamental function is determined only up to a shift in entropy, which may moreover depend on and .
With , on the contrary, nothing is lost. The differential of gives
and the internal energy is reconstructed from . It then suffices to eliminate between these two relations to recover .
expressed in terms of and the other natural variables of , is called the Legendre transform of with respect to . Its differential contains the term in place of the term of .
To replace by , we therefore subtract . To replace by its conjugate, which is in , we subtract ; in other words, we add . The Legendre transform thus allows an extensive variable to be exchanged at will for its conjugate intensive variable.
This construction assumes that the relation can be inverted at fixed and . This is the case in a stable homogeneous phase, since Lesson 9 gives
When several phases coexist, this inversion may cease to be unique; we will see in the next lesson that the geometric formulation below then remains valid.
2.2. Geometric interpretation
Let us fix and and plot the graph of as a function of . In a stable phase, and therefore
the curve is convex. Its slope at each point is the temperature.
A convex curve can be described in two ways: by the set of its points , or by the set of its tangents. Since a straight line is characterized by its slope and its intercept, the tangent at the point of abscissa has the equation
Its intercept is therefore exactly , evaluated at the point of contact. Giving as a function of means giving, for each slope, the intercept of the corresponding tangent: it describes the curve by its family of tangents, which redraw it entirely as an “envelope”. This shows why no information is lost. Conversely, knowing only as a function of the slope does not allow the curve to be positioned horizontally: this is the flaw of the function encountered above.
Convexity also means that the curve lies above each of its tangents:
with equality at the point of contact. We thus obtain a second, very useful definition of the free energy:
This minimum is not a mathematical coincidence: it is exactly the physical content of inequality (1). Among all equilibrium states with given volume and number of particles, but arbitrary entropies (and therefore arbitrary temperatures), the one that minimizes is the one whose slope equals , that is, the one in thermal equilibrium with the reservoir. The cup of coffee does indeed end up at room temperature.
Care is needed not to misinterpret this minimum: it is taken with respect to , not with respect to . The free energy is not minimal in temperature. On the contrary, in a stable phase,
so that is a concave function of temperature. The Legendre transform of a convex function is concave in the new variable.
3. The thermodynamic potentials
Any subset of the variables , and could be exchanged for their conjugate variables. The literature has essentially retained three functions, corresponding to the most common experimental situations at fixed amount of substance.
Their differentials are
so that their natural variables are
Together with the internal energy, we thus have four potentials, all of which contain the same information: knowing any one of them in terms of its natural variables is enough to determine the entire equilibrium thermodynamics of the system. A single representation suffices to describe a system completely; we choose the most convenient one according to the experimental conditions.
The differentials are easily recovered: start from the definition, differentiate, and replace by the fundamental relation. There is no need to memorize them. Note also that the natural variables of are , not : it can of course be expressed in terms of and , like any state function, but it is then no longer a fundamental equation.
3.1. The Helmholtz free energy
Identifying the coefficients of differential [eq:ch9-dF] gives the equations of state in the representation:
The free energy is the natural potential for systems of fixed volume in contact with a thermal reservoir. We have seen that it is then minimal at equilibrium, and we will see below that it also measures the maximum work that can be extracted from them.
It is also very convenient for calculations. For the monatomic ideal gas, the Sackur-Tetrode formula [eq:sackur-tetrode] of Lesson 7 and give, after simplification,
The entire thermodynamics of the ideal gas then fits on a single line. Differentiating with respect to gives back ; differentiating with respect to gives back the Sackur-Tetrode entropy, and differentiating with respect to gives the chemical potential obtained in Lesson 7 (check this). Compare this with the approach of Lesson 7, where we had to integrate the equations of state and the Gibbs-Duhem relation one after the other.
3.2. The enthalpy
The enthalpy exchanges volume for pressure. Its equations of state are
Its main interest is the following: at constant pressure, the change in enthalpy is the heat received. This result is so useful, in physics as well as in chemistry, that it deserves to be established carefully.
Consider a closed system evolving against a constant external pressure , with the work of pressure forces as the only work. This is the case for a saucepan open to the atmosphere, or for a gas enclosed under a piston loaded with a fixed mass. The work received is , and the first law reads
Suppose further that the initial and final states are in mechanical equilibrium with the surroundings: . We can then write , which gives
It is remarkable that this balance does not assume the process to be reversible: between the two states, the pressure of the system may be undefined, eddies may form, a chemical reaction may occur violently. All that matters is the constant external pressure and the initial and final mechanical equilibrium. This is what makes enthalpy the natural quantity for calorimetry in the open air: chemists thus tabulate enthalpies of reaction, and in the next lesson we will speak of enthalpies of fusion or of vaporization. When ice melts, its volume changes, and a balance written in terms of internal energy would have to account for the work exchanged with the atmosphere. The enthalpy already contains this term: its change directly gives the heat to be supplied.
For two neighboring equilibrium states at the same pressure, differential [eq:ch9-dH] reduces to , which is the heat received along a locally reversible path. The heat capacity at constant pressure of Lesson 9 can therefore also be written
just as . For the monatomic ideal gas, : like , the enthalpy depends only on temperature, and we immediately recover Mayer's relation .
3.3. The Gibbs free energy
By exchanging both for and for , we obtain the Gibbs free energy , with natural variables . Its equations of state are
It has a remarkable property. For an extensive pure substance, the Euler relation of Lesson 7, , immediately gives
The chemical potential is therefore nothing other than the Gibbs free energy per particle. For a mixture of species, we similarly obtain . This shows why is so important in chemistry: at fixed temperature and pressure, which is the case for most reactions carried out on a lab bench, we simply have , and the change in contains only the changes in the amounts of substance.
By differentiating and comparing with , we also recover the Gibbs-Duhem relation, written for the per-particle quantities and :
It is in this form that it will be useful for phase transitions.
As with the Helmholtz free energy, the Gibbs free energy is minimal at equilibrium when the external conditions correspond to its natural variables. Consider a closed system that exchanges heat with a thermal reservoir at and pressure work with surroundings at constant pressure , with no other work. The first and second laws give
Eliminating the heat between these two relations, we obtain
For states at temperature and pressure , the function coincides with . By the same reasoning as for , if constrained states at and all reach the same equilibrium once the constraints are lifted, this equilibrium achieves the minimum of among them.
\small \renewcommand{\arraystretch}{1.4} \begin{tabular}{llll} Imposed conditions & Potential & Differential & At equilibrium
\hline , , (isolated system) & & & maximum
, , & & & minimum
, , (thermal reservoir) & & & minimum
, , & & & minimum
, , (thermal reservoir and pressure) & & & minimum \end{tabular}
At constant external pressure, with initial and final mechanical equilibrium, the heat received is .
4. The Maxwell relations
Each potential provides, through the equality of its mixed second derivatives, its own Maxwell relations, exactly as and did in Lesson 7. They are always obtained in the same way: write the differential of the potential, identify the first derivatives, then apply Schwarz's theorem. For example, differential [eq:ch9-dF] gives and , and the equality
reads . At fixed amount of substance, the three most useful relations are thus
The first and third are valuable: they express entropy changes, which cannot be measured directly, in terms of derivatives of the equation of state or , which are accessible to experiment. We already encountered them in Lesson 9 when relating the calorimetric coefficients to the thermoelastic coefficients. The potentials simply allow them to be recovered immediately.
Derivatives with respect to the amount of substance provide further relations. For example, from ,
For a pure substance, the left-hand side is simply or , and we recover the Gibbs-Duhem relation .
Finally, let us recall that all these formulas were obtained by changes of variables: they bring no new physical information compared with the fundamental relation. Their value is practical: they make it possible to find the right relation quickly in the variables of the experiment.
5. What is minimized at equilibrium?
5.1. Internal variables
Saying that is minimal at equilibrium at fixed , and may seem paradoxical: if the three natural variables of are fixed, so is its value, and it is not clear with respect to what it should be minimized. The paradox disappears once we recall that the principle compares constrained states. We must therefore always specify what remains free inside the system: the position of a wall, the distribution of particles between two compartments, the proportion of a phase, and so on.
Let denote such an internal variable. For each value of , we can imagine locking the system with a suitable constraint and calculating its free energy ; the semicolon is a reminder that , and are fixed from outside. Equilibrium corresponds to the value of that minimizes this function. If the minimum is reached in the interior of the allowed domain and the function is smooth, then
The first condition is the stationarity condition; the second expresses local stability. But, as for entropy, a local minimum is not necessarily the global minimum: to make sure, all the allowed values of must be compared.
5.2. Example: a movable wall between two gases
Two ideal gases, containing and particles, occupy a cylinder of fixed total volume . They are separated by a movable, frictionless wall that is impermeable to matter. The whole is in thermal contact with a thermal reservoir at temperature . What is the equilibrium position of the wall?
Let us take the volume of the first gas as the internal variable, so that . At fixed temperature, the free energy of the ideal gas calculated above depends on volume only through the term . The total free energy is therefore
where collects all the terms independent of . Its derivative is
Stationarity gives back mechanical equilibrium, , hence
Finally, the second derivative
is strictly positive for every position of the wall. The function therefore has a single minimum, which is global. The potential gives back the condition of mechanical equilibrium, and in addition guarantees that this equilibrium is stable: if the wall is displaced, the pressure of the compressed compartment increases and pushes it back.
5.3. Internal variables versus imposed parameters
Internal variables must not be confused with parameters imposed from outside. Changing or means comparing two different experiments, not two states of the same experiment. The minimum principle therefore says nothing about the sign of the second derivatives of a potential with respect to its natural variables. Indeed, for a stable phase, Lesson 9 gives
and
The Helmholtz free energy is convex in volume but concave in temperature; the Gibbs free energy is concave in both of its variables. The rule is simple: the potentials remain convex with respect to the extensive variables they have retained, and become concave with respect to the intensive variables introduced by the Legendre transform.
6. The maximum recoverable work
The potentials also answer a very concrete question: what is the most work that can be extracted from a system in contact with a thermal reservoir? Let us return to the closed system in contact with a reservoir at , but now allow it to supply work to an external device: a weight being lifted, an electric circuit being powered. We count as positive when it is supplied by the system. This device is an ideal work source in the sense of Lesson 6: it receives energy, but no entropy. The entropy balance of the isolated whole therefore remains
At fixed volume, the first law reads . Combined with the preceding inequality, this gives
If the initial and final states are at temperature , we obtain
The work that can be extracted from a system in contact with a thermal reservoir is therefore bounded by the decrease in its free energy, not by that of its internal energy. This is what earned its name, due to Helmholtz: only part of the energy is “free” to be converted into work. The remainder, , must be exchanged as heat with the reservoir for the second law to be satisfied.
At constant external pressure , part of the work is used to push back the atmosphere and cannot be recovered. Let us separate it from the useful work:
We similarly obtain , that is, for initial and final states at and ,
In both cases, equality is reached only if the total entropy does not change, that is, for a globally reversible process; a locally reversible process will do. Any irreversibility reduces the work recovered between the same initial and final states.
A fine example is the fuel cell, which produces liquid water from hydrogen and oxygen, at and bar, while supplying electrical work. For one mole of water formed, thermochemical tables give and . If we simply burned the hydrogen, we would recover at best of heat. The fuel cell, by contrast, can supply at most of electrical work, or about of the reaction enthalpy; the remainder is necessarily released to the atmosphere as heat, because the entropy of the system decreases during the reaction. This maximum work also sets the maximum voltage of the cell, about V.
7. Toward phase transitions
Let us conclude by showing how the Gibbs free energy allows us to understand the coexistence of two phases of the same pure substance, which will be the starting point of the next lesson. Consider particles that can be distributed between two phases, denoted and : ice and liquid water, for example. The system is held at fixed temperature and pressure , and we neglect surface effects between the two phases. Each phase is an extensive system, with Gibbs free energy and , so that
The internal variable here is the distribution of particles between the two phases. If particles are transferred from phase to phase , then and
If , increasing the amount of phase decreases : the system tends to transform entirely into phase . At given temperature and pressure, the stable phase is therefore the one with the lowest chemical potential. The two phases can coexist at equilibrium only if
We recover the condition of equal chemical potentials from Lesson 8, but it takes on a new meaning here: it is an equation relating and . We will see in the next lesson that it defines the coexistence curves of the phase diagram.
Finally, note that when this condition is satisfied, no longer depends on the distribution : all proportions of the two phases are equally acceptable. The Gibbs free energy fixes the conditions for coexistence, but not the amounts of each phase. These are determined by other constraints, such as the total energy or volume. This is why, when a mixture of water and ice is gradually heated at atmospheric pressure, the ice melts little by little without any change in temperature: the heat received changes the proportions of the phases, not .
8. Summary
The thermodynamic potentials contain nothing more than the fundamental relation. They are rewritings of it, obtained by Legendre transform, in which the natural variables are those imposed by the experiment. Each one inherits a specific role: is minimal at equilibrium in contact with a thermal reservoir and bounds the recoverable work, gives the heat exchanged at constant pressure, and is minimal at fixed temperature and pressure. For a pure substance, the latter is simply . It is these last two potentials that will allow us, in the next lesson, to build the theory of phase transitions.