Signal and Sensation

The Temperature It Cannot Decide At

A sheet of magnets is either lined up or it is noise, except at one temperature, where it fills with patches of every size at once. Onsager worked that temperature out exactly in 1944 and the sheet finds it back.

Open fullscreen →

What it is

Two hundred cells across, each pointing up or down. Every cell wants to agree with its four neighbours and heat wants to flip it at random. Click or drag to change the temperature.

Cold and it goes solid. Hot and it’s static. In between there is a temperature where neither wins, and the sheet fills with patches of every size at once, from single cells to regions the size of the picture, with no size preferred over any other.

You can hear which is which. The hum is how much of it agrees, the hiss is how much of it is flipping, and only at the critical point are both loud together.

How it works

Metropolis: pick a cell, work out what flipping it would cost, take the flip if it’s free and take it with probability exp(−ΔE / T) if it’s not. That exponential is the only place the temperature enters and the only reason anything ever disorders.

The critical temperature isn’t fitted here. Onsager solved this model exactly in 1944 and it is 2 / ln(1 + √2), which is 2.2692, and he also gave the exact alignment below it. The simulation is checked against that rather than against itself:

temperature simulated Onsager
1.4 0.992 0.991
1.8 0.955 0.957
2.0 0.911 0.911
2.2 0.768 0.785

The curve on the right isn’t the alignment, it’s how much the alignment wobbles. That is the sharper signal: the alignment bends at the critical point, but the wobble spikes there, because at the critical point the sheet has no preferred size of patch and so no preferred size of fluctuation either.

What surprised me

Bigger lattices gave worse answers, which is backwards. Sweeping the temperature and taking the peak of the wobble, on a fixed budget of sweeps:

lattice peak found against 2.2692
12 across 2.350 3.6% high
20 across 2.400 5.8% high
32 across 2.450 8.0% high
48 across 2.550 12.4% high

Every bit of theory says a bigger lattice should land closer. Mine got steadily further away, which normally means the model is wrong.

It isn’t the model, it’s the clock. Near the critical point the sheet takes far longer to settle than anywhere else, because the patches it’s trying to grow are the size of the whole thing, and a fixed number of sweeps is a shorter and shorter time in the only units that matter. The bigger the lattice the further from equilibrium it still is when you measure it.

Giving the same 48-across lattice more time:

sweeps peak found error
500 2.400 5.8% high
3,500 2.300 1.4% high
11,000 2.250 0.8% low

Twenty two times the work to go from six per cent out to under one, on the same code and the same lattice. The measurement was never wrong, it was unfinished, and unfinished looked exactly like a systematic error in the physics.

That slowness is the phenomenon, not an obstacle to measuring it. Critical slowing down is one of the things that defines a critical point: correlations reach across the whole system and so does the time they take to arrange themselves. The instrument was struggling for precisely the reason the subject is interesting, which is a nicer failure than most.

The alignment agreed to three decimal places while the peak was twelve per cent out. Both come from the same simulation at the same settings. One quantity was fine and the other was badly biased, and if I had checked only the first I would have shipped the second.

What I would do next

Cluster updates. Metropolis flips one cell at a time, which is exactly the wrong move near the critical point where the thing that wants to change is a whole patch. Wolff’s algorithm builds a cluster and flips all of it at once, and it cuts the slowing down from crippling to almost nothing.

That isn’t a speed optimisation, it’s a different instrument: it would let the page measure the critical exponents rather than just the temperature, and the exponents are the part that is the same for water boiling and for a magnet and for a great many things that have nothing else in common.