B11 · Lesson 51 · Thermal lab
The Debye function, carrier freeze-out, and an Ising magnet at its Curie point
Most of this course's results came from formulas with a limit taken: low temperature, high temperature, nondegenerate, mean field. A computer removes the limits. In this lab you'll integrate the Debye heat capacity at every temperature, solve silicon's charge-neutrality equation exactly, freeze-out included, by bisection on the Fermi level, and simulate a ferromagnet spin by spin with the Metropolis algorithm, which samples microstates with Boltzmann probabilities. The simulation gets what the mean-field model of lesson 33 couldn't: the right Curie temperature for a two-dimensional magnet, checked against Onsager's exact solution.
Predict
A Metropolis simulation flips a spin if that lowers the energy, and otherwise flips it with probability . Why does that produce the Boltzmann distribution?
For any two states a and b with , the rate a → b is and b → a is 1, so in a steady state gives . That's detailed balance. The walk visits microstates with exactly the Boltzmann weights, so averages along it are thermal averages, without ever computing Z.
Name it
What you'll write
debye_C(T, theta, n=2001): the Debye molar heat capacity by Simpson's rule on n points (start just above 0 to avoid 0/0).carriers(T, ND, Ed=0.045, Eg=1.12, Nc300=3.2e19, Nv300=1.8e19): return(n, EF)for silicon with donors at binding energy , solving neutrality exactly by bisecting on (measured from , so negative in the gap). Use , , , with .ising(L, T, sweeps, seed=1): a 2D Ising model on an L × L periodic lattice (J = k = 1), starting all up, updated by Metropolis; return the array of |magnetization per spin| after each sweep. Updating the two checkerboard sublattices alternately, with NumPy, keeps it fast.
What to expect
- Debye: = 0.9517 at T = Θ, approaching 1 above and the law below.
- Silicon, : n = 0.996 × 10¹⁶ at 300 K, 5.5 × 10¹⁴ at 50 K (freeze-out), above by 700 K (intrinsic).
- Ising: Onsager's exact result = 2.269, and below it . Mean field (lesson 33) would put at 4.
Worked example
How many terms does Simpson's rule need for the Debye integral to be good to 10⁻⁶?
Show the solution
- How the error scales. The integrand is smooth, so Simpson's error falls as .
- A fine grid. Across [0, 50] (T = Θ/50) with 2001 points, h = 0.025 and the error is far below 10⁻⁶ of the result.
- A coarse grid. Even 201 points give about five digits.
- The point at zero. The only care needed is at x = 0, where the integrand is 0/0 but tends smoothly to 0; starting at 10⁻⁹ avoids it.
Answer 2001 points (h = 0.025) are far more than enough for 10⁻⁶, and even 201 give about five digits.
Worked example
Why does the Ising simulation start with all spins up?
Show the solution
- Below . The two magnetized states, all up and all down, are separated by a free-energy barrier, and a small lattice started at random can get stuck in long-lived domains.
- Start ordered. Starting ordered and discarding the first couple of hundred sweeps as equilibration gives a clean estimate.
- Above . The start doesn't matter: the order melts within a few sweeps.
Answer an ordered start avoids long-lived domains below , so after a couple of hundred equilibration sweeps the estimate is clean; above the start doesn't matter.
Check
Step 1. Write debye_C(T, theta, n=2001).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write carriers(T, ND, ...) returning (n, EF).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write ising(L, T, sweeps, seed=1) returning |m| after each sweep.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
What's Onsager's exact magnetization of the 2D Ising model at T = 1.5 (in units of J/k)?
Check
In a Metropolis step, flipping a spin would raise the energy by 4 × 1 J. At T = 1 J/k, with what probability is it accepted?
Check
How many single-spin updates does a 500-sweep Metropolis run on a 16 × 16 lattice perform?
Explain why
Why does the mean-field model predict a Curie temperature of 4 for the 2D Ising model when the true value is 2.27?
Mean field replaces each spin's four neighbors by their average magnetization, ignoring the fact that the neighbors themselves fluctuate and are correlated with the spin in question. In two dimensions those fluctuations are large: as the temperature rises, the system breaks into domains and flipped clusters that destroy long-range order well before the average field would vanish. By pretending every spin feels a steady, perfectly ordered field, mean field overestimates how robust the order is, and so overestimates . The Metropolis simulation includes every fluctuation exactly, because it samples real configurations, and it lands on Onsager's exact value.
Practice
Keep practicing
6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.