Projects 2D Ising model

2D Ising model

An idealized 2D magnet under Glauber dynamics. Sweep the temperature across the critical point (Tc ≈ 2.269) and watch the ferromagnetic / paramagnetic phase transition emerge.

Interactive p5.js · Glauber dynamics Marching-squares contour
Temperature 2.27
Resolution 32
⟨m⟩ 0.000

Notes

Each lattice site carries a spin s ∈ {−1, +1}. At each Monte-Carlo sweep, sites are visited in random order and flipped with the Glauber probability p = 1 / (1 + eΔE / T), where ΔE is the four-neighbour energy change. Boundaries are periodic.

Below Tc the system condenses into large monochrome domains; above it, fluctuations dominate and the magnetisation hovers around zero. The cream contour overlay is a marching-squares isoline of the spin field, tracing the domain walls.

  • TemperatureSlide across Tc ≈ 2.269 to see the transition
  • ResolutionLattice size. Bigger lattices show critical fluctuations more clearly.
  • StartBegin / pause the dynamics
  • ResetRe-roll a fresh random initial state