Misc: the physics behind the site’s animations

The 2D Ising model

The simplest model of a magnet, and its phase transition between order and disorder.

Picture a piece of iron as a huge collection of tiny compass needles, the magnetic moments of its atoms. In this simplest model, each needle can only point up or down, and it would like to point the same way as its neighbors. When most needles agree, their small effects add up and the material is a magnet. Heat works against this: it shakes the needles and flips them at random.

At low temperature, agreement wins and large regions point the same way. At high temperature, the shaking wins and the needles point every which way, so the magnetism disappears: this is why a magnet heated above a certain temperature, about 770 °C for iron, stops being one. In between, at a precise critical temperature, the two effects balance each other, and patches of all sizes, from a few needles to the whole screen, keep forming and dissolving. In the background, blue squares are needles pointing up and orange squares needles pointing down. By default it sits at the critical temperature, and the slider in the animation menu heats or cools it.

In more detail

In this background, each small square is a tiny magnet, a spin s that points up (s = +1, blue) or down (s = −1, orange). The spins sit on a square grid and each one interacts with its four neighbors. The energy of a configuration is

E = −J ∑⟨ij⟩ si sj,

where the sum runs over pairs of neighbors and J > 0, so that aligned neighbors lower the energy. At temperature T, a configuration appears with the Boltzmann probability, proportional to e−E/T (with Boltzmann’s constant set to 1). Energy favors order, temperature favors disorder, and their competition produces a phase transition.

The phase transition

Wilhelm Lenz proposed the model in 1920 and gave it to his student Ernst Ising, who solved it in one dimension in 1925. Finding no transition there, Ising wrongly concluded that there was none in any dimension. In 1936 Rudolf Peierls proved that in two dimensions the model orders at low temperature, and in 1944 Lars Onsager solved it exactly, a landmark of statistical physics. The transition takes place at the temperature

Tc = 2J / ln(1 + √2) ≈ 2.269 J.

Below Tc, most spins agree: the system has a spontaneous magnetization, which vanishes as T approaches Tc, like (Tc − T)1/8. Above Tc, up and down spins mix in clusters that shrink as the temperature rises. At Tc clusters of all sizes coexist, and the picture looks statistically the same at every scale: correlations between distant spins decay as a power of the distance instead of exponentially.

The dynamics

The background is simulated with the Metropolis algorithm (1953): pick a spin, compute the energy change ΔE that flipping it would cause, and flip it if ΔE ≤ 0, or otherwise with probability e−ΔE/T. On the square grid, ΔE only takes the values 0, ±4J and ±8J. These rules satisfy detailed balance, so that after many steps the configurations are sampled from the Boltzmann distribution. To update many spins at once, the grid is colored like a checkerboard: the neighbors of a black square are all white, so all black spins can be updated together, then all white ones.

On this site

One spin every 5 pixels, about 20 sweeps of the whole grid per second. By default the temperature is Tc itself. The simulation starts from random spins, and the clusters keep growing for a long while: close to Tc the dynamics becomes very slow (critical slowing down). The temperature slider of the animation menu goes from 0.5 to 2 Tc. Below Tc, domains of both colors grow as their boundaries straighten and shrink, and over minutes one color tends to take over; at 2 Tc the clusters are small and flicker. The grid is finite, so clusters cannot outgrow the screen, which smooths the transition a little.

The eye button in the header hides the text and shows the spins at full strength. There, pressing switches on a strong magnetic field, h = 20 J, on a disc of 50 pixels around the pointer, pointing against most of the spins in it: it adds −h ∑ si over the disc to the energy, and within a sweep or two the disc turns the other color. Dragging moves the field, which stays on for 0.4 s after you let go. The painted domain then dissolves into the fluctuations at and above Tc, or, below it, slowly shrinks as the curvature of its boundary pulls it in.

More

References