Skip to content
Adrien Hubert

Ising model, across the critical temperature.

Two hundred by two hundred cells, each carrying a spin of +1 or -1. A neighbour of the same sign lowers the local energy, a neighbour of the opposite sign raises it. Pick a site, ask what would happen if it flipped, accept the flip with a probability that shrinks with temperature. Slide T past 2.269 and the ordered field breaks into noise.

Temperature T 2.20
|Magnetisation| 0.00
Energy/site 0.00
Sweeps 0

Onsager's critical temperature Tc = 2 / ln(1 + √2) ≈ 2.269

2.20

The Metropolis step

Pick a random site. Its energy contribution is minus the spin times the sum of its four cardinal neighbours. A flip changes that energy by dE = 2·s·(sum of neighbours). If dE is zero or negative, take the flip. Otherwise take it with probability exp(-dE/T). One sweep is N² of these attempts. That is the whole simulation.

Why 2.269

Onsager solved the square-lattice model in 1944 and found the exact critical temperature kTc/J = 2 / ln(1 + √2). Below it, the two spin values are not symmetric on average: one wins, the field takes a side. Above it, the flips win and no domain survives. Right at Tc the domains are self-similar across scales, which is what you see on the slider around 2.27: patches that keep folding into smaller patches without ever settling.

What to try

Start cold at T = 1 and the whole field locks into one colour within a few sweeps. Nudge T up toward 2 and small islands of the other spin appear along the boundaries. Cross 2.27 and the magnetisation readout drops to nearly zero; the picture becomes fractal. At T = 4 the lattice is white noise and the energy readout climbs toward zero as neighbours stop agreeing.

Sources

  • Ising, E. (1925). Beitrag zur Theorie des Ferromagnetismus. Zeitschrift für Physik, 31, 253–258. The one-dimensional case, which does not order. Ising thought that ruled out the model.
  • Onsager, L. (1944). Crystal statistics. I. A two-dimensional model with an order-disorder transition. Physical Review, 65, 117–149. The exact solution on the square lattice; the source of Tc = 2 / ln(1 + √2).
  • Metropolis, N., Rosenbluth, A., Rosenbluth, M., Teller, A. & Teller, E. (1953). Equation of state calculations by fast computing machines. Journal of Chemical Physics, 21(6), 1087–1092. The sampling rule this page uses.