Spinodal Decomposition: Composition Field Map (2D)
2D companion to the 3D Cahn-Hilliard spinodal decomposition simulator: set the average composition and quench depth on a flat composition-field map and watch either barrier-free spinodal decomposition or slow droplet nucleation and growth unfold in real time.
This 2D companion runs the same explicit-Euler Cahn-Hilliard solver as the 3D version — a double-well free energy f(c) = a·c²/2 + c⁴/4 driving μ = f'(c) − κ∇²c and ∂c/∂t = M∇²μ on a periodic grid — but plots the composition field c(x,y) directly as a flat color map instead of a height-displaced 3D mesh, so the bicontinuous spinodal pattern or the individual nucleated droplets read clearly from directly overhead. A live free-energy mini-chart marks the current composition against the spinodal and binodal edges, and a phase badge reports whether the mixture is unstable, metastable or stable in real time.
Below the spinodal edge c_s = √(depth/3) the flat mixture is linearly unstable and decomposes everywhere at once into a fine bicontinuous pattern with no energy barrier. Between c_s and the binodal c_b = √(depth) the mixture is metastable and only separates once a rare fluctuation nucleates a large-enough droplet. Beyond c_b the single phase is thermodynamically stable. Once separated, domains coarsen over time with characteristic size ξ growing roughly as t^(1/3).
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install