In astrophysics, an ideal gas is one whose particles obey the Maxwell–Boltzmann statistics and interact only through elastic collisions, without long-range forces. It provides an excellent approximation for the hot, low-density plasma inside stars, where interactions between particles are rare and short-lived.
The equation of state (EOS) of an ideal gas expresses the pressure \(P\) as a function of density \(\rho\) and temperature \(T\).
Consider a particle moving toward a wall with velocity \(\mathbf{v}\) and momentum \(\mathbf{p} = m\mathbf{v}\). Upon an elastic collision, it reverses direction, transferring momentum to the wall:
$$ \Delta \mathbf{p} = \mathbf{p}' - \mathbf{p} = -m\mathbf{v} - m\mathbf{v} = -2m\mathbf{v}. $$
Hence, \(+2m\mathbf{v}\) of momentum is imparted to the wall in each collision. Pressure is defined as the momentum transferred per unit area per unit time:
$$ P = N \frac{\Delta p}{\Delta t} \frac{1}{\Delta A}. $$
If the total number density of particles is \(n\), then the number hitting a single wall per unit time is \(N = (nV)/6 = (nv\Delta t \Delta A)/6\). Only one-sixth of all particles move toward a given wall (since there are six directions: ±x, ±y, ±z).
Substituting, we find:
$$ P = \frac{nv}{6} (2mv) = \frac{1}{3} n m v^2 = \frac{2}{3} n \left(\frac{1}{2} m v^2\right). $$
This shows that pressure is directly proportional to the kinetic energy density of the gas:
$$ P = \frac{2}{3} n E, $$
where \(E\) is the average kinetic energy per particle.
If the particles have a distribution of speeds (as in Maxwell–Boltzmann statistics), then
$$ P = \frac{2}{3} n E_{av}. $$
Pressure and kinetic energy density have identical dimensions (energy per volume). Although pressure is formally a tensor (involving both direction and force), it reduces to a scalar in an isotropic gas, where motion is equally probable in all directions.
For a gas following the Maxwell–Boltzmann distribution, the mean kinetic energy per particle can be derived as the expected value:
$$ E_{av} = \left(\frac{p^2}{2m}\right)_{av} = \int_0^\infty \frac{p^2}{2m} P(p)\,dp = \frac{3}{2} kT. $$
Thus, temperature \(T\) is a direct measure of the average kinetic energy of the particles.
This relation allows us to infer the spectral emission of a gas. A monatomic hydrogen gas at \(T = 12\ \text{MK}\) has \(E_{av} = kT = 1.5\ \text{keV}\), corresponding to photons with frequency \(h\nu \approx kT\), or about \(10^{17}\ \text{Hz}\) — in the X-ray range. At \(T = 6000\ \text{K}\), radiation shifts to the visible range, as in the solar photosphere.
For a monatomic gas, motion in the three spatial directions gives three degrees of freedom (DOF). Each contributes \(\tfrac{1}{2}kT\) to the energy, yielding
$$ E_{av} = \frac{3}{2} kT. $$
A diatomic gas has two additional DOFs — rotation and vibration — giving
$$ E_{av} = \frac{5}{2} kT. $$
However, in stellar interiors, molecules dissociate under extreme temperatures, so the gas is almost entirely monatomic and ionized.
In stellar interiors, pressure arises mainly from thermal motion of ions and electrons. Using the ideal gas law, the pressure is
$$ P = n kT = \frac{\rho}{m_{av}} kT, $$
where \(m_{av}\) is the average mass per particle.
For a fully ionized hydrogen plasma, each hydrogen atom contributes two particles (a proton and an electron), so \(m_{av} = m_p/2\). This form of the EOS,
$$ P = \frac{\rho kT}{m_{av}}, $$
is fundamental in stellar structure equations and serves as the foundation for hydrostatic equilibrium, virial balance, and energy transport analyses.
The more familiar form of the ideal gas law, \(PV = \mathsf{n}RT\), follows from \(n = \mathsf{n} N_0 / V\), where \(N_0\) is Avogadro’s number and \(R = k N_0\) is the universal gas constant.