🌀 Spin Glass — Frustration & Slow Relaxation
Random ferromagnetic and antiferromagnetic bonds create frustrated spin configurations with many metastable states. Watch slow logarithmic relaxation as the system explores its energy landscape.
About this simulation
This model puts an Ising spin (±1) on every site of a square lattice and gives each bond between neighbours a randomly fixed sign — ferromagnetic or antiferromagnetic — the Edwards-Anderson spin glass. Because signs are mixed, no arrangement of spins can satisfy every bond at once: some triangles of interactions are inherently frustrated. A Metropolis Monte Carlo algorithm flips spins one at a time, accepting energy-raising moves with probability exp(−ΔE/T), letting the lattice hunt for low-energy states without ever fully settling.
🔬 What it shows
Coloured bonds mark whether each link between neighbouring spins is satisfied (blue) or frustrated (red), while the arrows show each spin's current orientation. The lower strip plots the average energy per site against Monte Carlo sweeps, revealing the slow, logarithmic-like decay typical of glassy relaxation rather than the fast exponential settling of an ordinary magnet.
🎮 How to use
Drag Temperature T (0.1–4.0) to control how readily energy-raising flips are accepted, and set the freezing marker T_f (0.3–2.0) as a reference line on the plot. Grid size N (10–50) resizes the lattice and reseeds random bonds, Steps/frame (1–100) sets how many sweeps run per animation frame, and Run/Pause and Reset control the simulation.
💡 Did you know?
Giorgio Parisi won the 2021 Nobel Prize in Physics for his replica-theory solution to the spin-glass problem, work that later proved useful for understanding neural network memory models and the difficulty of certain combinatorial optimisation problems.
Frequently asked questions
Why do the bond colours change as the simulation runs?
Each bond's colour reflects whether it is currently satisfied given the two spins either side of it and its own fixed random sign. As spins flip during Monte Carlo sweeps, a bond can switch between satisfied (blue) and frustrated (red) even though its underlying coupling strength never changes.
What does raising the temperature slider actually do?
Temperature T sets the probability of accepting a spin flip that increases the total energy, via the factor exp(−ΔE/T). Higher T means more disordering flips are accepted, keeping the lattice close to a random paramagnetic state; lower T makes the system increasingly reluctant to accept unfavourable flips, favouring slow settling into low-energy frustrated configurations.
Why does the energy plot flatten out so slowly?
Because bonds have mixed signs, the energy landscape has many nearly-equal-depth valleys separated by barriers of different heights. Escaping one valley for a deeper one gets progressively harder, so the average energy per site declines in a slow, roughly logarithmic manner instead of dropping quickly to a single ground state.
What happens when I change the grid size N?
Moving the Grid size slider (10–50) rebuilds the lattice at the new size and draws a completely fresh set of random bond signs and spin orientations, resetting the sweep counter and energy history. It does not resize the existing lattice in place.
Is there a genuine ordered phase in this simulation?
Not in the usual ferromagnetic sense. Because roughly half the bonds are antiferromagnetic, the global magnetisation stays close to zero even at low temperature. What can freeze instead is the order parameter q, which captures whether individual spins settle into a fixed (if random-looking) orientation over time — the hallmark of the spin-glass phase below the freezing temperature.
Random ferromagnetic and antiferromagnetic bonds create frustrated spin configurations with many metastable states. Watch slow logarithmic relaxation as the system explores its energy landscape.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install