Fundamentals / Physics

Thermodynamics and statistical physics

Trace energy and entropy through processes, derive thermodynamic properties from microscopic states, and predict diffusion, heat capacity and equilibration.

Prerequisites Energy conservation, exponentials and logarithms.

Investigate with OneSimulation Separate the equilibrium temperature from the relaxation time

Read the subject in depth

Each volume develops its arguments in sequence, with worked problems and links to experiments.

How the course fits together

  1. Chapters 1–4

    Describe a system by its equilibrium state, then keep accounts of energy exchanged as heat and work. Entropy selects accessible changes. Counting microscopic states explains why two bodies in contact approach a common temperature.

  2. Chapters 5–8

    Build a partition sum from permitted energies to predict averages. Particle statistics change the occupancy of those levels. Following moving particles and repeated collisions then connects equilibrium averages to transport rates.

  3. Chapters 9–12

    Apply state counting to photons, lattice vibrations and chemical composition. Finally add a finite transfer rate to the equilibrium description and predict both the direction of change and the time taken to relax.

Chapters

  1. Equations of state and response functions

    Use compressibility and thermal expansion to predict what a pressure gauge will record when a material is heated in a closed vessel.

  2. Heat, work and the limits of a cycle

    Track changes of internal energy around a gas cycle and derive the temperature bound on the efficiency of a reversible engine.

  3. Thermodynamic potentials and phase boundaries

    Select the appropriate potential for a controlled experiment and infer the slope of a coexistence line from latent heat and volume change.

  4. Counting states and defining temperature

    Use a model of discrete energy sharing to derive thermodynamic temperature and distinguish a most probable configuration from one microscopic state.

  5. Partition functions and thermal fluctuations

    Calculate the occupation, heat capacity and energy fluctuations of a two-level system from a single partition function.

  6. Indistinguishable particles and quantum gases

    Use single-state occupancy to derive Fermi–Dirac and Bose–Einstein distributions and estimate when classical gas statistics cease to apply.

  7. Pressure and effusion from molecular motion

    Use velocity distributions to predict gas pressure and determine why particles passing through a pinhole have a different average energy.

  8. Diffusion from a random walk

    Derive a transport coefficient from a microscopic model and separate a diffusion length from a relaxation time in a finite container.

  9. Thermal radiation in a cavity

    Count electromagnetic states, derive the temperature scaling of radiation energy and connect a cavity measurement to emitted power.

  10. Vibrations and the Debye heat capacity

    Count vibrational modes in a solid and explain why a crystal’s low-temperature heat capacity follows a cube law.

  11. Chemical equilibrium and reaction extent

    Minimize Gibbs energy along a permitted reaction and predict a composition change when the system is compressed.

  12. Entropy production and relaxation

    Derive a measurable rate of entropy production during contact between finite bodies and test it using temperature histories.

Further chapters and interactive tutorials

  1. How a finite heat bath changes a fluctuation

    A tiny sample exchanges heat with its mounting plate inside an insulated chamber. A thermometer samples the same mean temperature whether the plate is large or small. Can the time record of the sample energy reveal the size of the plate?

  2. Counting occupied sites on a surface

    A surface with \(M\) identical sites exchanges particles with a gas. As the gas chemical potential rises, the coverage grows and eventually levels off. The same measurement also predicts the magnitude of number fluctuations, without estimating a time-dependent sticking rate.

  3. How a pair potential changes the gas pressure

    A low-density gas can measure its own intermolecular forces. At a prescribed temperature the first deviation from ideal behaviour is a volume. Its sign tells us whether overlap exclusion or attraction makes the larger contribution.

  4. Why two coexisting phases share a tangent

    A material prepared with an intermediate composition can separate into two regions of different compositions. Its total composition is conserved. How can a free-energy graph predict both final compositions and the amount of each phase?

  5. Extracting a length from thermal spin fluctuations

    A one-dimensional row of magnetic moments favours local alignment. At low temperature a snapshot can contain a long row of identical spins. An exact calculation distinguishes a large correlated domain from a thermodynamic phase with permanent order.

  6. Why only a narrow shell of a Fermi gas carries heat

    Heating a filled Fermi sea does not give every particle a classical thermal energy. Deep below the chemical potential, nearby states are already occupied. Quantifying the accessible states predicts both the low-temperature heat capacity and the shift of the chemical potential at fixed particle number.

  7. Mean-field ordering, response and the critical point

    Interactions can make a magnet favour a nonzero moment even when the applied field vanishes. Averaging the local exchange field gives a solvable model whose critical predictions can be compared with the exact one-dimensional chain.

  8. Design a thermometer with a countable energy spectrum

    How precisely can a single equilibrated degree of freedom measure temperature? Derive the reading distribution from the canonical ensemble, find the gap that makes it most informative, and analyse a detector that records no excitations at all.

Computational notebooks

Run the Python calculations in your browser and compare the figures with the derivations.

Problem sheets

Sheets 1–6 accompany the first twelve chapters. The final projects bring several methods together. Attempt each stage before opening its worked solution.

  1. State variables and energy conversionFor chapters 1 and 2

    Apply the local material response of Lecture 1 and the path-dependent energy balances of Lecture 2.

  2. Potentials, phase lines and countingFor chapters 3 and 4

    Relate the equilibrium derivatives of Lecture 3 to the microscopic state counts in Lecture 4.

  3. Populations and quantum statisticsFor chapters 5 and 6

    Use partition functions and single-state occupancies from Lectures 5 and 6 to diagnose thermal measurements.

  4. Molecular leaks and diffusing tracersFor chapters 7 and 8

    Use microscopic counting to distinguish a mean speed, an escape rate and a diffusive spreading rate.

  5. Radiation and vibrations as mode gasesFor chapters 9 and 10

    Connect equilibrium state counting to radiative transfer and distinguish a lattice heat capacity from electronic storage.

  6. Equilibrium, kinetics and irreversibilityFor chapters 11 and 12

    Separate a chemical equilibrium constant from a thermal relaxation coefficient and quantify entropy changes in a finite system.

  7. Can a fluctuation reveal attraction on a surface?

    Two surfaces have identical mean coverage at a chosen gas pressure. Repeated microscopy images nevertheless show different event-to-event scatter in the number of occupied sites. Determine whether interactions can account for the excess and design a measurement that distinguishes clustering from instrumental drift.

  8. Count atoms in a trap and predict the onset of condensation

    A dilute cloud of bosons is confined by three harmonic restoring forces. Cooling moves particles between one-particle states while the total atom number stays constant. Start with counted lattice points in quantum-number space and predict the temperature at which the excited states can no longer hold the whole cloud.

Final synthesis problem · Extract work from a finite hot body

Applied study

Connect heat exchange and thermal equilibrium to energy conservation, entropy and microstates.

Which temperature will two bodies reach?

Touch two metal blocks together inside an insulated container. Their final temperature is constrained by conservation of energy. That law alone also permits the hot block to heat up at the expense of the cold one. A second idea, entropy, selects the direction we actually observe. A third, thermal conductance, sets the time it takes.

Assume that each block is internally close to equilibrium and has a constant total heat capacity \(C_i\) in J/K. The blocks exchange heat but do no external work. A transfer \(dQ\) from block 1 to block 2 produces \(C_1dT_1=-dQ\) and \(C_2dT_2=dQ\). Adding and integrating gives

\[C_1T_1+C_2T_2=\text{constant},\]
\[T_*=\frac{C_1T_{1,0}+C_2T_{2,0}}{C_1+C_2}.\]

The second expression assumes the bodies have reached a common temperature. A larger heat capacity puts more weight on that block’s starting temperature.

Count the ways to share energy

At fixed total energy \(U\), suppose block 1 has energy \(U_1\). Weakly coupled blocks have \(\Omega_1(U_1)\Omega_2(U-U_1)\) accessible combinations of microscopic states. For an isolated equilibrium system with equally likely microstates, this multiplicity determines the probability of an energy partition. Taking \(S=k_B\ln\Omega\) turns the product into a sum. At its maximum

\[\frac{dS_{\rm total}}{dU_1}=\frac{1}{T_1}-\frac{1}{T_2}=0,\]
\[\frac{1}{T_i}=\frac{\partial S_i}{\partial U_i}.\]

Positive heat capacities make the curvature negative, since \(\partial^2S_i/\partial U_i^2=-1/(C_iT_i^2)\). Equal temperature thus maximises total entropy. Before equilibrium a small transfer from hot to cold increases entropy by \(dQ(1/T_{\rm cold}-1/T_{\rm hot})>0\). Temperatures here must be absolute.

From an isolated pair to a canonical ensemble

When a small system contacts a much larger reservoir, its temperature is effectively set by the reservoir. The chance of observing a particular microstate of energy \(E_j\) is proportional to the number of reservoir states at energy \(U-E_j\). Expand the reservoir entropy about \(U\):

\[S_R(U-E_j)\simeq S_R(U)-E_j/T.\]

Since multiplicity is exponential in entropy, the probability becomes

\[p_j=e^{-\beta E_j}/Z,\]

with \(\beta=1/(k_BT)\) and \(Z=\sum_j e^{-\beta E_j}\).

For one unit with levels \(0\) and \(\Delta\),

\[Z=1+e^{-\beta\Delta}.\]

If \(\Delta=k_BT\ln 3\), the excited state has probability \(1/4\) and mean energy is \(\Delta/4\). Raising temperature at fixed gap drives the two probabilities toward one half. This microscopic account relates heat capacity to the response of mean energy to temperature.

Same change of state, different heat and work

For a closed system the first law reads \(dU=\delta Q-\delta W\), with work positive when the system does it. Internal energy and entropy are state functions. Heat and work depend on the path. To see this, compare two ways for one mole of ideal gas initially at 300 K to expand to twice its volume.

During reversible isothermal expansion, \(p=RT/V\) and \(W=\int p\,dV=RT\ln2=1.73\) kJ. The ideal gas’s internal energy depends only on temperature, so \(Q=W\). Free expansion into an evacuated chamber inside an insulated shell instead gives

\[W=Q=0.\]

The final temperature is again 300 K. Both paths give the same gas entropy increase \(R\ln2=5.76\) J/K. In the reversible case the reservoir loses this much entropy, while in free expansion the insulated gas produces it internally. In the two-block problem the entropy production likewise measures irreversibility inside the chosen boundary.

Give the contact a conductance

Model a short thermal bridge by a constant conductance \(G\) in W/K with negligible heat storage. Its heat flow is \(\dot Q=G(T_1-T_2)\). Subtract the two heat balances to obtain

\[d(T_1-T_2)/dt=-G(1/C_1+1/C_2)(T_1-T_2).\]

The difference decays exponentially with \(\tau=C_1C_2/[G(C_1+C_2)]\). Meanwhile the entropy production rate is \(G(T_1-T_2)^2/(T_1T_2)\), which falls to zero at equilibrium.

The equilibrium temperature is independent of the bridge conductance, provided heat transfer can continue. The same energy balance for a body in contact with a reservoir gives a different time constant because the reservoir temperature stays fixed. Cooling a body in a room.

A hot block and a larger cold block

Take \(C_1=500\) J/K at 360 K, \(C_2=1500\) J/K at 300 K and \(G=2.0\) W/K. The common equilibrium temperature is \(315\) K. Block 1 eventually releases \(500(360-315)=22.5\) kJ and block 2 absorbs \(1500(315-300)=22.5\) kJ. The initial heat current is 120 W and \(\tau=187.5\) s.

To find the entropy change between the initial and final states, integrate \(dS=C\,dT/T\) for each block along a reversible reference path. The sum is

\[500\ln(315/360)+1500\ln(315/300)=6.42\,\mathrm{J/K}.\]

Energy transfer cancels between the two bodies. Their entropy changes have different magnitudes because they receive or lose heat at different temperatures.

Exercises on microscopic and macroscopic equilibrium

1. Count a small system by hand

Two groups each contain four distinguishable two-level units. Distribute four identical excitation quanta over the eight units, at most one quantum per unit, with all microstates equally likely. Which partition is most probable? Does it occur every time?

Count the microscopic arrangements

If group 1 has \(j\) quanta, the multiplicity is \(\binom4j\binom4{4-j}\). For \(j=0,1,2,3,4\) this gives \(1,16,36,16,1\), summing to 70. Equal sharing is the most probable partition, with probability \(36/70\). A small system shows substantial fluctuations around this partition. In macroscopic systems the relative spread of the energy share is typically much smaller.

2. Diagnose an energy-conserving prediction

From the worked initial state a proposed model raises the hot block by 3 K and lowers the colder block by 1 K. Test its energy and entropy changes for an isolated, passive pair.

Apply both thermodynamic laws

The net energy change is

\[500(3)+1500(-1)=0.\]

But \(500\ln(363/360)+1500\ln(299/300)=-0.86\) J/K to two decimals. The macroscopic change contradicts the second law for a passive isolated pair. An external device moving heat uphill would require a larger system boundary to account for its operation.

OneSimulation laboratory

Separate the equilibrium temperature from the relaxation time

Compare recorded OneSimulation runs on this page. To test your own inputs, download the notebook and model files and run the model in an activated OneSimulation environment.

The notebook couples two thermal capacities through their temperature inputs. Run its parameter, solve and comparison cells for each setting. The log-slope of \(T_1-T_2\) provides a measured decay rate. Its inverse is the measured relaxation time. Use the capacity-weighted mean at every stored time to estimate \(T_*\), since the two temperatures still differ at the final stored sample. Two-body thermal exchange model.

  1. Baseline. Start with heat capacities of 500 and 1500 J/K, initial temperatures of 360 and 300 K, and a 2 W/K bridge. Compare the time for the initial temperature difference to fall by a factor \(e\) with 187.5 s. Check entropy by calculating \(C_1\ln(T_1/T_{1,0})+C_2\ln(T_2/T_{2,0})\) across the stored history.
  2. Improve the bridge. Change conductance from 2 to 4 W/K and rerun. Predict which of the weighted mean and decay rate will double.
  3. Change the hot body. Restore the conductance and set heat_capacity_1 = 1500.0 J/K. Examine how the fitted rate and weighted mean both change. For each run compare the fitted rate with \(1/\tau\) within 0.1%, and check that the weighted mean drifts by less than 0.001 K.
Stored temperature histories from the coupled model
Thermal contactWeighted mean (K)Fitted decay rate (s⁻¹)Relaxation time (s)
500 J/K hot block, 2 W/K bridge315.000.005333187.50
500 J/K hot block, 4 W/K bridge315.000.01066793.75
1500 J/K hot block, 2 W/K bridge330.000.002667375.00
Doubling the bridge conductance cuts the relaxation time from 187.5 to 93.75 s. Increasing the hot block’s heat capacity instead doubles the time to 375 s.
Doubling the bridge conductance cuts the relaxation time from 187.5 to 93.75 s. Increasing the hot block’s heat capacity instead doubles the time to 375 s.
Download experiment files (ZIP) Extract the files together and open two_mass_thermal_exchange.ipynb in a local OneSimulation environment.
Try it · Two blocks approaching thermal equilibrium

The initial temperatures are the notebook’s 360 K and 300 K, with heat capacities 500 and 1500 J/K and conductance 2 W/K. Double the conductance to halve the relaxation time; restore it and set the first capacity to 1500 J/K to move the equilibrium to 330 K. These curves solve the same constant-property ODE analytically.

Open the corresponding OneSimulation notebook, code and output

Problem sheet 6 · Identify a heat capacity and a bridge conductance

Advanced study across the subject

Each sequence connects the course to detailed chapters in neighbouring subjects. The complete course PDF includes their derivations, examples and exercises.

Compare the ensemble construction with the particle-counting problems. The applications to electron and phonon gases supply a second derivation of the low-temperature heat capacities. Compare the choice of potential when passing to coexistence. Torsten Fließbach · Statistische Physik, 6th edition

  1. Reservoirs, useful work and mixtures

    Keep track of which reservoir fixes temperature, chemical potential or pressure. Close the energy and entropy balances before inferring the useful work or the coexisting phase fraction.

  2. Heat stored in quantum degrees of freedom

    Build the single-particle spectrum before taking the thermal average. Compare acoustic branches, magnetic ordering and paired electrons, and trace how a radiometer samples a photon reservoir.

  3. Irreversible heat transfer and fluctuating signals

    Measure a transport coefficient using a steady gradient and a decay. Derive the fluctuation that survives in equilibrium and work out which part of it a finite-bandwidth instrument measures.

  4. Ensembles, diffusion and finite data

    Contrast conservation along a microscopic orbit with apparent relaxation after coarse sampling. Test a diffusion law and infer an unknown thermal state from a sequence of noisy observations.

Recover a capacitance from the variance of its equilibrium voltage. Work out how much of that variance a finite-bandwidth probe can see.

Measure equilibrium field fluctuations with a capacitor

Further reading

  • Derive the ideal gas in the canonical ensemble, then study the failure of the independent-particle picture near a phase transition. Track which variables are held fixed in each derivative. David Tong · Statistical Physics

Compare specific topics with the university sources