Mixing Ca²⁺ and CO₃²⁻ solutions (e.g. CaCl₂ + Na₂CO₃) drives classical nucleation once the supersaturation ratio S = [Ca²⁺][CO₃²⁻]/Ksp is high enough to overcome the nucleation barrier:
ΔG* = 16πγ³Vm² / (3(RT lnS)²)
J = A·exp(−ΔG*/RT)
Higher S and higher T shrink ΔG*, so the nucleation rate J (particles per second, shown live) rises steeply — this simulator drives it directly from your S and T sliders (the exact prefactor A and γ are lumped into a single readable scale constant, as in the 3D original — see the code comment next to nucleationRateJ()).
Which polymorph forms is governed by Ostwald's step rule plus a real inhibitor effect: freshly nucleated CaCO₃ tends to appear first as the least-stable, lowest-surface-energy phase — spherical vaterite — which normally redissolves and reprecipitates as the thermodynamically stable calcite (rhombohedral) within seconds to minutes. Dissolved Mg²⁺ ions adsorb onto calcite's growth steps and strongly poison that step, which is why seawater and biomineralizing organisms — both Mg²⁺-rich — form needle-shaped aragonite or stabilized vaterite instead of calcite, even though calcite is the more stable form in pure water.
- S (supersaturation) — sets the nucleation rate J and the growth speed of every particle.
- Mg²⁺/Ca²⁺ — raises the odds a nucleus forms as aragonite instead of calcite, and slows (or blocks) vaterite → calcite conversion, matching the real inhibition mechanism above.
- Temperature — speeds growth and the vaterite → calcite transformation rate (an Arrhenius-type effect).
- pH — more CO₃²⁻ is available at high pH, which raises the effective nucleation rate.
This is the same competition exploited to engineer CaCO₃ drug-delivery nanoparticles: colloidal or biomineralization-style synthesis routes tune S, Mg²⁺ and pH specifically to lock in the porous, higher-surface-area vaterite phase (good for loading drugs into pores) instead of letting it age into denser, less useful calcite.
This 2D view renders a cross-section through the beaker: each particle's position is sampled the same way as the 3D original (a radially-weighted disk sample, projected onto one axis), so the spatial density you see matches the 3D version's horizontal distribution. Drag the beaker to pan, scroll to zoom, and watch the strip chart below it track the phase mix over time.