Level 3 — ProductionThermodynamics & Statistical Mechanics (Advanced)

Thermodynamics & Statistical Mechanics (Advanced)

45 minutes60 marksprintable — key stays hidden on paper

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 dU=TdSPdVdU = T\,dS - P\,dV, construct the Gibbs free energy GG by two successive Legendre transforms. Write dGdG explicitly and identify (GT)P\left(\frac{\partial G}{\partial T}\right)_P and (GP)T\left(\frac{\partial G}{\partial P}\right)_T. (5)

(b) From dGdG, derive the Maxwell relation associated with GG. State the exactness (equality-of-mixed-partials) condition you used and why it holds. (4)

(c) Explain out loud: why is GG the natural potential to minimise for a system held at fixed TT and PP? (3)


Question 2 — Canonical ensemble from scratch (12 marks)

(a) Derive the canonical (Boltzmann) probability pieβEip_i \propto e^{-\beta E_i} by maximising the Gibbs entropy S=kBipilnpiS = -k_B\sum_i p_i \ln p_i subject to normalisation and fixed average energy E\langle E\rangle. Use Lagrange multipliers and identify β\beta. (6)

(b) Show that the average energy is E=lnZβ\langle E\rangle = -\frac{\partial \ln Z}{\partial \beta} and the Helmholtz free energy is F=kBTlnZF = -k_B T \ln Z. (4)

(c) Explain out loud what distinguishes a microstate from a macrostate, and how ZZ bridges them. (2)


Question 3 — Equipartition & a two-level system (10 marks)

(a) State the equipartition theorem and use it to give E\langle E\rangle and CVC_V 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 00 and ε\varepsilon. Write ZZ, then derive E\langle E\rangle and show that the heat capacity C=kB(εkBT)2eε/kBT(eε/kBT+1)2C = k_B \left(\frac{\varepsilon}{k_BT}\right)^2 \frac{e^{\varepsilon/k_BT}}{\left(e^{\varepsilon/k_BT}+1\right)^2} (the Schottky anomaly). (6)


Question 4 — Quantum statistics & Fermi energy (12 marks)

(a) Write the Fermi–Dirac and Bose–Einstein occupation numbers ni\langle n_i\rangle and explain the sign that distinguishes them and its physical origin. (4)

(b) For a 3D free-electron gas at T=0T=0, derive the Fermi energy in terms of number density nn: EF=22m(3π2n)2/3.E_F = \frac{\hbar^2}{2m}\left(3\pi^2 n\right)^{2/3}. Start from filling kk-space up to kFk_F (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 dPdT=LTΔv\frac{dP}{dT} = \frac{L}{T\,\Delta v} from equality of chemical potentials across a phase boundary. (4)

(b) State the Gibbs phase rule f=CP+2f = C - P + 2. 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 U(S,V)U(S,V) with dU=TdSPdVdU = T\,dS - P\,dV. First transform to enthalpy (swap VPV\to P): H=U+PVH = U + PV, so dH=TdS+VdPdH = T\,dS + V\,dP. (1) Then to Gibbs (swap STS\to T): G=HTS=U+PVTSG = H - TS = U + PV - TS. (1) dG=dHTdSSdT=TdS+VdPTdSSdT=SdT+VdP.dG = dH - T\,dS - S\,dT = T\,dS + V\,dP - T\,dS - S\,dT = -S\,dT + V\,dP. (1) Hence (GT)P=S\left(\frac{\partial G}{\partial T}\right)_P = -S (1) and (GP)T=V\left(\frac{\partial G}{\partial P}\right)_T = V. (1)

(b) Since dGdG is an exact differential, mixed second partials are equal: (1) P(GT)=T(GP).\frac{\partial}{\partial P}\left(\frac{\partial G}{\partial T}\right) = \frac{\partial}{\partial T}\left(\frac{\partial G}{\partial P}\right). (1) Substituting the first derivatives: (SP)T=(VT)P.-\left(\frac{\partial S}{\partial P}\right)_T = \left(\frac{\partial V}{\partial T}\right)_P. (2) (Exactness holds because GG is a state function — its differential is path-independent.)

(c) At fixed T,PT,P the combined system+reservoir entropy change is dStot=dG/T0dS_{tot} = -dG/T \ge 0, so spontaneous processes lower GG; equilibrium is the minimum of GG. Full marks for connecting minimisation of GG to second-law maximisation of total entropy. (3)


Question 2 (12)

(a) Maximise S=kBpilnpiS = -k_B\sum p_i\ln p_i with constraints pi=1\sum p_i = 1 and piEi=E\sum p_i E_i = \langle E\rangle. (1) Lagrangian: L=kBpilnpiα(pi1)βkB(piEiE)\mathcal{L} = -k_B\sum p_i\ln p_i - \alpha(\sum p_i -1) - \beta k_B(\sum p_i E_i - \langle E\rangle). Lpi=kB(lnpi+1)αβkBEi=0\frac{\partial \mathcal{L}}{\partial p_i} = -k_B(\ln p_i + 1) - \alpha - \beta k_B E_i = 0. (2) Solving: lnpi=1α/kBβEi\ln p_i = -1 - \alpha/k_B - \beta E_i, so pieβEip_i \propto e^{-\beta E_i}. (2) Normalisation gives pi=eβEiZp_i = \frac{e^{-\beta E_i}}{Z}, Z=eβEiZ=\sum e^{-\beta E_i}; identifying with thermodynamics β=1/kBT\beta = 1/k_BT. (1)

(b) E=piEi=1ZEieβEi=1ZZβ=lnZβ.\langle E\rangle = \sum p_i E_i = \frac{1}{Z}\sum E_i e^{-\beta E_i} = -\frac{1}{Z}\frac{\partial Z}{\partial\beta} = -\frac{\partial \ln Z}{\partial\beta}. (2) From S=kBpilnpiS = -k_B\sum p_i\ln p_i with lnpi=βEilnZ\ln p_i = -\beta E_i - \ln Z: S=kB(βE+lnZ)S = k_B(\beta\langle E\rangle + \ln Z), hence F=ETS=kBTlnZF = \langle E\rangle - TS = -k_BT\ln Z. (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 (E,V,NE,V,N). ZZ sums Boltzmann weights over all microstates, encoding how they aggregate into thermodynamics. (2)


Question 3 (10)

(a) Equipartition: each quadratic degree of freedom contributes 12kBT\tfrac12 k_BT to E\langle E\rangle. (1) Diatomic (3 translational + 2 rotational) = 5 dof: E=52NAkBT=52RT\langle E\rangle = \tfrac52 N_A k_BT = \tfrac52 RT. (2) CV=52R20.8 J mol1K1C_V = \tfrac52 R \approx 20.8\ \text{J mol}^{-1}\text{K}^{-1}. (1)

(b) Z=1+eβεZ = 1 + e^{-\beta\varepsilon}. (1) E=lnZβ=εeβε1+eβε=εeβε+1.\langle E\rangle = -\frac{\partial\ln Z}{\partial\beta} = \frac{\varepsilon e^{-\beta\varepsilon}}{1+e^{-\beta\varepsilon}} = \frac{\varepsilon}{e^{\beta\varepsilon}+1}. (2) C=dEdT=dEdβdβdTC = \frac{d\langle E\rangle}{dT} = \frac{d\langle E\rangle}{d\beta}\frac{d\beta}{dT}, with dβdT=1kBT2\frac{d\beta}{dT}=-\frac{1}{k_BT^2}. dEdβ=ε2eβε(eβε+1)2\frac{d\langle E\rangle}{d\beta} = -\frac{\varepsilon^2 e^{\beta\varepsilon}}{(e^{\beta\varepsilon}+1)^2}. (2) So C=kB(εkBT)2eε/kBT(eε/kBT+1)2C = k_B\left(\frac{\varepsilon}{k_BT}\right)^2\frac{e^{\varepsilon/k_BT}}{(e^{\varepsilon/k_BT}+1)^2}. (1)


Question 4 (12)

(a) ni=1eβ(Eiμ)±1\langle n_i\rangle = \dfrac{1}{e^{\beta(E_i-\mu)}\pm 1}: ++ 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 T=0T=0 electrons fill all states up to kFk_F. Number of states in a sphere of radius kFk_F with spin factor 2: N=2V(2π)343πkF3=VkF33π2.N = 2\cdot\frac{V}{(2\pi)^3}\cdot\frac{4}{3}\pi k_F^3 = \frac{V k_F^3}{3\pi^2}. (3) So n=N/V=kF3/3π2kF=(3π2n)1/3n = N/V = k_F^3/3\pi^2 \Rightarrow k_F = (3\pi^2 n)^{1/3}. (1) Then EF=2kF22m=22m(3π2n)2/3.E_F = \frac{\hbar^2 k_F^2}{2m} = \frac{\hbar^2}{2m}(3\pi^2 n)^{2/3}. (2)

(c) Below TcT_c the excited states cannot accommodate all bosons (their maximum capacity T3/2\propto T^{3/2} 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(T,P)=μ2(T,P)\mu_1(T,P)=\mu_2(T,P). (1) Along the curve dμ1=dμ2d\mu_1 = d\mu_2. With dμ=sdT+vdPd\mu = -s\,dT + v\,dP (per mole): s1dT+v1dP=s2dT+v2dP-s_1 dT + v_1 dP = -s_2 dT + v_2 dP. (1) dPdT=s2s1v2v1=ΔsΔv.\Rightarrow \frac{dP}{dT} = \frac{s_2-s_1}{v_2-v_1} = \frac{\Delta s}{\Delta v}. (1) Latent heat L=TΔsL = T\Delta s, so dPdT=LTΔv.\frac{dP}{dT} = \frac{L}{T\Delta v}. (1)

(b) f=CP+2f = C - P + 2, single component C=1C=1. (1) (i) Triple point: P=3P=3 phases f=13+2=0\Rightarrow f = 1-3+2 = 0 (invariant, fixed T and P). (1.5) (ii) Coexistence line: P=2f=12+2=1P=2 \Rightarrow f = 1-2+2 = 1 (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, F

Marks: correct β\beta (1), weights/Z (2), E\langle E\rangle (1.5), F=kBTlnZF=-k_BT\ln Z (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"}
]