This temperature change is known as the Joule–Thomson effect, and is exploited in the liquefaction of gases.
Inversion temperature depends on the nature of the gas.
For a van der Waals gas we can calculate the enthalpy
are constants depending on intermolecular forces and molecular volume, respectively.
From this equation, if enthalpy is kept constant and there is an increase of volume, temperature must change depending on the sign of
Therefore, our inversion temperature is given where the sign flips at zero, or where
, an expansion at constant enthalpy increases temperature as the work done by the repulsive interactions of the gas is dominant, and so the change in kinetic energy is positive.
, expansion causes temperature to decrease because the work of attractive intermolecular forces dominates, giving a negative change in average molecular speed, and therefore kinetic energy.