Category Spotlight #8 — Chemistry & Materials Science: 8 Simulations Explained

From atoms bonding in a crystal lattice to Turing-pattern reaction-diffusion and pharmacokinetic drug spread, Chemistry & Materials Science is one of the most visually striking clusters on the site — and the maths behind it is surprisingly unified.

8
simulations
4
sub-topics
PDE
core math
EN + UK
languages

Crystal Growth & Solid State Physics

Crystallisation is a classic example of pattern formation from local rules. Each atom added to a growing lattice is attracted by bonds from its neighbours — a local interaction that produces a globally ordered structure. The simulation uses a Monte Carlo Metropolis algorithm: an atom is placed at a trial site, and accepted with probability proportional to e−ΔE/kT.

Choose a crystal system (cubic, hexagonal, BCC, FCC) and watch atoms nucleate and grow outward. Vary temperature to switch between ordered crystal and amorphous glass.
Monte Carlo · Metropolis
Sand patterns on a vibrating metal plate — nodal lines of standing wave modes. Matches the exact 2D wave equation solutions: f(x,y)∝sin(mπx/L)·sin(nπy/L).
2D wave equation · FDM
Metropolis acceptance criterion (crystal growth)
P(accept) = min(1, e−ΔE / kBT)
ΔE = energy difference · kB = 1.38 × 10−23 J/K

Reaction-Diffusion & Pattern Formation

Alan Turing's 1952 paper predicted that two diffusing chemicals — an activator and an inhibitor — could spontaneously form stable spatial patterns such as spots and stripes. The Gray-Scott model is the best-known implementation:

Two UV chemical concentrations evolve by coupled PDEs. Varying the feed and kill rate parameters produces coral, spots, labyrinths, moving spots, and soliton-like particles.
Gray-Scott PDE · GPU fragment shader
A bolus dose of drug diffuses from blood into tissue. Fick's second law drives the concentration profile. See how half-life and binding affinity shape the therapeutic window.
Fick's 2nd law · FDM
Gray-Scott reaction-diffusion equations
∂u/∂t = Du∇²u − uv² + f(1 − u)
∂v/∂t = Dv∇²v + uv² − (f + k)v

f = feed rate · k = kill rate · Du, Dv = diffusion coefficients

Nuclear & Atomic Chemistry

Nuclear binding energy — the energy holding a nucleus together — is one of the few quantities in physics that non-linearly peaks, explaining why both fission and fusion can release energy depending on where you are on the binding-energy curve.

Interactive binding-energy-per-nucleon curve for all stable isotopes. Click any element; the simulation shows the semi-empirical mass formula (Bethe-Weizsäcker) breakdown into volume, surface, Coulomb and pairing terms.
Bethe-Weizsäcker formula
Hydrogen spectral series (Lyman, Balmer, Paschen) rendered as emission lines. Vary the electron transition; the simulation computes λ = RH⁻¹(1/n₁² − 1/n₂²)⁻¹.
Rydberg formula · photon energy

Fluid & Surface Chemistry

Bubbles and foams are minimisation problems: the surface tension attempts to minimise the total surface area for a given volume, producing spherical shapes (Young-Laplace equation) and Plateau's laws for foam junctions.

Soap bubbles coalesce and reorganise under the Young-Laplace pressure equation ΔP = 4γ/r. Foam geometry obeys Plateau's laws — angles meet at 120° at every junction.
Young-Laplace · SPH
Carbon reservoirs (atmosphere, ocean, biosphere, lithosphere) exchange via first-order flux equations. Perturb fossil fuel emissions and watch the equilibrium shift over decades.
Box model ODEs

Core Algorithms in Chemistry Simulations

Gray-Scott PDE Monte Carlo Metropolis Fick's Second Law (FDM) Bethe-Weizsäcker formula Young-Laplace equation Rydberg spectral formula 2D wave equation (FDM) Box-model coupled ODEs GPU fragment shader (texture-ping-pong)

Recommended Learning Paths

High-School Chemistry

University / Research Level

Did you know? The Gray-Scott reaction-diffusion simulation runs entirely on the GPU via a ping-pong texture technique — each frame the shader writes the next chemical state into an offscreen render target, then reads from it for display. This is the same pattern used in fluid solvers and cellular automata.