Gibbs–Duhem equation

In thermodynamics, the Gibbs–Duhem equation describes the relationship between changes in chemical potential for components in a thermodynamic system:


 * $$\sum_{i=1}^I N_i \mathrm{d}\mu_i = - S \mathrm{d}T + V \mathrm{d}p$$

where $$N_i$$ is the number of moles of component $$i, \mathrm{d}\mu_i $$ the infinitesimal increase in chemical potential for this component, $$S$$ the entropy, $$T$$ the absolute temperature, $$V$$ volume and $$p$$ the pressure. $$I$$ is the number of different components in the system. This equation shows that in thermodynamics intensive properties are not independent but related, making it a mathematical statement of the state postulate. When pressure and temperature are variable, only $$I-1 $$ of $$I$$ components have independent values for chemical potential and Gibbs' phase rule follows. The Gibbs−Duhem equation cannot be used for small thermodynamic systems due to the influence of surface effects and other microscopic phenomena.

The equation is named after Josiah Willard Gibbs and Pierre Duhem.

Derivation
Deriving the Gibbs–Duhem equation from the fundamental thermodynamic equation is straightforward. The total differential of the extensive Gibbs free energy $$G$$ in terms of its natural variables is


 * $$\mathrm{d}G =\left. \frac{\partial G}{\partial p}\right |_{T,N} \mathrm{d}p +\left. \frac{\partial G}{\partial T}\right | _{p,N} \mathrm{d}T +\sum_{i=1}^I \left. \frac{\partial G}{\partial N_i}\right |_{p,T,N_{j \neq i}} \mathrm{d}N_i.$$

Since the Gibbs free energy is the Legendre transformation of the internal energy, the derivatives can be replaced by their definitions, transforming the above equation into:


 * $$\mathrm{d}G =V \mathrm{d}p-S \mathrm{d}T +\sum_{i=1}^I \mu_i \mathrm{d}N_i $$

The chemical potential is simply another name for the partial molar Gibbs free energy (or the partial Gibbs free energy, depending on whether N is in units of moles or particles). Thus the Gibbs free energy of a system can be calculated by collecting moles together carefully at a specified T, P and at a constant molar ratio composition (so that the chemical potential does not change as the moles are added together), i.e.


 * $$ G = \sum_{i=1}^I \mu_i N_i $$.

The total differential of this expression is


 * $$ \mathrm{d}G= \sum_{i=1}^I \mu_i \mathrm{d}N_i + \sum_{i=1}^I N_i \mathrm{d}\mu_i$$

Combining the two expressions for the total differential of the Gibbs free energy gives


 * $$ \sum_{i=1}^I \mu_i \mathrm{d}N_i + \sum_{i=1}^I N_i \mathrm{d}\mu_i =V \mathrm{d}p-S \mathrm{d}T+\sum_{i=1}^I \mu_i \mathrm{d}N_i $$

which simplifies to the Gibbs–Duhem relation:


 * $$ \sum_{i=1}^I N_i \mathrm{d}\mu_i = -S \mathrm{d}T + V \mathrm{d}p $$

Alternative derivation
Another way of deriving the Gibbs–Duhem equation can be found by taking the extensivity of energy into account. Extensivity implies that


 * $$U(\lambda \mathbf{X}) = \lambda U (\mathbf{X})$$

where $$\mathbf{X}$$ denotes all extensive variables of the internal energy $$U$$. The internal energy is thus a first-order homogenous function. Applying Euler's homogeneous function theorem, one finds the following relation when taking only volume, number of particles, and entropy as extensive variables:


 * $$U = TS - pV + \sum_{i=1}^I \mu_i N_i$$

Taking the total differential, one finds


 * $$\mathrm{d}U = T\mathrm{d}S + S\mathrm{d}T - p\mathrm{d}V - V \mathrm{d}p + \sum_{i=1}^I \mu_i \mathrm{d} N_i + \sum_{i=1}^I N_i \mathrm{d} \mu_i $$

Finally, one can equate this expression to the definition of $\mathrm{d}U$ to find the Gibbs–Duhem equation


 * $$0 =S\mathrm{d}T - V \mathrm{d}p + \sum_{i=1}^I N_i \mathrm{d} \mu_i $$

Applications
By normalizing the above equation by the extent of a system, such as the total number of moles, the Gibbs–Duhem equation provides a relationship between the intensive variables of the system. For a simple system with $$I$$ different components, there will be $$I+1 $$ independent parameters or "degrees of freedom". For example, if we know a gas cylinder filled with pure nitrogen is at room temperature (298 K) and 25 MPa, we can determine the fluid density (258 kg/m3), enthalpy (272 kJ/kg), entropy (5.07 kJ/kg⋅K) or any other intensive thermodynamic variable. If instead the cylinder contains a nitrogen/oxygen mixture, we require an additional piece of information, usually the ratio of oxygen-to-nitrogen.

If multiple phases of matter are present, the chemical potentials across a phase boundary are equal. Combining expressions for the Gibbs–Duhem equation in each phase and assuming systematic equilibrium (i.e. that the temperature and pressure is constant throughout the system), we recover the Gibbs' phase rule.

One particularly useful expression arises when considering binary solutions. At constant P (isobaric) and T (isothermal) it becomes:


 * $$0= N_1 \mathrm{d}\mu_1 + N_2 \mathrm{d}\mu_2 $$

or, normalizing by total number of moles in the system $$N_1 + N_2,$$ substituting in the definition of activity coefficient $$ \gamma$$ and using the identity $$ x_1 + x_2 = 1 $$:


 * $$0= x_1 \mathrm{d}\ln(\gamma_1) + x_2 \mathrm{d}\ln(\gamma_2)$$

This equation is instrumental in the calculation of thermodynamically consistent and thus more accurate expressions for the vapor pressure of a fluid mixture from limited experimental data.

Ternary and multicomponent solutions and mixtures
Lawrence Stamper Darken has shown that the Gibbs–Duhem equation can be applied to the determination of chemical potentials of components from a multicomponent system from experimental data regarding the chemical potential $$\bar {G_2}$$ of only one component (here component 2) at all compositions. He has deduced the following relation


 * $$\bar{G_2}= G + (1-x_2) \left(\frac\right)_{\frac{x_1}{x_3}}$$

xi, amount (mole) fractions of components.

Making some rearrangements and dividing by (1 – x2)2 gives:


 * $$\frac{G}{(1-x_2)^2} + \frac{1}{1-x_2} \left(\frac{\partial G}{\partial x_2}\right)_{\frac{x_1}{x_3}} = \frac{\bar{G_2}}{(1-x_2)^2}$$

or


 * $$ \left(\mathfrak{d} \frac{G}{\frac{1 - x_2}{\mathfrak{d} x_2}}\right)_{\frac{x_1}{x_3}} = \frac{\bar{G_2}}{(1 - x_2)^2}$$

or


 * $$\left(\frac {\frac{\partial G}{1-x_2}}{\partial x_2}\right)_{\frac{x_1}{x_3}} = \frac{\bar{G_2}}{(1 - x_2)^2}$$ as formatting variant

The derivative with respect to one mole fraction x2 is taken at constant ratios of amounts (and therefore of mole fractions) of the other components of the solution representable in a diagram like ternary plot.

The last equality can be integrated from $$x_2 = 1$$ to $$x_2$$ gives:


 * $$G - (1 - x_2) \lim_{x_2\to 1} \frac{G}{1 - x_2} = (1 - x_2) \int_{1}^{x_2}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 $$

Applying LHopital's rule gives:


 * $$ \lim_{x_2\to 1} \frac{G}{1 - x_2} = \lim_{x_2\to 1} \left(\frac{\partial G}{\partial x_2}\right)_{\frac{x_1}{x_3}} $$.

This becomes further:


 * $$ \lim_{x_2\to 1} \frac{G}{1 - x_2} = -\lim_{x_2\to 1} \frac {\bar{G_2} - G}{1 - x_2}$$.

Express the mole fractions of component 1 and 3 as functions of component 2 mole fraction and binary mole ratios:


 * $$x_1 = \frac{1-x_2}{1+\frac{x_3}{x_1}}$$
 * $$x_3 = \frac{1-x_2}{1+\frac{x_1}{x_3}}$$

and the sum of partial molar quantities


 * $$G=\sum _{i=1}^3 x_i \bar{G_i},$$

gives


 * $$G= x_1 (\bar {G_1})_{x_2 =1} + x_3 (\bar {G_3})_{x_2 =1} + (1 - x_2) \int_{1}^{x_2}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 $$

$$(\bar{G_1})_{x_2 =1}$$ and $$(\bar{G_3})_{x_2 =1}$$ are constants which can be determined from the binary systems 1_2 and 2_3. These constants can be obtained from the previous equality by putting the complementary mole fraction x3 = 0 for x1 and vice versa.

Thus


 * $$(\bar {G_1})_{x_2 =1} = - \left(\int_{1}^{0}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 \right)_{x_3=0}$$

and


 * $$(\bar {G_3})_{x_2 =1} = - \left(\int_{1}^{0}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 \right)_{x_1=0}$$

The final expression is given by substitution of these constants into the previous equation:


 * $$G= (1 - x_2) \left(\int_{1}^{x_2}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 \right)_{\frac{x_1}{x_3}} - x_1 \left(\int_{1}^{0}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 \right)_{x_3=0} - x_3 \left(\int_{1}^{0}\frac{\bar{G_2}}{(1 - x_2)^2} dx_2 \right)_{x_1=0}$$