Ising Model
The Ising model is a simple model of magnets, consisting of atoms on a lattice. Each atom carries a spin moment taking value 1 or -1, which tends to align with its neighbors. In the simulation, the pixel color represents the value of the spin at a given lattice point.
As the temperature increases, the model displays a phase transition from an ordered phase, where all spins point in the same direction, to a disordered phase, where all spins point in random directions. The difference between the two phases can be seen by looking at the average value of the spins, which define the magnetisation.
Formally, we consider an ensemble of spin on a square lattice. The energy of a spin configuration is given by
where indicates that and are nearest neighbors, and is an external magnetic field. Each time step represents a step of the Monte-Carlo algorithm, leading to spin configurations that are thermodynamically favored, meaning they are most likely under the Boltzmann distribution