Presets
Playback
Water and dye
Temperature sets viscosity; dye size sets drag.
Ink drops and tank
Number and size of drops, tank width and time-lapse.
Layers
Model checks
The science
Fick's second law
Ink molecules do a random walk; averaged over many of them the concentration obeys dc/dt = D (d2c/dx2 + d2c/dy2 + d2c/dz2). The grid solver uses conservative explicit finite volumes with no-flux walls, so the total mass Sum c h^d stays constant to rounding error; the time step respects D dt / h^2 <= 1/4 (2D) or 1/6 (3D).
Gaussian spreading and the variance law
A Gaussian drop of per-axis variance sigma0^2 stays Gaussian: sigma^2(t) = sigma0^2 + 2 D t in any dimension, with peak concentration M / (2 pi sigma^2)^(d/2). That is why the width grows as the square root of time and the peak falls as 1/t in 2D and t^(-3/2) in 3D. The checks compare the grid against exactly these formulas.
Diffusivity from temperature and molecule size
Stokes-Einstein: D = kB T / (6 pi eta a). Water viscosity falls steeply with temperature (a Vogel fit, eta = 2.414e-5 x 10^(247.8/(T - 140)) Pa s, T in kelvin), so hot water spreads ink faster; a larger molecule (bigger a) diffuses more slowly. A small dye molecule of radius 0.2 nm at 20 C gives D close to 1e-9 m^2/s.
Why real ink is faster than this
Crossing 4 cm by diffusion alone takes L^2 / 2D, about nine hours at 20 C. A dropped ink blob in a real glass spreads in seconds because the impact, density differences and tiny temperature gradients drive convection. The “eddy-mixing factor” multiplies D to mimic stirring; it is a crude stand-in (turbulent mixing is not Fickian), and time-lapse speeds up the clock.
Honest simplifications
No convection, buoyancy or ink-water density difference; constant D (the dye does not change viscosity); the drop starts as an exact Gaussian; the Gaussian formulas assume an unbounded domain, so the checks stop while sigma is under about 20% of the tank width. Colour is a visual map of concentration, not optical absorption measured from a real dye.
What to try
- Heat the water from 5 C to 80 C and watch the diffusivity graph and the spreading rate change; compare with a larger molecule (a = 2 nm).
- With one drop, verify the dashed Gaussian lies on top of the grid profile, and sigma^2 follows the straight line 2Dt.
- Release three drops: they merge into one Gaussian once their spread exceeds their separation.
- Let sigma approach the wall: the profile flattens and reflection breaks the free-space formula.
- Switch on eddy mixing (x300) and see how much faster a stirred tank homogenises.