Chemical-potential balance for a reaction (source code)

= Chemical-potential balance for a reaction
{title2=$\Delta_rG=\sum_i\nu_i\mu_i$}

Let a <chemical reaction> have signed <stoichiometric coefficients> $\nu_i$, positive for products. Changes of <amount of substance> satisfy $dn_i=\nu_i\,d\xi$, with <extent of reaction> $\xi$. At fixed <temperature> and <pressure>, the <Gibbs free energy> differential is
$$
dG=\sum_i\mu_i\,dn_i=\left(\sum_i\nu_i\mu_i\right)d\xi.
$$
Thus the <Gibbs energy of reaction> is $\Delta_rG=\sum_i\nu_i\mu_i$, using molar <chemical potentials> when $\xi$ is measured in <moles>.

An interior <chemical equilibrium> allows either sign of a small $d\xi$, so it requires $\Delta_rG=0$. A positive forward change lowers $G$ when $\Delta_rG<0$; a negative change lowers it when $\Delta_rG>0$. Stability additionally requires a constrained minimum, rather than stationarity alone.

At a boundary of allowed compositions, only one direction may be feasible. Then the necessary minimum condition is $\Delta_rG\,d\xi\ge0$ for every allowed small change. The zero-derivative equality must not be imposed on an infeasible reverse change.