= Entropy density of a photon gas
{title2=$s=4a_RT^3/3$}
The <entropy density of a photon gas> is its <entropy> per physical <volume (thermodynamics)>, $s=S/V$. For homogeneous equilibrium vacuum radiation with two states of <electromagnetic polarization> and zero <photon chemical potential>,
$$
s=\frac{u+p}{T}=\frac{4}{3}a_RT^3,\qquad
S=\frac{4}{3}a_RT^3V.
$$
The first equality is the <entropy density at zero chemical potential>, obtained from the <thermodynamic Euler relation> $U=TS-pV+\mu_\gamma N_\gamma$ with <internal energy> $U=uV$. The second uses the <photon gas> <equation of state>, $u=a_RT^4$ and $p=u/3$. If an independently constrained <photon> number gives a nonzero <chemical potential>, the general <entropy density> is $(u+p-\mu_\gamma n_\gamma)/T$ and $u=a_RT^4$ need not hold. This distinction explains why the absence of a conserved number matters for <entropy> as well as for the spectral shape. https://davidtong.org/teaching/statistical-physics/statmechhtml/S4#S4.SS4[David Tong, Statistical Physics, §4.4: Gibbs free energy and the thermodynamic Euler relation]{ref}
A short <first law of thermodynamics> check, for neighboring equilibrium states with $\mu_\gamma=0$, is
$$
T\,dS=dU+p\,dV
=4a_RT^3V\,dT+\frac{4}{3}a_RT^4\,dV,
\qquad
dS=\frac{4}{3}a_R\,d(T^3V).
$$
The <thermodynamic Euler relation> fixes the additive normalization. Equivalently, this radiation <entropy> tends to zero with <temperature> at fixed <volume (thermodynamics)>; no contribution from the containing walls is included. Interpreting $T\,dS$ as transferred <heat> and $p\,dV$ as boundary <work> requires a <reversible thermodynamic process>. For a <reversible thermodynamic process> that is also an <adiabatic process>, there is no <entropy production> or <entropy> exchange, so
$$
T^3V=\text{constant},\qquad
T=T_0\left(\frac{V_0}{V}\right)^{1/3},\qquad
pV^{4/3}=\text{constant},\qquad
U=U_0\left(\frac{V_0}{V}\right)^{1/3}.
$$
An irreversible <adiabatic process> can produce <entropy> even without <heat> exchange, so the word adiabatic alone is insufficient to infer $T^3V=\text{constant}$.
For an analytic example, expand an initially equilibrated <photon gas> reversibly from $V_0$ to $8V_0$, keeping only the same two <photon> states of <electromagnetic polarization>. Its <temperature> halves, its <energy density> becomes $u_0/16$, its <entropy density of a photon gas> becomes $s_0/8$, and its total <entropy> stays $S_0$. The <internal energy> halves rather than remaining fixed: the missing half leaves as <work> against <radiation pressure>,
$$
W=\int_{V_0}^{8V_0}p(V)\,dV=\frac{U_0}{2},\qquad
\Delta U=-W.
$$
This is a stipulated reversible radiation model, not a report of a piston experiment. Maintaining a real cavity along this path requires controlling wall <heat> exchange and including the wall <heat capacity> in any actual apparatus balance.
\Image[/photon-gas-entropy-adiabatic-work.png]
{title=Analytic reversible <photon gas> expansion: <entropy> conservation and <pressure> <work>}
{description=Original fixed-species model with $r=V/V_0$ from 1 to 8 and no <entropy production>. The left panel shows $T/T_0=r^{-1/3}$, $u/u_0=r^{-4/3}$ and $s/s_0=r^{-1}$ on a logarithmic vertical scale. The right panel plots $pV_0/U_0=r^{-4/3}/3$; the shaded <integral> is $W/U_0=1-8^{-1/3}=1/2$. Total <entropy> remains constant even though both <entropy density> and <internal energy> decrease.}
For a computed scale at stipulated $T=2.725\,\mathrm K$, $s\simeq2.04122\times10^{-14}\,\mathrm{J\,K^{-1}\,m^{-3}}$. Combining this with the <photon number density> gives
$$
\frac{S}{N_\gamma}=\frac{s}{n_\gamma}
=\frac{2\pi^4}{45\zeta(3)}k_B\simeq3.60157\,k_B.
$$
This is the total equilibrium radiation <entropy> divided by its mean <photon> number, not a separately assigned <entropy> carried by each labeled particle. During the ideal expansion, $n_\gamma\propto T^3$ and $T^3V$ is fixed, so the mean number $N_\gamma=n_\gamma V$ also stays constant. This follows from the path; it was not imposed as the independent number constraint used to establish <chemical potential>.
The beautiful connection is that expansion lowers each typical <photon> <energy> and dilutes the radiation in just the proportions needed to retain its equilibrium spectral shape and total <entropy>. For the <cosmic microwave background>, homogeneous <expansion of the universe> has physical <volume (thermodynamics)> proportional to the cube of the <scale factor>; fixed-species <cosmological entropy conservation> therefore gives $T\propto a^{-1}$. This describes preservation of an already established <Planck photon distribution> and connects the FIRAS spectral observation in <photon gas> to an <entropy> prediction; FIRAS did not perform a direct <entropy> measurement. When other equilibrated species disappear and transfer <energy> into radiation, use the <effective number of relativistic entropy degrees of freedom>, $g_{*s}$: the conserved quantity for the combined sector is $g_{*s}T^3V$, under the corresponding equilibrium and no-<entropy production> assumptions. A changing species population, separate decoupled sectors or <entropy production> requires an appropriate <entropy> balance rather than the pure <photon gas> formula. https://davidtong.org/teaching/cosmology/cosmohtml/S2#S2.SS5.SSS2[David Tong, Cosmology, §2.5.2: entropy conservation and heating when relativistic species disappear]{ref}
Back to article page