The 3D version computes seawater pH and calcifying-fluid pH as two lumped, zero-dimensional numbers and animates a coral colony whose polyp colour tracks the result. This 2D version throws that shortcut away and actually solves the physics in space: it integrates a 1D reaction-diffusion PDE for proton concentration across the real calcifying-fluid layer, from the skeleton growth front (x=0) to the calicoblastic membrane (x=L) that separates the fluid from the coelenteron/seawater side.
∂C/∂t = D·∂²C/∂x² + k_r·e^(−x/ξ)·max(0, Ω(x) − 1) (0 < x < L)
x=0 (skeleton): zero-flux + local reaction source
(precipitation locally releases H+ via
HCO3− ⇌ CO3²− + H+ bicarbonate buffering)
x=L (membrane): −D·∂C/∂x = k_ex·(C − C_sw) + P_pump·C
(passive exchange with seawater + active
Ca²⁺-ATPase proton extrusion)
C = 10^(9−pH) [relative nM units], Ω(x) = Ω0·exp(k·(pH(x) − pH0))
Finite-difference explicit integration (81-point grid, Neumann + Robin boundaries via ghost nodes, CFL-stable time step) runs every frame until the profile settles. The pump term is identical physiology to the 3D sim — same efficiency curve under thermal stress and bleaching — but here it only sets the boundary condition at the membrane; the pH value actually reached at the skeleton also depends on how fast protons diffuse back in from seawater and how strongly the precipitation reaction at the growth front is pushing the other way. That interplay is invisible to a lumped 0D model and is the entire point of solving it in 2D.
- CO₂ / temperature / pump sliders — same seawater-chemistry and proton-pump physiology as the 3D sim, feeding the same efficiency and buffer formulas.
- Water flow / mixing — new here: sets the exchange coefficient kex at the membrane. Low flow thickens the real mass-transfer boundary layer corals rely on for ion resupply, slowing equilibration with open seawater — a well-documented flow-calcification link (Falter et al.) that a 0D model has no mechanism to represent at all.
- Bleaching toggle — cuts pump efficiency the same way as the 3D sim, visibly flattening the spatial gradient here rather than just changing a single number.
The strip below is the actual solved cross-section: colour tracks local Ω(x) (blue = supersaturated/calcifying, red = Ω<1/dissolving), and the graph beneath it plots the live pH(x) profile from skeleton to membrane. Dots drifting through the strip represent CO₃²⁻ density, thinning out where Ω is low.