This is a different model of the same physical phenomenon as the 3D domain-lattice version of this sim: ferroelectric domain switching in a PZT-like ceramic. Instead of treating every domain as an independent hysteron (its own private threshold, no memory of its neighbors), this 2D version couples each domain to its four grid neighbors — the way real domain walls actually interact, since flipping one grain shifts the local field its neighbors feel. That coupling is the textbook random-field Ising model (RFIM) of hysteresis, the same mathematics used to explain Barkhausen noise in ferromagnets and the analogous jumps seen in ferroelectric P-E loops.
local field on domain i: L = E + J · Σ(neighbor states)
domain i flips -P→+P when L > E꜀ᵢ
domain i flips +P→-P when L < -E꜀ᵢ
E꜀ᵢ ~ Gaussian(E꜀, σ·E꜀) (grain-to-grain disorder, same as the 3D model)
flipping one domain changes its neighbors' local field L ⇒ can push them
over threshold too ⇒ a chain reaction ("avalanche") propagates through
the grid before the system settles — this is solved by relaxing the
whole grid to a stable state at every field step, exactly like the
zero-temperature RFIM algorithm used to study Barkhausen avalanches.
- Field slider — drive the applied field E by hand; watch cells (squares) flip red↔blue, sometimes in a single cell, sometimes in a cascading burst.
- Domain coupling J — 0 reproduces the independent-hysteron limit (identical statistics to the 3D sim's model); turning J up makes neighboring domains drag each other along, producing bigger avalanches, a squarer loop and a larger dissipated-energy loop area.
- Grain disorder σ — spreads each cell's own switching threshold around E꜀, rounding the loop's shoulders exactly as real polycrystalline disorder does.
- Last avalanche — the number of cells that flipped together in the most recent chain reaction; watch it spike near the coercive field when J is high.
Real-world relevance: avalanche/domain-coupling effects like these are why real ferroelectric and ferromagnetic hysteresis loops are noisy rather than perfectly smooth curves — acoustic emission and Barkhausen-noise sensors listen for exactly these micro-jumps to test material quality non-destructively on production lines.