An interactive demo created by Claude Opus 5.5, based on the lecture notes by Sang Hoon Lee (Statistical Physics 1, Chapter 1, Energy in Thermal Physics, Sections 1.1 to 1.3)

Temperature and Energy

Statistical physics studies the collective, emergent behavior of systems made of many particles. It starts with thermal physics, and thermal physics starts with two questions: what is temperature, and how is it related to energy?

Thermal equilibrium

Temperature has three definitions, each more fundamental than the last. Operationally, it is what you measure with a thermometer: put the thermometer in contact with the object and wait long enough. Alternatively, it is the thing that’s the same for two objects after they’ve been in contact long enough. Theoretically, it is a measure of an object’s tendency to spontaneously give up energy to its surroundings, made precise in Chapter 3.

Objects in thermal contact exchange energy spontaneously, in the form we call heat. Energy tends to flow from the hotter object to the colder one: statistically, but almost surely. After long enough, the exchange stops on average and the two are in thermal equilibrium; the time this takes is the relaxation time. Below, two blocks are made of cells that trade energy with their neighbors at random: each exchange simply splits the pair’s total energy at a random point. Nothing in the rule says “hot to cold,” yet that is what happens.

Color shows each cell’s energy, from cold (blue) to hot (red).
Block A Block B Newton’s law of cooling, fitted
Make A small to model a small object in a big environment.
The chance that an exchange across the boundary goes ahead.
\(T_A\) now
–
\(T_B\) now
–
Final \(T\), predicted
–
Relaxation time \(\tau\), fitted
–

Each block’s temperature here is its average energy per cell (in units where that average is \(k_{\mathrm{B}}T\)). With a poor contact, each block stays nearly uniform inside and the difference decays exponentially, which is Newton’s law of cooling:

\( \displaystyle \frac{dT}{dt} = r\left(T_{\text{env}} - T(t)\right) \)\( \displaystyle \Longrightarrow\; T(t) = T_{\text{env}} + \left(T(0) - T_{\text{env}}\right)e^{-t/\tau}, \)\( \displaystyle \tau = 1/r \)

With a good contact, the blocks are no longer uniform: heat must diffuse in from the boundary, and the simple exponential is only approximate. Thermal equilibrium is one of three kinds:

Exchanged quantityType of equilibrium
EnergyThermal
VolumeMechanical (important in heat engines)
ParticlesDiffusive (the chemical potential, later)

Measuring temperature

Most thermometers rely on thermal expansion. For a gas at constant pressure, the volume is proportional to temperature; at constant volume, the pressure is. Measure the pressure of a fixed volume of gas at several temperatures and the points fall on a straight line, and lines for different volumes all extrapolate to zero pressure at the same temperature, about \(-273.15\,^\circ\mathrm{C}\). That point is absolute zero, 0 K on the kelvin scale, the SI unit used in almost all thermodynamic equations. (Real gases liquefy before getting there.)

Constant-volume gas thermometer: three samples of the same gas at different fixed volumes.

Temperature scales

Celsius and kelvin share the same size of degree and differ only in their baseline. Fahrenheit (used mainly in the United States) puts ice at 32 °F and boiling water at 212 °F. Assuming a linear relation \(y = ax + b\) gives (Problem 1.1)

\( \displaystyle {}^\circ\mathrm{F} = \tfrac95\,{}^\circ\mathrm{C} + 32, \)\( \displaystyle \mathrm{K} = {}^\circ\mathrm{C} + 273.15, \)\( \displaystyle 0\ \mathrm{K} = -459.67\,^\circ\mathrm{F} \)

Type in any box:

Thermal expansion

Problems 1.7 and 1.8. The thermal expansion coefficient is the fractional change in volume per degree, \(\beta \equiv (\Delta V/V)/\Delta T\), and for a solid the linear coefficient is \(\alpha \equiv (\Delta L/L)/\Delta T\). Each side of a block grows as \(L' = L(1 + \alpha\Delta T)\), so

\( \displaystyle V' = V(1+\alpha_x\Delta T)(1+\alpha_y\Delta T)(1+\alpha_z\Delta T) \)\( \displaystyle = V\left[1 + (\alpha_x+\alpha_y+\alpha_z)\Delta T + O(\Delta T^2)\right] \)

and \(\beta = \alpha_x + \alpha_y + \alpha_z\), or \(\beta = 3\alpha\) for an isotropic solid, as long as \(\Delta T\) is small.

The expansion is exaggerated in the drawing; the numbers are real.

About 50 K separates a cold winter night from a hot summer day.
1 km steel bridge, \(\Delta L\)
–
Steel block, \(\Delta V/V\), exact
–
Using \(\beta = 3\alpha\)
–

Steel: \(\alpha = 1.1 \times 10^{-5}\ \mathrm{K}^{-1}\). Mercury, for comparison, has \(\beta = 1.81 \times 10^{-4}\ \mathrm{K}^{-1}\), and water’s \(\beta\) even turns negative below 4 °C.

The ideal gas

Many properties of a low-density gas are summarized in the ideal gas law:

\( \displaystyle PV = nRT \)\( \displaystyle PV = Nk_{\mathrm{B}}T \)

Here \(P\) is pressure and \(T\) temperature (both intensive), \(V\) volume (extensive), \(n\) the number of moles, \(R = 8.31\ \mathrm{J/(mol\,K)}\) a universal constant, \(N = nN_A\) the number of molecules with Avogadro’s number \(N_A = 6.02 \times 10^{23}\), and \(k_{\mathrm{B}} = R/N_A = 1.381 \times 10^{-23}\ \mathrm{J/K}\) is Boltzmann’s constant. This explains \(P \propto T\) at constant volume, approximately.

The exponential atmosphere

Problem 1.16. A slab of air of thickness \(dz\) and area \(A\) at rest must satisfy \([P(z+dz) - P(z)]A = -Nmg\). With \(V = Nk_{\mathrm{B}}T/P\), this becomes the barometric equation, and if \(T\) doesn’t change with height (a fair approximation),

\( \displaystyle \frac{dP}{dz} = -\frac{mg}{k_{\mathrm{B}}T}\,P \)\( \displaystyle \Longrightarrow\; P(z) = P(0)\,e^{-mgz/k_{\mathrm{B}}T} \)

Average air molecule: 29 u. Sea level: 1 atm. Real air cools with height, so the true values are somewhat lower.

Real gases

Problem 1.17. Real gases deviate from the ideal gas law, systematically described by the virial expansion, and approximately by the van der Waals equation, another equation of state:

\( \displaystyle PV = nRT\left(1 + \frac{B(T)}{V/n} + \frac{C(T)}{(V/n)^2} + \cdots\right), \)\( \displaystyle \left(P + \frac{an^2}{V^2}\right)(V - nb) = nRT \)

Expanding the van der Waals equation for small \(nb/V\) gives \(B(T) = b - a/RT\) and \(C(T) = b^2\). At low temperature attraction lowers the pressure (\(B < 0\)); at high temperature repulsion raises it (\(B > 0\)). Fit \(a\) and \(b\) to the measured \(B(T)\) for nitrogen by hand, or jump to the best fit.

Measured, nitrogen \(B(T) = b - a/RT\)
RMS misfit
–

At 1 atm the correction \(B/(V/n)\) is only about −2% at 100 K and well under 0.1% from 300 K up, so the ideal gas law is excellent for nitrogen at room temperature.

Temperature is kinetic energy

Now model the gas microscopically. One molecule bounces back and forth in a cylinder of length \(L\) with a piston of area \(A\). Each elastic collision with the piston changes its velocity by \(\Delta v_x = -2v_x\), and a round trip takes \(\Delta t = 2L/v_x\), so the average pressure on the piston is

\( \displaystyle \bar{P} = -\frac{m}{A}\,\frac{\Delta v_x}{\Delta t} = \frac{m v_x^2}{AL} \)\( \displaystyle = \frac{m v_x^2}{V} \)

Faster molecules collide both harder and more often, hence \(v_x^2\). For \(N\) identical, noninteracting molecules moving independently in random directions, \(\bar{P}V = Nm\overline{v_x^2}\). Comparing with \(PV = Nk_{\mathrm{B}}T\) gives \(\tfrac12 m\overline{v_x^2} = \tfrac12 k_{\mathrm{B}}T\), and the same holds for \(y\) and \(z\):

\( \displaystyle \bar{K}_{\text{trans}} = \tfrac12 m\overline{v^2} = \tfrac32 k_{\mathrm{B}}T, \)\( \displaystyle v_{\text{rms}} = \sqrt{\overline{v^2}} = \sqrt{\frac{3k_{\mathrm{B}}T}{m}} \)

The average kinetic energy is proportional to temperature, with \(k_{\mathrm{B}}\) as the conversion factor; at room temperature \(k_{\mathrm{B}}T \approx 1/40\ \mathrm{eV}\). Below, molecules fly around a box with no interactions; the program adds up the momentum they deliver to the right-hand wall and compares the result with \(Nk_{\mathrm{B}}T/V\).

A three-dimensional box seen from the front. Molecules flash when they hit the piston on the right.

The cross-section is 1 × 1, so \(V = L\).
Measured \(P\)
–
\(Nk_{\mathrm{B}}T/V\)
–
Ratio
–
Average \(K\), \(\tfrac32 k_{\mathrm{B}}T\) units
–

Units with \(m = k_{\mathrm{B}} = 1\). Velocities are drawn from the thermal distribution, then scaled so the sample’s average \(v_x^2\) is exactly \(k_{\mathrm{B}}T/m\): with no collisions between molecules, nothing else would even it out. The ratio settles toward 1 as the counts build up.

How fast are air molecules?

\(k_{\mathrm{B}}T\)
–
\(\bar{K}_{\text{trans}}\)
–

Hundreds of meters per second at room temperature. \(v_{\text{rms}}\) is not exactly the average speed, but a fine estimate of it; the full distribution of speeds comes in Chapter 6.

Equipartition of energy

The translational kinetic energy splits equally among the three directions, \(\tfrac12 m\overline{v_x^2} = \tfrac12 m\overline{v_y^2} = \tfrac12 m\overline{v_z^2} = \tfrac12 k_{\mathrm{B}}T\). Any energy that is a quadratic function of a coordinate or velocity component (translational \(\tfrac12 mv_x^2\), rotational \(\tfrac12 I\omega_x^2\), elastic \(\tfrac12 k_s x^2\), and so on) is called a degree of freedom, and the

equipartition theorem says: at temperature \(T\), the average energy of any quadratic degree of freedom is \(\tfrac12 k_{\mathrm{B}}T\). For \(N\) molecules with \(f\) degrees of freedom each, and no other temperature-dependent forms of energy,

\( \displaystyle U_{\text{thermal}} = N f\,\tfrac12 k_{\mathrm{B}}T \)

(The proof comes in Section 6.3.) \(U_{\text{thermal}}\) isn’t the total energy, which includes \(mc^2\) for instance, so the theorem applies only to changes in energy. A monatomic gas such as He or Ar has \(f = 3\): its moment of inertia is too small for rotation to count. A diatomic molecule such as \(\mathrm{O_2}\) or \(\mathrm{N_2}\) adds two rotational axes and a vibration with both kinetic and potential energy, for \(f = 7\). A solid’s atoms vibrate in three directions, \(f = 6\).

But at room temperature the vibrations don’t contribute, so in effect \(f = 5\), rising to 7 only at higher temperature. Equipartition holds only in the classical regime; the quantum-mechanical explanation comes in Chapter 3. Here is a preview, computed from the quantum rotor and oscillator.

Heat capacity per mole, the slope of \(U_{\text{thermal}}\) (Section 1.6). Each plateau is \(f/2\) times \(R\).

Translation
–
Rotation
–
Vibration
–
Effective \(f\)
–

Each row counts how many of \(\tfrac12 k_{\mathrm{B}}T\) the motion actually holds. Real hydrogen is complicated by its two nuclear-spin forms, ignored here.