This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
Wilhelm Lenz proposed the model in 1920 and his student Ernst Ising solved it in one dimension in 1925: a row of magnetic moments, each pointing up or down and preferring to point like its neighbors. In one dimension it never orders. Lars Onsager’s exact solution of the two-dimensional model in 1944 showed that it does, below a sharp critical temperature, and gave the first proof that a phase transition can come out of nothing but statistical mechanics. Near that temperature the model behaves like a real magnet near its Curie point, a liquid near its critical point, and every other system in its universality class.
What you see
A 200 by 200 grid of spins with wrapping edges: white cells point up (), black cells point down (). The panel shows the magnetization , the mean spin. For the antiferromagnet it shows the staggered magnetization instead, with the sign of every other spin flipped, which is the order parameter of a checkerboard.
Each frame runs two Metropolis sweeps, so a spin gets on average two chances per frame to flip.
Model
The energy of a configuration is
summed over nearest-neighbor pairs, with coupling and external field . A Metropolis step picks a random spin, computes the energy change of flipping it, and flips it with probability . Repeated, this samples configurations with Boltzmann weight . Onsager’s critical temperature is
and below it, without a field, the spontaneous magnetization is .
Presets
Critical: from random spins, also the default. Domains grow without limit, but ever more slowly: after 30 seconds the clusters are still coarsening, with blobs of every size inside blobs and fractal borders. On a finite grid the magnetization at settles near 0.5 and keeps fluctuating; on an infinite one it would vanish.
Cold ferromagnet: from random spins. In equilibrium the magnetization would be 0.998, but a sudden quench does not get there: domains of both signs grow and straighten, and the grid often ends up in two bands that wrap around the torus and never merge. In two minutes the magnetization stayed near 0.23.
Antiferromagnet: at , from random spins. Neighbors prefer to point opposite ways, so the ordered state is a checkerboard, which looks gray. On the square lattice flipping every other spin turns it into the ferromagnet, so it has the same critical temperature, and its staggered magnetization behaves exactly like the critical ferromagnet’s magnetization.
Field, below critical: , , from all spins down. The field favors up spins: islands of white nucleate, grow and take over, and within 10 seconds the magnetization reaches +0.9, against 0.83 without the field.
Parameters
Temperature: 0.1 to 5 in units of ; the default is .
Field h: to in units of . Positive values favor up spins.
Ferromagnet: switches the coupling between and the antiferromagnet’s .
Initial spins: random, or all down; applies on Reset.
Temperature, field and coupling apply immediately.