Magnetic Domains

2D Ising model — Weiss domains, domain walls & B-H hysteresis loop

Material Presets

Ising Hamiltonian:
H = −J ∑<ij> sisj − μH ∑i si
Metropolis: accept flip if ΔE ≤ 0 or rand < e−ΔE/kT

B-H Loop Control

Live Values


0.00

0.00

300


50%

About — Magnetic Domains & the Ising Model

The Ising model

The 2D Ising model is the canonical model of ferromagnetism. Each site i on a square lattice has a spin si = ±1. Neighbours interact with coupling constant J. An external magnetic field H adds a Zeeman energy. The Hamiltonian is:

H = −J ∑ sisj − μH ∑ si

The exact 2D Ising model was solved by Onsager (1944). The critical Curie temperature is kBTc = 2J/ln(1+√2) ≈ 2.269J. Below Tc, spontaneous magnetisation appears; above Tc, the system is paramagnetic.

Metropolis algorithm

To simulate equilibrium configurations at temperature T, we use the Metropolis-Hastings Monte Carlo algorithm: pick a random spin, compute the energy change ΔE of flipping it, accept the flip if ΔE ≤ 0 or with probability exp(−ΔE/kBT) if ΔE > 0. This satisfies detailed balance and converges to the Boltzmann distribution.

Weiss domains and domain walls

A real ferromagnet breaks into magnetic domains where spins are all aligned, separated by domain walls (Bloch or Néel walls). Domains form to minimise magnetostatic energy (demagnetising field). The wall width δ ~ π√(A/K) (A = exchange stiffness, K = anisotropy constant). Iron domains are typically 10–300 μm wide.

B-H hysteresis loop

As H sweeps from +Hs to −Hs and back, the magnetisation traces the hysteresis loop. Key parameters:

  • Saturation Ms: maximum magnetisation (all spins aligned)
  • Remanence Mr: magnetisation remaining at H=0 after saturation
  • Coercive field Hc: H needed to reduce M back to zero
  • Energy loss per cycle: proportional to the loop area (Steinmetz law)

Soft magnets (Permalloy, soft ferrite) have low Hc (<10 A/m). Hard magnets (NdFeB, SmCo) have high Hc (>800 kA/m).

About Magnetic Domains

A ferromagnet below its Curie temperature spontaneously breaks into magnetic domains — regions where all atomic spins are aligned — separated by narrow domain walls roughly 10–100 nm wide. The Ising model captures the essential physics: each lattice spin interacts with its neighbours via an exchange coupling J, favouring parallel alignment, while thermal fluctuations (parameterised by kBT) compete against order. At the critical temperature a second-order phase transition occurs, and long-range order disappears. The equilibrium domain pattern minimises total energy, balancing exchange, magnetostatic, and anisotropy terms.

This simulation uses the Metropolis Monte Carlo algorithm on a 2D Ising lattice. You can tune temperature relative to the Curie point, apply an external field to watch domain walls sweep across the grid, and observe how the animated B-H hysteresis loop evolves as the field cycles.

Frequently Asked Questions

Why does a ferromagnet split into domains instead of being uniformly magnetised?

Uniform magnetisation would produce large stray magnetic fields outside the material, storing enormous magnetostatic energy. The material reduces total energy by forming domains with opposite magnetisation directions that largely cancel externally. The trade-off is the energy stored in domain walls themselves (~10⁻³ J m⁻²), so the equilibrium domain size balances wall energy against magnetostatic energy.

What is the Ising model and how does it model ferromagnetism?

The Ising model places a spin variable si = ±1 on each lattice site and assigns energy E = −J Σ sisj − H Σ si, where J is the exchange coupling and H the applied field. For J > 0 (ferromagnetic coupling) and temperatures below the critical Tc, the system spontaneously magnetises. Lars Onsager solved the 2D version exactly in 1944, one of the landmark results of statistical mechanics.

How does the Metropolis algorithm simulate thermal fluctuations?

At each step a random spin is selected and its energy change ΔE calculated if it were flipped. If ΔE < 0 the flip is accepted; if ΔE > 0 it is accepted with probability exp(−ΔE/kBT). This satisfies detailed balance and samples the Boltzmann distribution correctly. Running many such steps allows the lattice to thermally equilibrate, producing realistic domain patterns without solving any differential equations.

What happens at the Curie temperature?

At T = Tc the ferromagnet undergoes a continuous (second-order) phase transition. The spontaneous magnetisation M falls to zero as M ∝ (Tc−T)^β with β ≈ 0.326 in 3D. Fluctuations diverge in both length scale (correlation length ξ → ∞) and time (critical slowing-down), producing fractal-like spin patterns visible in the simulation as T approaches Tc.

What is a domain wall and how thick is it?

A Bloch domain wall is a gradual rotation of spins from one domain orientation to the other, spread over many lattice spacings. The wall width δ = π√(A/K), where A is the exchange stiffness and K the magnetocrystalline anisotropy. In iron δ ≈ 40 nm (roughly 140 atomic layers); in hard magnets like SmCo₅ with large K, walls are only ~4 nm wide, which is why such materials pin walls so effectively.

How are magnetic domains observed experimentally?

Several techniques image domains directly: Bitter pattern decoration (fine magnetic particles collect at domain walls), magneto-optical Kerr effect (MOKE) microscopy (polarisation rotation reveals domain contrast), magnetic force microscopy (MFM) with nanometre resolution, and X-ray magnetic circular dichroism (XMCD) for element-specific imaging. These are essential tools for developing magnetic recording media and spintronic devices.

Why does applying a field make domains move rather than flip uniformly?

Domain-wall motion requires overcoming local energy barriers at defects (pinning sites) — much less energy than coherently rotating all spins simultaneously (the Stoner-Wohlfarth mechanism). So at small applied fields, walls move first; only in very fine particles (single-domain grains below ~50 nm for iron) where no walls can form does coherent rotation govern switching, giving much higher coercivity.

What is exchange coupling between layers in thin films?

In magnetic multilayer stacks (e.g., Fe/Cr/Fe), quantum-mechanical RKKY coupling mediated by conduction electrons oscillates between ferromagnetic and antiferromagnetic as the non-magnetic spacer thickness changes. The antiferromagnetic configuration is the basis of giant magnetoresistance (GMR), which enabled the hard-disk read heads that triggered the data-storage revolution — recognised by the 2007 Nobel Prize in Physics.

What is superparamagnetism?

When a ferromagnetic particle is smaller than a single-domain critical size (~10–20 nm for Fe), thermal energy is sufficient to randomly flip the entire particle's moment between easy axes. The particle behaves like a giant paramagnetic atom — zero remanence at zero field, but a large saturable magnetisation. This is the basis of magnetic nanoparticle contrast agents in MRI and is also the fundamental data-density limit in hard drives (the "superparamagnetic limit").

How do domain patterns change under mechanical stress?

Magnetostriction couples magnetic and mechanical degrees of freedom: domains elongate or contract along the magnetisation direction, and conversely applied stress rotates domain orientations (the Villari effect). In nickel magnetostriction is negative (domains contract along M); in iron it is positive. This coupling enables magnetostrictive actuators in sonar transducers and precision positioning, and it causes the audible hum in transformer cores.

What is skyrmion and how does it relate to domains?

A magnetic skyrmion is a topologically protected swirling spin texture — a vortex-like object where spins point in all directions and wrap around a sphere once. Unlike ordinary domain walls, skyrmions cannot be continuously deformed into a uniform state (topological protection), making them highly stable. Nanometre-scale skyrmions in thin films are candidates for ultra-dense, low-energy magnetic memory bits, where a single skyrmion could represent one data bit.

About this simulation

This is a 2D Ising-model simulation of a ferromagnet, evolved with the Metropolis Monte Carlo algorithm. Each lattice spin is +1 or −1, and neighbouring spins interact through an exchange coupling J while thermal noise (temperature T) opposes this ordering. Sweeping the applied field H traces out the material’s B-H hysteresis loop in real time.

🔬 What it shows

The left canvas colours the lattice by spin direction; the right plots magnetisation M against field H. Together they reveal how domain walls sweep across the grid as H reverses.

🎮 How to use

Pick a material preset or set Temperature, Applied field H and Exchange J with the sliders. Randomise spins or Align all up resets the grid; toggle Auto sweep H (adjustable speed) or Manual H, and watch magnetisation, up-spin percentage and domain-wall count update live.

💡 Did you know?

Lars Onsager’s exact 1944 solution of the 2D Ising model was one of the first rigorous proofs that a simple statistical model can undergo a genuine phase transition at the Curie temperature.

Frequently asked questions

What is the Ising model simulating here?

Each cell holds a spin of +1 or −1. Neighbours interact through exchange coupling J, favouring parallel alignment, while field H adds its own energy term. The Metropolis Monte Carlo algorithm updates spins so the lattice relaxes towards thermal equilibrium at the chosen temperature.

Why do coloured domains appear on the grid?

Below the Curie temperature, neighbouring spins lock together to minimise exchange energy, forming blue and red domains separated by walls. Raising temperature past the Curie point randomises these domains until the lattice becomes a disordered paramagnet.

What does the B-H hysteresis loop show?

As field H sweeps positive to negative and back, magnetisation M lags behind rather than tracking it exactly, tracing a closed loop. Loop width reflects the coercive field; the magnetisation left at H=0 is the remanence.

What do the material presets change?

Each preset sets a different exchange coupling J, shifting the effective Curie temperature. Higher J keeps order at higher temperatures, whilst soft materials like Permalloy have lower coercivity and a narrower loop.

Why does raising the temperature shrink the hysteresis loop?

Higher temperature raises the chance the Metropolis algorithm accepts unfavourable spin flips, so thermal agitation fights the ordering from J. Near the Curie temperature, magnetisation collapses and the loop narrows until it vanishes above Tc.