Thermodynamics studies the energy changes accompanying physical and chemical processes in macroscopic systems, considering only initial and final equilibrium states, not the rate or mechanism of change. The system, surroundings and boundary are defined, and systems are classified as open, closed or isolated by their exchange of matter and energy. The internal energy
is a state function whose change in an adiabatic process equals the work done; combined with heat it gives the first law of thermodynamics,
, an expression of energy conservation. Pressure-volume work is examined for reversible, irreversible and free expansions. Enthalpy is defined as
, with the heat absorbed at constant pressure equal to
, related to
by
, and with
for an ideal gas. Calorimetry (bomb and constant-pressure) measures these quantities. Standard reaction, formation, combustion, atomisation, bond, lattice (via the Born-Haber cycle) and solution enthalpies are introduced, together with Hess's law of constant heat summation. Spontaneity requires more than a fall in enthalpy: the entropy
, a measure of disorder, and the second and third laws are introduced, and Gibbs energy
provides the criterion
for a spontaneous change. Finally,
links Gibbs energy to chemical equilibrium.