Thermodynamics & Statistical Mechanics (Advanced)
Level 3 — Production Paper: From-Scratch Derivations & Explain-Out-Loud
Time limit: 45 minutes Total marks: 60
Instructions: Show every step. Where asked to "explain out loud", write the physical reasoning in words, not just algebra. Use / notation.
Question 1 — Legendre transforms & Maxwell relations (12 marks)
(a) Starting from the fundamental relation , construct the Gibbs free energy by two successive Legendre transforms. Write explicitly and identify and . (5)
(b) From , derive the Maxwell relation associated with . State the exactness (equality-of-mixed-partials) condition you used and why it holds. (4)
(c) Explain out loud: why is the natural potential to minimise for a system held at fixed and ? (3)
Question 2 — Canonical ensemble from scratch (12 marks)
(a) Derive the canonical (Boltzmann) probability by maximising the Gibbs entropy subject to normalisation and fixed average energy . Use Lagrange multipliers and identify . (6)
(b) Show that the average energy is and the Helmholtz free energy is . (4)
(c) Explain out loud what distinguishes a microstate from a macrostate, and how bridges them. (2)
Question 3 — Equipartition & a two-level system (10 marks)
(a) State the equipartition theorem and use it to give and for one mole of an ideal diatomic gas at room temperature (translational + rotational only). (4)
(b) A system has two non-degenerate levels at energies and . Write , then derive and show that the heat capacity (the Schottky anomaly). (6)
Question 4 — Quantum statistics & Fermi energy (12 marks)
(a) Write the Fermi–Dirac and Bose–Einstein occupation numbers and explain the sign that distinguishes them and its physical origin. (4)
(b) For a 3D free-electron gas at , derive the Fermi energy in terms of number density : Start from filling -space up to (include spin degeneracy 2). (6)
(c) Explain out loud the concept of Bose–Einstein condensation: why does a macroscopic occupation of the ground state occur below a critical temperature? (2)
Question 5 — Clausius–Clapeyron & Gibbs phase rule (8 marks)
(a) Derive the Clausius–Clapeyron equation from equality of chemical potentials across a phase boundary. (4)
(b) State the Gibbs phase rule . For a single-component substance, use it to determine the number of degrees of freedom at (i) the triple point and (ii) along a coexistence line. (4)
Question 6 — Code from memory (6 marks)
Write a short Python/NumPy snippet (pseudocode acceptable) that, given an array of energy levels E and temperature T, computes the partition function Z, the average energy <E>, and the Helmholtz free energy F. Comment each line with the physics. (6)
Answer keyMark scheme & solutions
Question 1 (12)
(a) From with . First transform to enthalpy (swap ): , so . (1) Then to Gibbs (swap ): . (1) (1) Hence (1) and . (1)
(b) Since is an exact differential, mixed second partials are equal: (1) (1) Substituting the first derivatives: (2) (Exactness holds because is a state function — its differential is path-independent.)
(c) At fixed the combined system+reservoir entropy change is , so spontaneous processes lower ; equilibrium is the minimum of . Full marks for connecting minimisation of to second-law maximisation of total entropy. (3)
Question 2 (12)
(a) Maximise with constraints and . (1) Lagrangian: . . (2) Solving: , so . (2) Normalisation gives , ; identifying with thermodynamics . (1)
(b) (2) From with : , hence . (2)
(c) A microstate is a complete specification of every particle's state (positions/momenta or quantum numbers); a macrostate is the set of microstates sharing the same macroscopic variables (). sums Boltzmann weights over all microstates, encoding how they aggregate into thermodynamics. (2)
Question 3 (10)
(a) Equipartition: each quadratic degree of freedom contributes to . (1) Diatomic (3 translational + 2 rotational) = 5 dof: . (2) . (1)
(b) . (1) (2) , with . . (2) So . (1)
Question 4 (12)
(a) : for Fermi–Dirac, for Bose–Einstein. (2) The arises from the Pauli exclusion principle (antisymmetric wavefunction, max one fermion per state); the from symmetric bosonic wavefunctions allowing unlimited occupation. (2)
(b) At electrons fill all states up to . Number of states in a sphere of radius with spin factor 2: (3) So . (1) Then (2)
(c) Below the excited states cannot accommodate all bosons (their maximum capacity saturates), so the remainder collapse into the single-particle ground state, giving macroscopic occupation — a phase transition driven purely by quantum statistics, not interactions. (2)
Question 5 (8)
(a) On a coexistence curve the two phases have equal chemical potential (molar Gibbs energy): . (1) Along the curve . With (per mole): . (1) (1) Latent heat , so (1)
(b) , single component . (1) (i) Triple point: phases (invariant, fixed T and P). (1.5) (ii) Coexistence line: (univariant, one free variable). (1.5)
Question 6 (6)
import numpy as np
def thermo(E, T, kB=1.380649e-23):
beta = 1/(kB*T) # inverse temperature 1/kT
w = np.exp(-beta*(E - E.min())) # Boltzmann weights (shifted for stability)
Z = w.sum() # partition function = sum of weights
p = w/Z # normalized occupation probabilities
Emean = np.sum(p*E) # <E> = sum p_i E_i
F = E.min() - kB*T*np.log(Z) # F = -kT ln Z (undo the shift)
return Z, Emean, FMarks: correct (1), weights/Z (2), (1.5), (1.5). Numerical shift for stability is a bonus but not required.
[
{"claim": "Two-level average energy = eps/(exp(beta*eps)+1)", "code": "beta,eps=symbols('beta eps',positive=True); Z=1+exp(-beta*eps); Emean=-diff(log(Z),beta); result = simplify(Emean - eps/(exp(beta*eps)+1))==0"},
{"claim": "Two-level heat capacity is Schottky form", "code": "kB,T,eps=symbols('k_B T eps',positive=True); b=1/(kB*T); Z=1+exp(-b*eps); Emean=eps*exp(-b*eps)/Z; C=diff(Emean,T); target=kB*(eps/(kB*T))**2*exp(eps/(kB*T))/(exp(eps/(kB*T))+1)**2; result = simplify(C-target)==0"},
{"claim": "Fermi energy from k_F: E_F=hbar^2/(2m)(3 pi^2 n)^(2/3)", "code": "hbar,m,n=symbols('hbar m n',positive=True); kF=(3*pi**2*n)**Rational(1,3); EF=hbar**2*kF**2/(2*m); target=hbar**2/(2*m)*(3*pi**2*n)**Rational(2,3); result = simplify(EF-target)==0"},
{"claim": "Diatomic C_V = 5/2 R", "code": "R=symbols('R',positive=True); dof=5; Cv=Rational(dof,2)*R; result = simplify(Cv-Rational(5,2)*R)==0"}
]