Gibbs free energy (source code)

= Gibbs free energy
{c}
{title2=$G$}
{wiki}

= Gibbs energy
{c}
{synonym}

The <Gibbs free energy> is
$$
G=U-TS+pV=H-TS,\qquad H=U+pV,
$$
where $H$ is <enthalpy>. For a <closed system> of fixed composition, with only <pressure>-<volume (thermodynamics)> <work>, spontaneous relaxation at fixed <temperature> and <pressure> cannot increase $G$; stable <thermodynamic equilibrium> minimizes it over the allowed states. A loaded piston can move while maintaining the imposed <pressure>, so the <enthalpy> term includes the displacement cost. Along a smooth equilibrium branch of fixed composition,
$$
dG=-S\,dT+V\,dp.
$$
Thus its <temperature> slope at fixed <pressure> is $-S$, while its <pressure> slope at fixed <temperature> is $V$. See https://ocw.mit.edu/courses/5-60-thermodynamics-kinetics-spring-2008/7bc33304ab1db561a64b4a6b12e25476_5_60_lecture13.pdf[MIT 5.60, Lecture 13, Gibbs free energy and its derivatives].

Consider two illustrative <thermodynamic phases>, A and B, of the same substance at one fixed <pressure>. Write B minus A, using quantities per <mole>:
$$
\Delta H=12\,\mathrm{kJ\,mol^{-1}},\qquad
\Delta S=40\,\mathrm{J\,mol^{-1}\,K^{-1}}=0.040\,\mathrm{kJ\,mol^{-1}\,K^{-1}}.
$$
Treat these differences as approximately constant over a limited <temperature> window. Then
$$
\frac{\Delta G(T)}{\mathrm{kJ\,mol^{-1}}}=12-0.040\frac{T}{\mathrm K},\qquad
T_* =\frac{\Delta H}{\Delta S}=300\,\mathrm K.
$$
At $280\,\mathrm K$, $\Delta G=+0.8\,\mathrm{kJ\,mol^{-1}}$, so A is preferred. At $320\,\mathrm K$, $\Delta G=-0.8\,\mathrm{kJ\,mol^{-1}}$, so B is preferred. At $300\,\mathrm K$, both have equal molar <Gibbs free energy>, permitting <phase coexistence> in this bulk model. B's greater <entropy> outweighs its greater <enthalpy> above the crossing.

\Image[/free-energy-temperature-crossing.png]
{title=Illustrative molar <Gibbs free energy> difference crosses zero at $300\,\mathrm K$}
{description=Constructed B-minus-A values: $+0.8\,\mathrm{kJ\,mol^{-1}}$ at $280\,\mathrm K$ and $-0.8\,\mathrm{kJ\,mol^{-1}}$ at $320\,\mathrm K$. The constants approximate a limited <temperature> window and represent no measured substance.}

Each plotted point compares alternatives at the same <temperature>; moving along the curve changes the imposed <temperature>. The model predicts preference, not instantaneous conversion: <nucleation> barriers can sustain <metastability>. Real <enthalpy> and <entropy> differences generally vary with <temperature> through <heat capacities>, bending this line outside the approximation.

At fixed <pressure>, the <first law of thermodynamics> gives $Q=\Delta H$ under the stated <work> restriction, so the same <thermal reservoir> accounting yields $\Delta S_{\rm total}=-\Delta G/T\geq0$. Variable composition restores $\sum_i\mu_i\,dn_i$ to $dG$; <constrained Gibbs minimization for chemical equilibrium> handles those permitted changes.

The historical foundation is Gibbs's https://en.wikisource.org/wiki/Scientific_Papers_of_Josiah_Willard_Gibbs,_Volume_1/Chapter_IIIa[On the Equilibrium of Heterogeneous Substances, first part completed in 1876, continued in 1878]{ref}. Its equations (87) and (91) introduce the combinations now called <Helmholtz free energy> and <Gibbs free energy>, connecting <entropy> criteria, <chemical potentials> and <phase coexistence> within one framework.