Thermodynamics

The gas that nobody counted

A box of gas holds however many molecules were put in it. A box of radiation holds however many photons the temperature says, because the walls make and destroy them until the free energy is least — and one dropped assumption changes every result. The pressure becomes a third of the energy density instead of two thirds, the entropy goes as the cube of the temperature, and the adiabatic index comes out at exactly four thirds.

Assumes: The curve that would not come down · Pressure is a rate of arrival, and the gas law falls out of counting

A gas exerts pressure because molecules arrive at the wall and bounce, and counting arrivals gives PV=23UPV = \tfrac23 U for a gas of slow particles. Radiation in a cavity is also made of things that arrive at walls, and the same counting gives a third rather than two thirds.

Energy, pressure and entropy of a gas nobody counted. The energy density, pressure and entropy density of blackbody radiation against temperature, on logarithmic axes, together with the pressure a monatomic gas of the same energy density would have. Every curve is a power of the temperature — the fourth for energy and pressure, the third for entropy — because the only length in the problem is the thermal wavelength and the only energy is kT. The pressure is exactly a third of the energy density, where an ordinary gas's is two thirds, a factor of 2: a photon carries momentum E/c and a slow molecule carries √(2mE), and that difference is the whole of it. Some values: at room temperature the radiation pressure is 1.86e-6 pascals, which is a ten thousand millionth of an atmosphere; at 1e+7 kelvin it is 2.52e+12, which is where radiation rather than matter holds a star up.
Fig. 1 Energy density, pressure and entropy density of blackbody radiation against temperature. The dashed line is the pressure a molecular gas of the same energy density would exert, which is twice as much.

That factor of two is the first of several differences, and all of them come from one thing that is different about the photons: there is no fixed number of them.

Why the number is not a variable

Put a litre of nitrogen in a flask and the number of molecules is whatever was put in. Heating the flask changes the pressure and the energy and leaves the number alone, because nothing in the physics creates or destroys a nitrogen molecule.

The walls of a cavity, at any temperature above zero, are emitting and absorbing photons continuously. Nothing conserves their number. So the number is not something that can be specified: it settles at whatever value makes the free energy least.

The thermodynamic statement of that is that the chemical potential is zero. The chemical potential is the free-energy cost of adding one more particle, and if the number is free to adjust then at equilibrium that cost must be nothing.

Everything else follows.

How many photons there are, which is not a number anybody chose. The number of photons per cubic metre in equilibrium radiation, against temperature. For an ordinary gas this quantity is an independent variable — a box can hold whatever was put into it — and here it is not: the walls emit and absorb until the free energy is least, and the number that results is fixed by the temperature alone, going as its cube. At the microwave background's 2.7255 kelvin it is 4.107e+8 per cubic metre, which is about four hundred million in the volume of a litre, and about sixteen hundred million photons for every proton in the universe. That ratio is one of the numbers cosmology is built on, and it is fixed because photon number is not conserved and baryon number is.
Fig. 2 The number of photons per cubic metre in equilibrium radiation, against temperature. For a gas this quantity is an independent variable; here it is fixed by the temperature alone.

The number density comes out as 16πζ(3)(kT/hc)316\pi\zeta(3)\,(kT/hc)^3, which is a cube of the temperature with no adjustable constant in it. At the microwave background’s 2.72552.7255 kelvin that is 4.11×1084.11\times10^8 per cubic metre — four hundred million photons in a litre of the emptiest space there is.

It is worth being clear about which quantity is doing the work, because “no fixed number” can sound like a technicality. In an ordinary gas the state is fixed by three numbers — say the temperature, the volume and the number of particles. For radiation the third is not available, so the state is fixed by two, and every property of the gas is therefore a function of the temperature and the volume alone. The pressure depends on the temperature and not on the volume; the energy density depends on the temperature and not on the volume; the number density likewise. A box of radiation twice the size at the same temperature is not denser or thinner, it is simply bigger, which is not how any material behaves.

Where the third comes from

The pressure of any gas is the rate at which momentum arrives at a wall, and what differs between the two cases is how much momentum a given energy carries.

A slow molecule of energy EE has momentum 2mE\sqrt{2mE}. A photon of energy EE has momentum E/cE/c. Doing the same counting with the second relation instead of the first gives

P=13uP = \tfrac13 u

where uu is the energy per unit volume, against P=23uP = \tfrac23 u for the slow gas.

The factor of two is not about photons being light or about radiation being different in kind. It is about the relation between energy and momentum, and any gas of particles moving at nearly the speed of light — electrons in a white dwarf that has been squeezed hard enough, for instance — has the same third.

The energy density itself is aT4aT^4 with a=4σ/ca = 4\sigma/c, which is the Stefan–Boltzmann law rewritten for the inside of a cavity rather than for what leaves through a hole. At room temperature the resulting pressure is 2×1062\times10^{-6} pascals, a ten thousand millionth of an atmosphere; at ten million kelvin it is 2.5×10112.5\times10^{11} pascals, and radiation is then holding the star up.

The three laws written for a gas that has no N

Writing the standard thermodynamic relations for the photon gas is a short exercise and it produces several results that look wrong until the reason is remembered.

Every step of a thermodynamic cycle can be traced for radiation as easily as for a gas, and the resulting engine’s efficiency comes out at Carnot’s — which is the check that the photon gas is a proper thermodynamic system rather than an analogy. It has a pressure, an energy density, an entropy and an equation of state, and all four behave.

The energy is proportional to the volume at fixed temperature. U=aVT4U = aVT^4, so doubling the box at constant temperature doubles the energy — which for an ordinary gas would require doubling the number of molecules, and here happens because the number doubles by itself.

The free energy is negative and is minus a third of the energy. F=UTS=aVT443aVT4=13aVT4F = U - TS = aVT^4 - \tfrac43 aVT^4 = -\tfrac13 aVT^4, which is PV-PV exactly. That the free energy is PV-PV is the statement that the Gibbs free energy G=F+PVG = F + PV is zero — and GG is the chemical potential times the number, so a zero chemical potential is the same fact seen from the other side.

And the entropy of a box of radiation is finite and computable with no arbitrary constant. S=43aVT3S = \tfrac43 aVT^3, with nothing left over to be fixed by a reference state, because the third law is satisfied automatically: as the temperature goes to zero so does the number of photons, and a box with nothing in it has no entropy.

Run a Carnot cycle with radiation as the working substance and the efficiency comes out at 1Tc/Th1 - T_c/T_h, as it must — the ceiling does not know what is in the cylinder. What is worth noticing is how different the intermediate steps look: an isothermal expansion of radiation admits heat while the pressure stays constant, since the pressure depends only on the temperature.

The history is compact and slightly out of order. Boltzmann derived the fourth-power law in 1884 from thermodynamics alone, using the one-third relation — which he took from Maxwell’s electromagnetic theory of radiation pressure — and a Carnot cycle. He did not need to know what radiation was made of, and photons were nineteen years away. That derivation is worth noticing because it establishes the whole equation of state from a mechanical fact about momentum and the second law, and it is one of the few places where thermodynamics predicts a number rather than merely relating two of them.

The exponent that decides whether a star can exist

Compress a box of radiation without letting heat in or out and the temperature rises. How the pressure responds is the adiabatic index, and here it is computable rather than assumed.

What happens when a box of light is made bigger. Pressure against volume along a constant-entropy expansion, for radiation and for two ordinary gases, each starting at the same pressure. The radiation curve is obtained by holding the entropy fixed — which means holding VT³ fixed, since the entropy density goes as T³ — and then evaluating the pressure, and the exponent read back off the result is 1.333333 against an exact 4/3. Radiation is therefore the softest of the three: it loses pressure most slowly under expansion and gains it most slowly under compression, which is exactly the property that makes a star supported by radiation pressure unstable. The temperature meanwhile falls as the cube root of the volume, so a box of light expanded by a factor of a thousand cools by a factor of ten — and that, applied to the whole universe, is why the microwave background is at 2.7 kelvin rather than at the several thousand it had when it was released.
Fig. 3 Pressure against volume along a constant-entropy expansion, for radiation and for two ordinary gases. The radiation curve’s exponent is read off the result rather than put in.

The entropy density is 43aT3\tfrac43 aT^3, so holding the entropy constant means holding VT3VT^3 constant. The temperature therefore falls as the cube root of the volume, the pressure as the fourth power of the temperature, and

PV4/3=constant.PV^{4/3} = \text{constant}.

Fitting the exponent to the computed curve gives 1.3333331.333333.

That number is not merely smaller than a monatomic gas’s 5/35/3. It is the value at which a self-gravitating sphere ceases to be stable: squeeze such a body a little and the pressure rises by exactly as much as gravity does, so there is no restoring force at all. A star supported mostly by radiation is therefore marginally stable, and how far below four thirds its effective index sits is what decides whether it survives.

That is why there is an upper limit to the mass of a star. The heavier a star is, the larger the fraction of its support that comes from radiation, and the closer its effective index creeps to four thirds; above a few hundred solar masses it is close enough that ordinary perturbations are not restored.

There is one more consequence of the missing variable, and it is the one that makes the gas useful as a thermometer. Because every property depends on the temperature alone, measuring any of them measures the temperature: the total power through a hole, the position of the spectral peak, the pressure on a vane, the number density. Four independent measurements, one answer, and no calibration against a substance. That is why a cavity at a known temperature is the primary standard for radiometry, and why the microwave background’s temperature is quoted to five figures from a spectrum with no free parameters left in it.

The whole universe, expanded adiabatically

The same arithmetic run on a much larger box gives the temperature of the sky.

A photon’s energy changes when the geometry it is travelling through does, and the expansion of the universe is the version of that with no gravitating body in sight. The cosmic background is a photon gas expanded adiabatically for thirteen billion years: its spectrum has stayed Planckian throughout, with only the temperature falling — which is a strong statement, since almost nothing else survives that kind of stretching unchanged in form.

The early universe was hot, dense and dominated by radiation, and the expansion was slow enough compared with the interaction rates that it was adiabatic to a very good approximation. Holding VT3VT^3 constant with VV going as the cube of a scale factor gives

T1a,T \propto \frac{1}{a},

so the temperature falls in inverse proportion to how much the universe has stretched. The photons that were released when the universe became transparent, at about 30003000 kelvin, arrive now at 2.72552.7255 — the ratio being the factor by which everything has grown since.

Two features of that are worth separating.

The number of photons per comoving volume is unchanged. The number density goes as T3T^3 and the volume as 1/T31/T^3, so no photons were created or destroyed by the expansion. What changed is where they are and how much energy each has.

The spectrum stays a blackbody spectrum. An expansion that redshifts every photon by the same factor takes a Planck curve at one temperature to a Planck curve at a lower one, exactly, which is why the microwave background is the most precisely thermal spectrum ever measured despite nothing having been in equilibrium with it for thirteen thousand million years.

That second point is a stronger statement than it looks. It relies on the number density scaling in exactly the right way; a gas of massive particles expanding freely does not keep a thermal spectrum, because its energies and its number density scale differently.

The same third, wherever the particles are fast

Nothing in the derivation of the one third used the fact that photons are photons, and it is worth seeing how far that goes.

Squeeze a degenerate gas until its particles move at nearly the speed of light and its pressure–energy relation changes from two thirds to one third. That is the same third the photon gas has, and it arrives for the same reason: the relation between energy and momentum has become linear. So the factor is a statement about kinematics rather than about photons, and anything ultra-relativistic inherits it.

The step that mattered was replacing 2mE\sqrt{2mE} by E/cE/c in the momentum, and that replacement is right for any particle whose energy is much greater than its rest energy. So:

A degenerate electron gas becomes a one-third gas when it is squeezed hard enough. In a white dwarf of low mass the electrons are non-relativistic and the index is 5/35/3; compress it and they become relativistic, the index falls to 4/34/3, and the star loses its ability to resist. That is where the Chandrasekhar mass comes from, and the argument is the one in this essay applied to fermions instead of bosons.

A gas of neutrinos does the same. Massless or nearly so, they carry E/cE/c of momentum and contribute a pressure that is a third of their energy density, which is why the early universe’s expansion rate depends on how many species of them there are.

And the cosmological equation of state is written in exactly these terms. A component whose pressure is ww times its energy density dilutes as the volume to the power (1+w)-(1+w); radiation has w=1/3w = 1/3 and dilutes as a4a^{-4}, ordinary matter has w=0w = 0 and dilutes as a3a^{-3}, and the fact that the first is steeper is why the universe was radiation-dominated early and is not now.

The one third is therefore not a fact about light. It is a fact about anything moving at very nearly the speed of light, and the photon gas is the case in which it is exactly true.

What is being counted, and what is not

There is a temptation to say that a cavity contains a definite number of photons and that the formula gives it. What it gives is a mean.

A photon gas’s states are counted the way any gas’s are, with two changes: the number of things is not fixed, and swapping two of them produces no new arrangement. The first removes the chemical potential and the second makes them bosons — and between them those two changes turn the ordinary counting into Planck’s distribution without any further physics being supplied.

The number fluctuates, and it fluctuates more than a gas’s does. For a conserved gas the relative fluctuation in the particle number in a subvolume goes as one over the square root of the number; for photons there is an additional term, because photons are bosons and prefer to arrive together.

That extra term is measurable and was measured, in the guise of the excess noise in the intensity of thermal light. It is the same clustering that makes two thermal sources fail to produce fringes while their intensity correlations survive, which is the effect a stellar interferometer of the intensity kind was built on.

So the photon gas is not a gas whose number happens to be determined. It is a gas whose number is a fluctuating quantity with a mean fixed by the temperature, and the fluctuations are as characteristic as the mean.

Four hundred million photons and a quarter of a proton

The number density computed above becomes considerably more interesting when it is put beside the density of everything else.

A cubic metre of the universe holds 4.11×1084.11\times10^8 photons from the microwave background and about a quarter of a proton’s worth of ordinary matter. That is roughly one and a half thousand million photons per baryon, and the ratio is one of the handful of numbers cosmology treats as fundamental — it is fixed at whatever tiny asymmetry between matter and antimatter survived the early universe, since almost every baryon annihilated and left its photons behind.

The ratio also settles a question the essay’s own arithmetic raises. Hydrogen ionises at 13.6 electronvolts, which corresponds to a temperature of about 158,000 kelvin; so why did the universe not become transparent until it had cooled to some 3,000?

Because the photons vastly outnumber the atoms. Even when the typical photon is far too feeble to ionise anything, the exponential tail of a Planck spectrum still contains a fraction of photons above the threshold — and a tiny fraction of an enormous number is enough to keep every atom stripped. Cooling has to continue until that fraction falls below one in a thousand million or so, which costs another factor of fifty in temperature. The delay is essentially the logarithm of the photon-to-baryon ratio, and the transparency of the universe is dated by it.

Counting neutrinos with helium

The pressure being a third of the energy density has a second cosmological consequence, and it produced a particle-physics result before any accelerator did.

While radiation dominated, the universe’s expansion rate was set by the total energy density of everything moving at nearly the speed of light — photons, and also neutrinos, which contribute the same way for the same reason the essay gives. So the expansion rate depends on how many species of light particle exist.

That matters because the proportions of hydrogen and helium made in the first few minutes depend on how fast the universe was cooling when the weak interactions could no longer keep neutrons and protons in balance. Expand faster and the balance freezes out earlier, with more neutrons surviving, and more helium results.

The measured primordial helium abundance therefore counts light neutrino species, and by the 1980s it was telling cosmologists that the answer was three, or possibly four, and certainly not many. The accelerator measurement — reading the number off the width of the Z boson at LEP — came afterwards and agreed.

That is an unusually direct route from this page’s equation of state to a property of the particles. The one third fixed how the energy density drives the expansion; the expansion rate fixed a nuclear composition; and a chemical abundance measured in old stars counted a species of particle nobody could see.

Where the model runs out

Equilibrium is assumed throughout, and radiation is rarely in it. Sunlight is not blackbody radiation in a cavity; it is a beam from a distant hot surface, dilute by a factor of about fifty thousand. Its energy density corresponds to a temperature of about 6060 kelvin while its spectrum has the shape of 57725772, which is why the concentration a lens can achieve is bounded and why sunlight can be used to reach the Sun’s surface temperature and no higher.

The blackbody spectrum, against what classical physics predicted. Spectral exitance against wavelength for a blackbody at 3000, 4000, 5000 kelvin, in kilowatts per square metre per nanometre. Each curve peaks at the wavelength Wien's displacement law gives — 966 nm at 3000 K, 724 nm at 4000 K, 580 nm at 5000 K — and falls to nothing at short wavelengths.
Fig. 4 Planck curves at three temperatures. Everything in this essay is an integral over one of these, and the departure of real radiation from the shape is where the thermodynamics stops applying.

The photons are non-interacting. Photons do not scatter off one another to any measurable degree, so the gas reaches equilibrium only by talking to matter — the walls. A cavity with perfectly reflecting walls and nothing in it never thermalises at all, and would keep whatever spectrum it was given for ever.

The entropy is a bulk quantity and a cavity has a surface. For a cavity small compared with the thermal wavelength the mode counting that gives T3T^3 breaks down, and quantities acquire corrections depending on the shape as well as the volume. At room temperature that matters below a few micrometres.

And the index of four thirds is exact for pure radiation and no star is pure radiation. A real star’s support is a mixture, its effective index is somewhere between 4/34/3 and 5/35/3, and computing where is the whole of the stability calculation. The statement that four thirds is marginal is exact; the statement that a given star is near it is a modelling result.

How many photons there are, which is not a number anybody chose. The number of photons per cubic metre in equilibrium radiation, against temperature. For an ordinary gas this quantity is an independent variable — a box can hold whatever was put into it — and here it is not: the walls emit and absorb until the free energy is least, and the number that results is fixed by the temperature alone, going as its cube. At the microwave background's 2.7255 kelvin it is 4.107e+8 per cubic metre, which is about four hundred million in the volume of a litre, and about sixteen hundred million photons for every proton in the universe. That ratio is one of the numbers cosmology is built on, and it is fixed because photon number is not conserved and baryon number is.
Fig. 5 The photon number density again, marked at three temperatures spanning the microwave background, a room and a stellar surface. Nine orders of magnitude of temperature, twenty-seven of number.

The ladder from here

Later rungs on this anchor: the fluctuations in the photon number and what they say about photons being bosons; the thermodynamics of a gas of massless fermions, where the same relativistic relation gives the same third but the counting differs; the Casimir effect, where the zero-point part of the same mode sum produces a force between plates; and the entropy of radiation as an argument about the maximum work extractable from sunlight.

The neighbouring ladders are the curve that would not come down, where the spectrum everything here integrates comes from, light has a pressure, which is the mechanical version of the third, and the box of light that weighs something, which asks what the same box does when it is picked up.

Part 3 of 4

This essay is one argument about Blackbody. The others:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

Adiabatic indexBlackbodyChemical potentialCosmic microwave backgroundEntropyEquation of stateEquilibriumParticle numberPhoton gasRadiation pressureRelativistic gasStefan boltzmann