The 3D version of this simulator lets pits repassivate by rolling a scripted probability. This 2D cross-section instead solves the actual coupled electrochemistry that decides whether a real pit escapes or dies: Ohm's law for the ohmic (IR) potential drop across the pit cavity, combined with mixed activation/mass-transport-controlled anodic kinetics — Galvele's classic pit-stability (X·i) criterion, tested the moment each pit nucleates.
Film breakdown potential (chloride/temperature, same empirical form used
in real corrosion engineering):
E_bd = E_bd0 − S·log10[Cl⁻] − α·(T − 25°C)
At any pit depth X, dissolution current is throttled by the pit's own
ohmic drop (Ohm's law) before it reaches the Tafel-kinetic surface:
η(i) = E − E_active0 − ρ_IR(Cl)·i·(X + X_mouth) [IR drop grows with i AND X]
i_kin(η) = i0·10^(η/βa) [anodic Tafel law]
i = i_kin·i_lim /(i_kin + i_lim) [mixed kinetic/mass-transport control]
Solved by bisection on i (the equation is implicit — i sets its own
throttling voltage), never by an assumed closed form.
Galvele stability test, run once at the embryonic pit depth X_emb right
after nucleation:
X_emb · i(X_emb) > (X·i)_crit → pit escapes metastability, keeps growing
X_emb · i(X_emb) ≤ (X·i)_crit → pit dies immediately (metastable crater)
A surviving pit keeps growing by Faraday's law, dX/dt = i·M /(n·F·ρ_metal),
with i re-solved every frame — so its growth visibly slows as its own IR
drop deepens, and it can still stall out later if you pull E back down.
- Applied potential E — the driving force for dissolution; only once E sits enough above Ebd does a freshly nucleated pit's embryonic X·i product clear the stability threshold, so the "stable pitting potential" this model produces sits visibly above the breakdown potential — exactly the gap seen on real polarization curves.
- Chloride [Cl⁻] — both lowers the film breakdown potential (more nucleation attempts) and lowers the effective pit-cavity resistivity ρIR, which is why concentrated-chloride pits clear the stability threshold at far lower applied potentials than dilute ones.
- Temperature — raises both the active-dissolution exchange current and the film breakdown susceptibility, the same two levers real corrosion engineers track via the "critical pitting temperature."
- Inclusion / weak-site density — fraction of surface sites capable of attempting nucleation at all; most attempts still die at the embryo stage even where the site itself is weak.
- Watch most nucleation events flash into a tiny brown crater and stop (they failed the X·i test) while the rare orange survivor keeps digging — and its growth visibly decelerates as its own ohmic drop deepens, even though it never fully arrests.