Phase Separation

A mixture that sorts itself. Composition separates into two phases across soft interfaces, then coarsens as necks retract and larger domains consume smaller ones. The world organises by becoming geometrically simpler while roughly conserving how much of each phase exists.

The idea

A mixture that sorts itself. Composition separates into two phases across soft interfaces, then coarsens as necks retract and larger domains consume smaller ones. The world organises by becoming geometrically simpler while roughly conserving how much of each phase exists.

Science and concept

An order parameter instead of a tracked boundary

A binary mixture can be described by an order parameter (c(\mathbf x,t)). Positive values represent local enrichment in one component; negative values represent enrichment in the other. The interface is the region where the field passes smoothly between them.

This is the phase-field idea: the boundary is not stored as a separate moving line. It is encoded in the spatial variation of a continuous field. Interfaces can split, merge, disappear and change topology without explicit geometric surgery.

The free energy used by the current implementation can be represented schematically as

Compact form: F[c] = \int \left[ (q)/(4)(c^2-1)^2 + (\gamma)/(2)|∇ c|^2 \right]dV.

The first term is a double-well potential. When (q>0), it favours values near (c=+1) and (c=-1), while making the mixed state near zero energetically unfavourable. The current control Quench depth scales this bulk preference.

The second term penalises spatial gradients. A perfectly sharp jump from −1 to +1 would cost a great deal of gradient energy. The field instead forms a diffuse transition with finite width. Interface energy controls the strength of this penalty in the implementation.

These tendencies compete. The bulk term wants every location to choose one phase. The gradient term wants neighbouring values to vary smoothly. Their compromise produces domains separated by diffuse interfaces.

Chemical potential and conserved redistribution

The chemical potential is the functional derivative of the free energy. For this simplified form,

Compact form: \mu = q(c^3-c)-\gamma∇^2c.

Cahn–Hilliard dynamics then evolves the composition according to

Compact form: (∂ c)/(∂ t) = M∇^2\mu,

where (M) is the mobility.

The outer Laplacian is crucial. It means composition changes by the divergence of a flux driven by chemical-potential gradients. In a periodic deterministic discretisation whose Laplacian sums to zero, the spatial mean

Compact form: \bar c = (1)/(V)\int c dV

should remain approximately constant. Material is redistributed rather than globally created or destroyed.

This conservation law differentiates Phase Separation from Turing Patterns. Gray–Scott reaction–diffusion has feed and removal terms: the amounts of its fields are not conserved. Cahn–Hilliard demixing is constrained by how much of each component was present initially.

From fluctuation to domain

A homogeneous mixture can be stable, metastable or unstable depending on its free-energy landscape and composition. After a sufficiently deep quench into an unstable regime, small fluctuations grow spontaneously. This is spinodal decomposition.

Near symmetric mean composition, positive and negative phases have comparable abundance. Neither can easily become isolated inside the other, so early separation tends to form a bicontinuous labyrinth. Both phases percolate through the field.

When the mean composition is offset, one phase is the minority. It tends to form droplets inside a majority matrix. This is why the reset-bound Composition control is one of the most educational controls in the atlas: it changes morphology through a conservation constraint, not by selecting a drawing preset.

The current initialiser adds bounded random variation around compositionMean. These fluctuations are not merely decorative noise; they provide the finite perturbations from which unstable modes grow. The exact sample mean can differ slightly from the requested composition because the code does not subtract the realised noise mean. For rigorous conservation experiments, reset should normalise the field back to the exact requested mean.

Coarsening: order through elimination

Pattern formation is only the beginning. Once two phases are established, the system continues reducing free energy by lowering total interfacial area.

Small droplets have high curvature and comparatively high chemical potential. They can shrink while larger droplets grow, a process related to Ostwald ripening. Thin necks retract. Adjacent domains merge. A labyrinth becomes broader and less intricate.

This coarsening is the sphere’s central visual narrative. Unlike Laplacian Growth, which accumulates a more ramified boundary, Phase Separation generally removes boundary. Unlike Turing Patterns, which can maintain a selected pattern scale through continual reaction, feed and loss, unforced Cahn–Hilliard domains tend to grow in characteristic size over time.

Mobility (M) primarily changes the rate of this redistribution. In an ideal continuum model with constant mobility, changing M rescales time without changing the eventual free-energy minima. In the finite explicit implementation, however, very large effective updates can interact with timestep, clipping and noise, so visitors should interpret Mobility first as a timescale control, not as a different equilibrium material.

The quench and the interface

The parameter quenchDepth multiplies (c^3-c). A deeper well strengthens the tendency to separate and can sharpen the contrast between bulk phases. The public help text says “deeper quench → sharper, faster separation,” which is qualitatively reasonable for this implementation, but it should not be interpreted as calibrated thermodynamic temperature.

The parameter interfaceEnergy multiplies the gradient term. Higher values resist small-scale variation, broaden interfaces and suppress fine structure. Very high values combined with a large timestep can also stress the explicit numerical scheme.

These parameters should not be conflated. Quench depth changes the bulk free-energy preference; interface energy changes the cost of spatial variation. Their ratio helps set an interfacial length scale.

Numerical implementation

AL.Floys stores the field on a periodic square grid. It computes a nine-point toroidal Laplacian: cardinal and diagonal neighbours contribute positive weights whose sum balances the negative centre weight. The stencil is more rotationally balanced than a simple five-point stencil, but it remains a finite grid approximation.

Each internal iteration computes

  1. (\nabla^2c);
  2. chemical potential (\mu=q(c^3-c)-\gamma\nabla^2c);
  3. (\nabla^2\mu);
  4. an explicit update (c\leftarrow c+M,\Delta t,\nabla^2\mu).

Cahn–Hilliard is a fourth-order nonlinear PDE. Explicit finite differences can become unstable when timestep, mobility, quench strength or interface coefficient are too large relative to grid spacing. The code clips field values to a bounded interval to contain blow-up. Clipping is practical but changes both free energy and exact conservation. The Δt control is therefore a numerical control with scientific consequences; “faster” is not automatically “more accurate.”

The conservation claim and its current failure boundary

The engine definition describes the sphere as conserved Cahn–Hilliard phase separation. That is true of the intended deterministic core under periodic boundaries. It is not true of the complete default experience.

At every substep, the implementation adds independent local random increments proportional to the control labelled Temperature. This noise is added directly to (c), then the field is clamped. Independent additive noise does not generally sum to zero, so the global mean composition wanders. The default value is nonzero (0.02), meaning the showcase is not strictly conserved even before the visitor intervenes.

The physically standard stochastic extension is often called the Cahn–Hilliard–Cook equation. Thermal fluctuations enter through a conserved stochastic flux, or equivalently through noise whose divergence appears in the composition equation. Such forcing preserves global composition under periodic boundaries. Direct additive scalar noise does not.

The current Temperature label is therefore too strong. Until conserved noise is implemented, it should become Evolution noise or Field noise. A rigorous public conserved mode should set it to zero by default and test the mean composition over long runs.

Several other operations intentionally or approximately break conservation:

  • bilinear semi-Lagrangian stirring is not exactly mass-conserving;
  • the local Stir pointer copies values through nearest-neighbour displacement and can alter totals;
  • Paint A and Paint B deliberately add one phase and remove the other locally without compensation elsewhere;
  • Heat mixes local values toward zero and adds noise;
  • Cool pushes values toward ±1;
  • Erase relaxes toward compositionMean rather than deleting an object;
  • clamping discards excess values.

These tools are useful for exploration. The error is not that they break conservation; it is that the product does not currently state where the conservation contract stops.

Stirring and arrested coarsening

The optional continuous stirring applies a prescribed rotating shear-like back-advection before the Cahn–Hilliard step. It stretches domains and creates new interface. Phase separation removes interface. Their competition can maintain a finite domain scale instead of allowing indefinite coarsening.

This is conceptually valuable, but it is not a hydrodynamic binary-fluid model. In Model H, composition couples dynamically to a velocity field governed by fluid momentum equations, and interfacial stresses feed back into flow. AL.Floys prescribes a kinematic deformation; the phase field does not generate the flow. Stirred phase separation is accurate; fluid-coupled phase separation would overclaim.

The preset Arrested Coarsening combines low mobility and mild stir. Low mobility alone merely slows coarsening; it does not establish arrest. The stir can continually regenerate fine structure, but the preset name should be supported by a measured plateau in a domain-scale metric before “arrested” is treated as a validated regime.

Measuring domain scale

Current telemetry estimates domain scale as an inverse square root of mean gradient energy. This is a useful visual proxy: smoother, broader domains usually have lower average gradient. It is not a standard direct measurement of characteristic domain size and can be confounded by interface width, contrast, quench depth and clipping.

A stronger scientific diagnostic would compute the structure factor (S(k)), its first moment, an autocorrelation length or a segmented chord-length distribution. Until then, label the current value Domain proxy rather than presenting it as a calibrated length.

History

John W. Cahn and John E. Hilliard introduced their theory of free energy in nonuniform systems in 1958. Their diffuse-interface formulation replaced an infinitely sharp boundary with a continuous composition field and a gradient-energy penalty. This made interfacial energy part of a variational framework that could describe equilibrium profiles and evolving microstructure.

Cahn’s 1961 paper on spinodal decomposition analysed how infinitesimal composition waves grow after a homogeneous solution is quenched into an unstable region. The work established a theoretical language for early-stage demixing and selected wavelengths.

Sam Cook introduced thermal fluctuations into spinodal-decomposition dynamics in 1970, producing the stochastic Cahn–Hilliard–Cook formulation. The placement and covariance of noise are dictated by conservation and fluctuation–dissipation principles; this history is directly relevant to the current additive-noise caveat.

Pierre Hohenberg and Bertrand Halperin’s 1977 classification of dynamic critical phenomena called conserved scalar order-parameter dynamics Model B. Coupling the conserved composition to momentum-conserving hydrodynamics gives Model H. These labels help situate what AL.Floys does and does not contain: its deterministic core is Model-B-like, while its imposed stir is not a solved Model-H velocity field.

Phase-field methods have since become central in materials science and interfacial modelling. The public sphere should not inherit the entire breadth of that field. Its strongest historical identity is the Cahn–Hilliard description of binary demixing and coarsening.

What this simulates

Aspect Current implementation
State One continuous scalar composition field c, plus work buffers for Laplacians and chemical potential.
Free-energy logic Double-well bulk term q(c³−c) and gradient penalty −γ∇²c in chemical potential.
Dynamics Explicit update c += M Δt ∇²μ over one or more iterations per frame.
Spatial discretisation Periodic square grid with a nine-point toroidal Laplacian.
Conservation Approximate for the unforced deterministic core; broken by default additive noise, clipping, prescribed stirring and several tools.
Initial condition Composition mean plus seeded random fluctuation; realised mean is not explicitly corrected to the target.
Forcing Optional continuous prescribed advection and local pointer stirring. No solved fluid momentum equation.
Randomness Reset noise and independent ongoing additive field noise controlled by Temperature.
Numerical safeguards Explicit timestep, bounded iterations and field clamping.
Telemetry Mean composition, interface-cell count and an inverse-gradient domain-size proxy.
Rendering Continuous palette mapping, contrast, interface emphasis and optional visual persistence.
Public simple controls Composition, Quench depth, Mobility, Interface energy, Stir strength and Palette.
Public tools Heat, Cool, Paint phase A, Paint phase B, Stir and Erase/relax.
Canonical difference A pedagogical Cahn–Hilliard-style solver with noncanonical forcing, not a calibrated material or fully conservative stochastic solver.

What to look for

Spinodal amplification — tiny variation becomes macroscopic domain

The initial field looks nearly uniform, yet small fluctuations grow instead of smoothing away. This is an instability of the mixed state under the chosen free-energy landscape.

Bicontinuous labyrinth — neither phase is merely a droplet

At mean composition near zero, both phases form connected channels. The morphology expresses comparable abundance under conservation.

Minority droplets — composition selects topology

An offset mean produces isolated islands of the minority phase. Changing Composition changes the global material balance, not just the initial visual seed.

Neck retraction — interface is energetically costly

Thin connections shrink and break because they carry high curvature and interfacial cost. Topology changes without explicitly tracked boundaries.

Coarsening — the characteristic scale grows

Small domains disappear; large ones expand. The image becomes simpler and broader even though the two-phase contrast remains.

Stir–relax competition — deformation can maintain fine texture

Continuous stirring stretches domains while Cahn–Hilliard dynamics tries to reduce interface. A statistically maintained scale can emerge from competing processes.

Mean drift — implementation limits become observable

With high Evolution noise or repeated painting, the reported mean composition can move. This is a useful audit of where conservation has been intentionally or numerically broken.

How to explore

First 30 seconds

  1. Load Spinodal Sea and watch the pattern after it first becomes visible. Do not stop at “a labyrinth formed”; follow the later widening and merger of domains.
  2. Load Droplet Rain. Compare the morphology with Spinodal Sea and connect the difference to the reset-bound Composition value.
  3. Return to Spinodal Sea and lower Mobility. The target morphology should remain broadly similar while the temporal evolution slows.
  4. Increase Interface energy. Look for wider, smoother boundaries and loss of fine structures.
  5. Apply Stir across one region and watch the stretched domains relax after the gesture ends.

Three experiments

Experiment Question Do Watch for Why it matters
Composition controls morphology Why do some mixtures form labyrinths and others droplets? Compare Composition 0, 0.25 and 0.5, restarting each time with the same seed if possible. Bicontinuity, minority droplets and sparse islands. Makes global conservation and phase fraction visible.
Timescale versus destination Does faster motion imply a different material state? Spinodal Sea → compare low and high Mobility while keeping Δt stable. Similar broad sequence at different rates. Separates kinetic speed from free-energy preference.
Interface penalty What suppresses fine-scale boundaries? Hold Composition and Quench depth fixed; raise Interface energy in stages. Broader interfaces, fewer narrow necks and larger characteristic features. Connects gradient energy to morphology.

A fourth experiment can compare Stir strength zero and nonzero. Treat it as imposed deformation competing with relaxation, not as a self-consistent fluid simulation.

A fifth, diagnostic experiment should be added to the scientific lab: set ongoing noise and stir to zero, avoid painting, and plot mean composition. It should remain constant within a tested tolerance.

Parameters that teach

Parameter What it really controls Increase it Decrease it What to watch
Composition Reset-time spatial mean of the order parameter and therefore the balance between the two phases. Makes one phase more abundant and the other more droplet-like. Reverses the asymmetry; near zero favours bicontinuity. Domain topology and area fraction.
Quench depth Strength of the double-well bulk preference for separated phases. Faster/stronger demixing in this solver, with sharper bulk values. Weaker separation and slower amplification. Growth of initial fluctuations.
Mobility Rate at which composition responds to chemical-potential gradients. Faster redistribution and coarsening. Slower evolution. Timescale more than intended equilibrium.
Interface energy Gradient penalty opposing rapid spatial variation. Wider, smoother interfaces and suppression of fine domains. Narrower interfaces and finer structure, with greater stability risk. Neck width and boundary smoothness.
Evolution noise (currently Temperature) Direct non-conserved random increments during evolution. More agitation and mean-composition wander. Cleaner deterministic coarsening. It is not calibrated thermodynamic temperature.
Δt (advanced) Explicit numerical timestep. Faster model-time advance but greater instability/clipping risk. Slower and generally safer integration. Numerical blow-up, clipping and conservation error.
Iterations (advanced) Cahn–Hilliard substeps per display frame. More model time per rendered frame. Slower visible evolution. This is not a material parameter.
Stir strength Amplitude of prescribed continuous deformation. More stretching and possible finite-scale maintenance. Freer coarsening. Competition between interface creation and removal.
Init noise Reset-time perturbation amplitude around the requested composition. Larger initial seeds and earlier visible separation. Longer delay or near-uniform start. Early-stage pattern onset, not long-term temperature.
Palette / Contrast / Trail persistence (visual) Rendering only. Changes legibility. Changes legibility. Do not infer a thermodynamic state from colour.

Presets as experiments

Spinodal Sea

The reference symmetric mixture. Its bicontinuous network and later coarsening provide the clearest introduction.

Droplet Rain

Offset composition creates minority droplets. It is the strongest preset for demonstrating that morphology follows phase fraction.

The Quench

A deeper bulk preference and high mobility make separation rapid. Use it to observe onset, but remember that several parameters change together.

Arrested Coarsening

Low mobility plus prescribed stirring keeps fine structure visible. The title should remain provisional until a domain-scale plateau is validated across seeds; low mobility alone means slow, not arrested.

Unequal Mixture

A strongly asymmetric mean produces sparse minority domains. It extends the comparison beyond Droplet Rain.

Stirred Apart

Strong imposed advection continually deforms the field. It is the best visual contrast between unforced free-energy relaxation and externally maintained texture.

Recommended learning order: Spinodal Sea → Droplet Rain → Unequal Mixture → The Quench → Stirred Apart → Arrested Coarsening.

Interactions

  • Paint phase A / Paint phase B pushes local composition toward +1 or −1. It intentionally changes global composition and is best understood as material injection/removal.
  • Heat mixes local composition toward zero and adds fluctuation. It does not evolve a temperature field or change the local free-energy coefficients. Rename it Mix unless a real quench/temperature field is added.
  • Cool pushes local values toward the currently dominant sign. It sharpens phase identity but does not reduce a stored temperature. Rename it Sharpen or Separate.
  • Stir advects local field values according to pointer motion. It is an externally prescribed deformation and only approximately conservative.
  • Erase relaxes local values toward the global compositionMean. It does not delete matter or create an empty state; Remix would be more accurate.

These tools are especially useful for demonstrating attractor-like relaxation. Draw an unnatural stripe or mixed patch, release it and watch the free-energy dynamics decide whether it dissolves, rounds, pinches or joins a nearby domain.

What this does not mean

The colours are not specified chemicals, minerals, cells or fluids. The scalar field is an abstract binary composition or order parameter.

The implementation is not calibrated thermodynamics. Quench depth, Interface energy, Mobility and Temperature are dimensionless or implementation-scale controls. The current Temperature is direct noise amplitude, not kelvin.

Strict mass conservation does not hold under the default nonzero additive noise, clamping, stirring or interactive painting. The phrase conserved phase separation applies most clearly to the unforced deterministic core.

The prescribed stir is not hydrodynamics. There is no velocity field solved from Navier–Stokes, no density or momentum conservation, no interfacial stress feedback and no Model-H coupling.

The field does not represent sharp particles moving around. A droplet is a region of continuous composition, not a collection of discrete Material cells.

Finally, visual resemblance to Turing spots or labyrinths does not imply the same mechanism. Turing Patterns uses reaction, unequal diffusion, feed and loss to maintain selected concentration structures. Phase Separation uses free-energy reduction and a composition constraint, and its unforced domains coarsen.

Why it belongs

Phase Separation contributes conserved self-sorting and coarsening. It is one of the atlas’s most important comparisons because it can look superficially like Turing Patterns while teaching the opposite temporal story: not persistent wavelength selection, but continuing elimination of interface. It also provides a bridge between abstract field theory and the familiar material experience of oil–water demixing, alloy microstructure and domain formation—without pretending to simulate any one material quantitatively.

Sources

Foundational and primary sources

  1. John W. Cahn and John E. Hilliard, “Free Energy of a Nonuniform System. I. Interfacial Free Energy,” Journal of Chemical Physics 28, 258–267 (1958). DOI: 10.1063/1.1744102.
  2. John W. Cahn, “On Spinodal Decomposition,” Acta Metallurgica 9, 795–801 (1961). DOI: 10.1016/0001-6160(61)90182-1.
  3. Henry E. Cook, “Brownian Motion in Spinodal Decomposition,” Acta Metallurgica 18, 297–306 (1970). DOI: 10.1016/0001-6160(70)90144-6.
  4. Pierre C. Hohenberg and Bertrand I. Halperin, “Theory of Dynamic Critical Phenomena,” Reviews of Modern Physics 49, 435–479 (1977). DOI: 10.1103/RevModPhys.49.435.
  5. A. J. Bray, “Theory of Phase-Ordering Kinetics,” Advances in Physics 43, 357–459 (1994). DOI: 10.1080/00018739400101505.
Enter this field →