# Why is the gas energy in a g-field 5/2KNkT ?

 Sci Advisor Thanks P: 2,150 The equipartition theorem holds true only for phase-space degrees of freedom that enter quadratically in the Hamiltonian. For an ideal gas in a homogeneous gravitational field you have for the single-particle Hamiltonian $$H=\frac{\vec{p}^2}{2m}+m g z.$$ The classical probility distribution is thus given by $$P(\vec{x},\vec{p})=\frac{1}{Z} \exp[-\beta H(\vec{x},\vec{p})].$$ The mean kinetic energy for particles in a cubic box of length $L$ thus is $$\langle E_{\text{kin}} \rangle=\frac{3}{2} T$$ and the mean potential energy $$\langle m g z \rangle=m g L \left (1+\frac{1}{\exp(m g L/T)-1} \right )-T.$$