Instead of treating polarization as one point mass rolling in a single free-energy well, this simulator solves the polarization as a spatial field P(x,y,t) over a lattice of unit cells — the time-dependent Ginzburg–Landau (TDGL, "model A") extension of Landau–Devonshire theory, with a gradient (domain-wall) energy term added to the local double-well:
F[P] = Σ [ a(T−Tc)·P² + b·P⁴ − E·P + (κ/2)|∇P|² ]
γ ∂P/∂t = −δF/δP = −(2aP + 4bP³ − E) + κ·∇²P
Each cell still wants to sit in its own local double well (same a, b as the single-domain model), but the κ∇²P term now penalizes neighbouring cells disagreeing — so instead of one polarization value snapping between two states, the lattice nucleates patches ("domains") of +P and −P separated by domain walls, and those walls move as the field sweeps. The macroscopic polarization plotted in the P–E loop is the lattice average ⟨P⟩, so the loop you see here is the ensemble response of many switching domains, not a single particle — rounder shoulders, field-dependent nucleation delay, and a shape that depends on κ, unlike the sharp single-domain switch.
P₀ (per-cell remnant) = √(−a / 2b)
E꜀ (single-cell coercive) = (4/3)|a|·√(|a| / 6b)
- Temperature slider — sets a = T−Tc for every cell. Above 0 each cell's double well merges into one minimum: domains vanish and the loop collapses to a line, the 2D analogue of the paraelectric phase.
- Field amplitude — must exceed roughly the single-cell coercive field to nucleate and grow a reversed domain each half-cycle.
- Domain-wall stiffness κ — the energy cost of a boundary between opposite domains. κ = 0 lets every cell switch independently (many small domains, a smoothed/rounded loop); large κ makes walls expensive, so the lattice snaps together into one large domain and the loop sharpens back toward the single-domain limit.
- Sweep frequency — how fast E(t) = E₀sin(2πft) oscillates; faster sweeps leave less time for domain walls to fully sweep across the lattice, pinching the loop.
Real-world relevance: this is the actual mechanism behind hysteresis in real PZT and BaTiO₃ ceramics — polarization reversal happens by domain nucleation and domain-wall motion, not by a single macroscopic dipole flipping at once, which is why real coercive fields, loop shape and switching speed all depend on grain size and domain-wall pinning.