← Part II: Thermodynamics & Equations of State

Chemical Potential

Introduction: The Driving Force for Chemical Change

The chemical potential is arguably the most important intensive quantity in chemical thermodynamics. It governs every process involving the transfer of matter: chemical reactions, phase transitions, diffusion, osmosis, and the formation of mixtures. Just as temperature differences drive heat flow and pressure differences drive mechanical work, differences in chemical potential drive the transfer of matter from one phase, region, or chemical identity to another.

The chemical potential $\mu_i$ of species $i$ in a mixture answers the fundamental question: how much does the Gibbs energy of the system change when an infinitesimal amount of species $i$ is added, while temperature, pressure, and the amounts of all other species are held fixed?

At equilibrium, the chemical potential of each species must be the same in every phase and every region of the system. Any imbalance in chemical potential is a thermodynamic driving force that propels the system toward equilibrium. This principle unifies an enormous range of phenomena under a single mathematical framework.

Key Concept: Equilibrium Condition

For a system with multiple phases $\alpha, \beta, \gamma, \ldots$, thermodynamic equilibrium requires:

$$\mu_i^\alpha = \mu_i^\beta = \mu_i^\gamma = \cdots \quad \text{for every species } i$$

This condition, combined with thermal equilibrium ($T^\alpha = T^\beta$) and mechanical equilibrium ($P^\alpha = P^\beta$), completely specifies the state of a multi-phase, multi-component system at equilibrium.

Derivation 1: Chemical Potential from Thermodynamic Potentials

Definition via the Gibbs Energy

The chemical potential of species $i$ is defined as the partial molar Gibbs energy:

$$\mu_i \equiv \left(\frac{\partial G}{\partial n_i}\right)_{T,P,n_{j \neq i}}$$

This is the most natural definition because experiments are typically conducted at constant temperature and pressure. However, the chemical potential can equivalently be expressed as a partial derivative of any thermodynamic potential with respect to $n_i$, provided the appropriate natural variables are held constant.

Equivalence with Other Potentials

Starting from the fundamental equations for each thermodynamic potential, we can show that$\mu_i$ appears in all of them:

Internal Energy (natural variables S, V, n):

$$dU = TdS - PdV + \sum_i \mu_i \, dn_i$$

$\Rightarrow \mu_i = \left(\frac{\partial U}{\partial n_i}\right)_{S,V,n_{j \neq i}}$

Enthalpy (natural variables S, P, n):

$$dH = TdS + VdP + \sum_i \mu_i \, dn_i$$

$\Rightarrow \mu_i = \left(\frac{\partial H}{\partial n_i}\right)_{S,P,n_{j \neq i}}$

Helmholtz Free Energy (natural variables T, V, n):

$$dA = -SdT - PdV + \sum_i \mu_i \, dn_i$$

$\Rightarrow \mu_i = \left(\frac{\partial A}{\partial n_i}\right)_{T,V,n_{j \neq i}}$

Gibbs Free Energy (natural variables T, P, n):

$$dG = -SdT + VdP + \sum_i \mu_i \, dn_i$$

$\Rightarrow \mu_i = \left(\frac{\partial G}{\partial n_i}\right)_{T,P,n_{j \neq i}}$

Derivation of the Fundamental Equation for G

We start from the combined first and second laws for an open system. For a reversible process:

$$dU = TdS - PdV + \sum_i \mu_i \, dn_i$$

Since $G = U + PV - TS = H - TS$, we compute the total differential:

$$dG = dU + PdV + VdP - TdS - SdT$$

Substituting the expression for $dU$:

$$dG = (TdS - PdV + \sum_i \mu_i \, dn_i) + PdV + VdP - TdS - SdT$$

The $TdS$ and $PdV$ terms cancel, yielding:

$$\boxed{dG = VdP - SdT + \sum_i \mu_i \, dn_i}$$

This is the fundamental equation for the Gibbs energy of an open, multi-component system. At constant$T$ and $P$, it reduces to $dG = \sum_i \mu_i \, dn_i$, confirming that the chemical potential controls the change in Gibbs energy due to changes in composition.

Derivation 2: The Gibbs-Duhem Equation

Euler's Theorem and the Integrated Form of G

The Gibbs energy is an extensive quantity: if we scale all mole numbers by a factor $\lambda$while holding $T$ and $P$ fixed, then $G$ scales by the same factor. Mathematically, $G(T, P, \lambda n_1, \lambda n_2, \ldots) = \lambda \, G(T, P, n_1, n_2, \ldots)$.

By Euler's theorem for homogeneous functions of degree one, this implies:

$$G = \sum_i n_i \left(\frac{\partial G}{\partial n_i}\right)_{T,P,n_{j \neq i}} = \sum_i n_i \mu_i$$

This is the Euler equation for the Gibbs energy. It states that the total Gibbs energy is simply the sum of each species' mole number weighted by its chemical potential. This result is remarkable: it tells us that $G$ can be reconstructed entirely from the intensive quantities $\mu_i$.

Derivation of the Gibbs-Duhem Relation

Take the total differential of the Euler equation $G = \sum_i n_i \mu_i$:

$$dG = \sum_i n_i \, d\mu_i + \sum_i \mu_i \, dn_i$$

But we already know from the fundamental equation that:

$$dG = VdP - SdT + \sum_i \mu_i \, dn_i$$

Subtracting the fundamental equation from the total differential of the Euler equation:

$$\sum_i n_i \, d\mu_i + \sum_i \mu_i \, dn_i - VdP + SdT - \sum_i \mu_i \, dn_i = 0$$

The $\sum_i \mu_i \, dn_i$ terms cancel, giving the Gibbs-Duhem equation:

$$\boxed{\sum_i n_i \, d\mu_i = -SdT + VdP}$$

Gibbs-Duhem at Constant T and P

At constant temperature and pressure, the right-hand side vanishes:

$$\sum_i n_i \, d\mu_i = 0 \quad \text{(constant } T, P\text{)}$$

Dividing by the total number of moles $n = \sum_i n_i$ and introducing mole fractions $x_i = n_i / n$:

$$\boxed{\sum_i x_i \, d\mu_i = 0 \quad \text{(constant } T, P\text{)}}$$

This is a powerful constraint: in a mixture at constant $T$ and $P$, the chemical potentials of the components are not independent. If we know how $\mu$varies with composition for all but one component, the Gibbs-Duhem equation determines the remaining one. For a binary system, $x_1 \, d\mu_1 + x_2 \, d\mu_2 = 0$, so$d\mu_2 = -(x_1/x_2) \, d\mu_1$.

Derivation 3: Chemical Potential of Ideal Gas Mixtures

Pure Ideal Gas

For a pure ideal gas at constant temperature, the molar Gibbs energy satisfies:

$$dG_m = V_m \, dP = \frac{RT}{P} \, dP$$

Integrating from the standard pressure $P^\circ$ (typically 1 bar) to pressure $P$:

$$G_m(T,P) = G_m^\circ(T) + RT \ln\!\left(\frac{P}{P^\circ}\right)$$

Since for a pure substance the molar Gibbs energy equals the chemical potential ($G_m = \mu$):

$$\mu(T,P) = \mu^\circ(T) + RT \ln\!\left(\frac{P}{P^\circ}\right)$$

Ideal Gas Mixture: Partial Pressure Form

In an ideal gas mixture, each component behaves as if it alone occupied the entire volume at its partial pressure $P_i = x_i P$. The chemical potential of component $i$in the mixture is therefore:

$$\boxed{\mu_i(T, P, \{x\}) = \mu_i^\circ(T) + RT \ln\!\left(\frac{P_i}{P^\circ}\right)}$$

where $\mu_i^\circ(T)$ is the standard chemical potential of pure $i$at $P^\circ$ and temperature $T$.

Mole Fraction Form

Substituting $P_i = x_i P$ into the expression above:

$$\mu_i = \mu_i^\circ(T) + RT \ln\!\left(\frac{x_i P}{P^\circ}\right)$$

Using the properties of logarithms:

$$\boxed{\mu_i = \mu_i^\circ(T) + RT \ln x_i + RT \ln\!\left(\frac{P}{P^\circ}\right)}$$

The term $RT \ln x_i$ is always negative (since $0 < x_i < 1$), reflecting the fact that mixing always lowers the chemical potential in an ideal gas mixture. This is the thermodynamic origin of the entropy of mixing:$\Delta_{\text{mix}} G = nRT \sum_i x_i \ln x_i < 0$, confirming that mixing of ideal gases is always spontaneous.

Derivation 4: Equilibrium Constant from Chemical Potential

Equilibrium Condition for a Chemical Reaction

Consider a general gas-phase reaction $\sum_i \nu_i A_i = 0$ where $\nu_i$ are stoichiometric coefficients (positive for products, negative for reactants). At equilibrium at constant$T$ and $P$, the Gibbs energy is minimized, which requires:

$$\sum_i \nu_i \mu_i = 0 \quad \text{(at equilibrium)}$$

Substituting the ideal gas expression for each $\mu_i$:

$$\sum_i \nu_i \left[\mu_i^\circ(T) + RT \ln\!\left(\frac{P_i}{P^\circ}\right)\right] = 0$$

Separating the standard and non-standard parts:

$$\sum_i \nu_i \mu_i^\circ(T) + RT \sum_i \nu_i \ln\!\left(\frac{P_i}{P^\circ}\right) = 0$$

Deriving $\Delta G^\circ = -RT \ln K$

Identifying $\Delta G^\circ(T) = \sum_i \nu_i \mu_i^\circ(T)$ as the standard Gibbs energy of reaction, and using $\sum_i \nu_i \ln(P_i/P^\circ) = \ln \prod_i (P_i/P^\circ)^{\nu_i}$:

$$\Delta G^\circ + RT \ln \prod_i \left(\frac{P_i}{P^\circ}\right)^{\nu_i} = 0$$

We define the thermodynamic equilibrium constant as the product at equilibrium:

$$K(T) = \prod_i \left(\frac{P_i}{P^\circ}\right)^{\nu_i}\bigg|_{\text{eq}}$$

Yielding the central result:

$$\boxed{\Delta G^\circ = -RT \ln K}$$

This equation connects the measurable standard Gibbs energy of reaction (tabulated from calorimetric data) to the equilibrium composition. A large negative $\Delta G^\circ$ implies$K \gg 1$ (products favored), while a large positive $\Delta G^\circ$implies $K \ll 1$ (reactants favored).

The van't Hoff Equation

To find how $K$ depends on temperature, start from$\ln K = -\Delta G^\circ / (RT)$ and differentiate with respect to $T$. Using the Gibbs-Helmholtz equation:

$$\frac{\partial}{\partial T}\left(\frac{\Delta G^\circ}{T}\right)_P = -\frac{\Delta H^\circ}{T^2}$$

Since $\ln K = -\Delta G^\circ / (RT)$:

$$\boxed{\frac{d(\ln K)}{dT} = \frac{\Delta H^\circ}{RT^2}}$$

This is the van't Hoff equation. Its consequences are profound:

  • For an exothermic reaction ($\Delta H^\circ < 0$), increasing $T$ decreases $K$ — the equilibrium shifts toward reactants (Le Chatelier's principle).
  • For an endothermic reaction ($\Delta H^\circ > 0$), increasing $T$ increases $K$ — the equilibrium shifts toward products.
  • Integrating (assuming $\Delta H^\circ$ is approximately constant): $\ln\!\left(\frac{K(T_2)}{K(T_1)}\right) = -\frac{\Delta H^\circ}{R}\left(\frac{1}{T_2} - \frac{1}{T_1}\right)$

Applications of Chemical Potential

Chemical Equilibrium Calculations

The condition $\sum_i \nu_i \mu_i = 0$ combined with $\Delta G^\circ = -RT \ln K$allows quantitative prediction of equilibrium compositions from tabulated thermodynamic data.

  • Haber process: optimal T and P for NH$_3$ yield
  • Combustion equilibria at high temperatures
  • Acid-base equilibria in solution
  • Solubility product calculations

Reaction Spontaneity

The reaction Gibbs energy $\Delta_r G = \sum_i \nu_i \mu_i$ determines spontaneity under actual (non-standard) conditions:

$\Delta_r G = \Delta G^\circ + RT \ln Q$, where $Q$ is the reaction quotient. The reaction proceeds forward when $\Delta_r G < 0$(i.e., when $Q < K$).

Fugacity and Fugacity Coefficients

For real gases, the ideal gas expression is generalized by replacing pressure with fugacity $f_i$:

$\mu_i = \mu_i^\circ + RT \ln(f_i / P^\circ)$

The fugacity coefficient $\phi_i = f_i / (x_i P)$ measures the deviation from ideal behavior. For an ideal gas, $\phi_i = 1$. Fugacity coefficients can be computed from equations of state via $\ln \phi_i = \int_0^P (Z_i - 1) \, dP/P$.

Activity Coefficients

For non-ideal solutions (liquid or solid), the chemical potential is written in terms of activity$a_i$:

$\mu_i = \mu_i^\circ + RT \ln a_i = \mu_i^\circ + RT \ln(\gamma_i x_i)$

The activity coefficient $\gamma_i$ captures deviations from ideal solution behavior. Models such as Margules, van Laar, Wilson, NRTL, and UNIQUAC express $\gamma_i$ as functions of composition. The Gibbs-Duhem equation provides crucial consistency checks for these models.

Phase Equilibria and the Chemical Potential

Phase equilibrium requires $\mu_i^\alpha = \mu_i^\beta$ for each component across every pair of coexisting phases. This single condition, when combined with appropriate expressions for $\mu_i$ in each phase, produces all the classical results:

  • Clausius-Clapeyron equation for the slope of a one-component phase boundary: $dP/dT = \Delta_{trs} H / (T \Delta_{trs} V)$
  • Raoult's law for ideal solutions: $P_i = x_i P_i^*$ follows when $\gamma_i = 1$
  • Henry's law for dilute solutions: $P_i = K_{H,i} x_i$ with a composition-independent Henry's constant
  • Colligative properties (boiling point elevation, freezing point depression, osmotic pressure) all derive from the lowering of solvent chemical potential by solute

Historical Context

J. Willard Gibbs (1876)

Gibbs introduced the chemical potential in his monumental paper "On the Equilibrium of Heterogeneous Substances" (1876–1878). He recognized that the condition of equal chemical potential across phases provides the complete criterion for multi-component equilibrium. Gibbs' work was so far ahead of its time that it was largely unappreciated by chemists for decades, until translated into more accessible form by others. His formulation of the phase rule $F = C - P + 2$ is a direct consequence of the chemical potential framework.

Gilbert N. Lewis (1901–1923)

Lewis made Gibbs' abstract formalism practical by introducing the concepts of fugacity (1901) and activity (1907). Fugacity provides a "corrected pressure" that allows the ideal gas chemical potential formula to be applied to real gases. Activity extends this idea to condensed phases. Lewis and Randall's 1923 textbook "Thermodynamics" established these concepts as the standard working tools of chemical thermodynamics.

Pierre Duhem (1861–1916)

Duhem contributed to the mathematical foundations of chemical thermodynamics, particularly the constraint equation that bears his name (jointly with Gibbs). The Gibbs-Duhem equation establishes that the intensive properties of a system are not independently variable — a result with profound consequences for the thermodynamic consistency of experimental data and theoretical models. Duhem also contributed to the philosophy of science, arguing for the holistic nature of physical theories.

Simulation: Haber Process Equilibrium

The Haber process ($\text{N}_2 + 3\text{H}_2 \rightleftharpoons 2\text{NH}_3$) is the industrial synthesis of ammonia and a classic application of chemical potential and equilibrium thermodynamics. The reaction is exothermic ($\Delta H^\circ \approx -92$ kJ/mol), so the van't Hoff equation predicts that $K$ decreases with increasing temperature. However, higher temperatures are needed for reasonable reaction rates. The simulation below plots the equilibrium constant, NH$_3$ yield, and standard Gibbs energy as functions of temperature at several total pressures.

Haber Process: Equilibrium Composition vs Temperature

Python

Plots van't Hoff relation, K(T), NH3 mole fraction vs temperature at multiple pressures, and standard Gibbs energy for the Haber process N2 + 3H2 = 2NH3.

haber_equilibrium.py118 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Computation: Equilibrium Constants for Multiple Reactions

The Fortran program below computes equilibrium constants and thermodynamic quantities for several industrially important reactions (Haber, hydrogen iodide, water-gas shift, sulfur trioxide formation) across a range of temperatures. It also performs a Gibbs-Duhem consistency check for a binary ideal mixture, verifying that $\sum x_i \, d\mu_i = 0$ at constant $T$and $P$.

Equilibrium Constants & Gibbs-Duhem Verification

Fortran

Computes K(T), DG0, and ln K for N2+3H2=2NH3, H2+I2=2HI, CO+H2O=CO2+H2, and 2SO2+O2=2SO3. Also verifies the Gibbs-Duhem equation for a binary ideal mixture.

chemical_potential_eq.f90128 lines

Click Run to execute the Fortran code

Code will be compiled with gfortran and executed on the server

Summary of Key Results

ResultEquationSignificance
Definition of $\mu_i$$\mu_i = (\partial G / \partial n_i)_{T,P,n_j}$Partial molar Gibbs energy
Euler equation$G = \sum_i n_i \mu_i$G reconstructed from intensive quantities
Gibbs-Duhem$\sum_i n_i d\mu_i = -SdT + VdP$Constrains intensive variables
Ideal gas $\mu_i$$\mu_i = \mu_i^\circ + RT\ln(P_i/P^\circ)$Basis for equilibrium calculations
Equilibrium constant$\Delta G^\circ = -RT\ln K$Links thermodynamic data to composition
van't Hoff$d(\ln K)/dT = \Delta H^\circ/(RT^2)$Temperature dependence of K