Each grid cell is a block of limestone (CaCO₃). Rain carrying dissolved CO₂ forms carbonic acid, so its acidity is set by pH; the model converts that to a hydrogen-ion concentration [H⁺] = 10⁻ᵏᵎ and uses it, per the surface-reaction-controlled regime of carbonate dissolution kinetics (Plummer–Wigley–Parkhurst), as the rate driver:
rate ∝ k · [H⁺]
[H⁺] = 10^(−pH)
budget += rate · speed · dt
while budget ≥ 1: dissolve one frontier cell
Dissolution only ever removes a rock cell adjacent to existing void — the growing "frontier" — weighted toward fractures (weak planes seeded by the fracture-density slider) and biased downward by gravity-driven percolation. Bedding heterogeneity adds extra randomness to that weighting, controlling how sinuous or straight the resulting passages are, just as real bedding-plane control shapes cave morphology.
- Porosity — void cells as a fraction of the whole cross-section; the growth curve accelerates over time because a larger connected void surface exposes more rock to acid — the same conduit-enlargement positive feedback that turns a hairline fracture into a cave over geologic time.
- Sinkholes — counted the first time a dissolution front reaches the surface under a soil column, which then visibly slumps.
- Speleothems — once a cave passage is wide enough, dripping water occasionally starts a stalactite that lengthens slowly at the ceiling, mirroring real calcite precipitation as CO₂ degasses from the drip.