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

1. Mar 19, 2013

I am messing around with classical gasses using a demon algorithm, trying to reproduce the behavior of ideal gasses in various situations. Exitingly, this is working very well. Here are my findings so far:

Classical gas, 3D : E=1.497 NkT - the usual 3/2 NkT result

Classical gas, 2D : E=0.989 NkT - 2 DoF, so 2/2 NkT

Relativistic gas, 3D : E = 2.992 NkT - as expected, can be derived from equipartition

Classical gas, uniform gravitational field, 3D : E = 2.486 NkT

Now the last one quite surprises me. Why is that he case? Intuitevely I would expect 3 DoF on |p| and 3 DoF on x, so 6*1/2 NkT = 3NkT. Is there a hidden constraint?

2. Mar 20, 2013

### vanhees71

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.$$