Questing · 2026-08-29 · Soft Matter Physics · Zero Dependencies

NEMA

Molecules snap into line. Where alignment fails, a topological defect is born — half-integer, singular, the same mathematics that governs cosmic strings in the early universe.

Open Nema →

What Is Nema?

Nema is an interactive simulation of a 2D nematic liquid crystal running in your browser. A nematic is a phase of matter where elongated molecules align on average — like a crowd of people facing the same direction, but without settling into a crystal lattice. The collective alignment direction is the director. When alignment is disrupted at isolated points, those points are topological defects — singular cores where the local ordering breaks down.

Nema starts in the disordered isotropic phase — every molecule points randomly — and rapidly cools into the nematic phase. Ordering happens fast almost everywhere, but the boundaries between domains that ordered in different directions cannot reconcile; the mismatch is topologically locked in as a defect. The defects then drift under elastic forces, find partners of opposite sign, and annihilate.

Why ±½ — Not ±1?

The topology of a nematic is different from a superfluid vortex or a ferromagnet domain wall. A nematic director n and −n describe the same physical state — the molecules have no polarity. This head-tail symmetry means the relevant symmetry group is not SO(2) (full circle) but RP¹ (the circle with antipodal identification). The fundamental group of RP¹ is ℤ2, and the stable defects carry topological charge ±½ rather than ±1. A ±1 defect would be topologically unstable in a nematic and would split into two ±½ defects.

The half-integer charge shows up visually: carry your eye around a +½ defect, and the director rotates by +90°. Around a −½ defect, it rotates by −90°. Under crossed polarizers in a lab, a +½ defect shows two dark extinction brushes; a −½ defect shows four (the Maltese cross) — because the polarizer sees the director orientation modulo 90°.

The Kibble-Zurek Mechanism

When the system cools through the ordering transition, different regions order independently: each chooses a local alignment direction without knowing what its distant neighbors are doing. At the boundaries where mismatched regions meet, defects are forced into existence — they cannot be removed without a global rearrangement of the director field. This is the Kibble-Zurek mechanism, first proposed for cosmological phase transitions in the early universe (Tom Kibble, 1976) and then extended to condensed-matter systems (Wojciech Zurek, 1985). The defects Nema creates are mathematically the same objects as cosmic strings threaded through the universe moments after the Big Bang.

The Model

Nema uses the 2D Landau–de Gennes Q-tensor in the one-constant Frank approximation. The order parameter is a 2D vector m = S(cos 2θ, sin 2θ), where S is the degree of nematic order and θ is the director angle. Writing it as m instead of the angle θ directly is essential: θ is singular at defect cores, but m is continuous — it passes smoothly through zero at the core.

// Landau–de Gennes TDGL, one-constant approximation:
∂m/∂t = ∇²m + (1 − |m|²) · m

// Discrete on a 200×200 grid with periodic boundaries:
∇²m[i,j] = m[i+1,j] + m[i-1,j] + m[i,j+1] + m[i,j-1] − 4·m[i,j]

// Allen–Cahn nonlinear term drives |m| → 1 (ordered)
// Defect cores: |m| → 0  (orientationally disordered)
// Defect detection: winding number of m on 2×2 plaquettes

The equation is integrated by explicit Euler (dt = 0.20), which is stable for the diffusion term (CFL: dt ≤ 0.25). Defects are detected by computing the winding number of the Q-vector around every 2×2 plaquette: a winding of +2π signals a +½ defect; −2π signals a −½ defect.

What You Are Seeing

Polarizer view (default): simulates the image through a real polarized-light microscope. Transmitted intensity is sin²(2θ) × S — dark where the director is aligned with the polarizer axes (θ = 0°, 90°), bright where it is at 45°. Defect cores appear dark because S → 0. The amber-gold color is the actual warm tone of birefringent crystals under a polarized-light microscope with full-wave retardation plate.

Director view: short line segments show the local alignment direction. Dimmer near defect cores where order is lost. Watch the lines fan radially around each defect.

Order field: pixel brightness = |m|. Ordered regions are amber; defect cores glow teal because the molecules there are locally isotropic.

Amber dots mark +½ defects; teal dots mark −½ defects. Click anywhere to plant a ±½ pair and watch them attract and annihilate.

Why It Matters Beyond Liquid Crystals

Nematic topological defects appear across many length scales. In LCD screens, liquid crystals deliberately switch between defect states to control light transmission — the same physics that makes Nema's polarizer view dark or bright. In biological active matter, cell layers and bacterial colonies form spontaneous flows driven by the creation and annihilation of +½ defects, which act as nucleation sites for cell division. In cosmology, the GUT-phase transition 10⁻³⁵ seconds after the Big Bang should have created a network of topological defects (cosmic strings) by the same Kibble-Zurek mechanism visible in Nema. The same topological classification — π₁(RP¹) = ℤ₂ — runs from a drop of motor oil viewed through a microscope to the large-scale structure of the universe.