This is a genuine two-dimensional counterpart, not the 3D pore-network sliced flat: a Hele-Shaw cell — two closely-spaced plates — is itself the classic experimental setting for viscous fingering, and its physics is exactly a 2D problem. Instead of the 3D model's index-based "distance travelled" shortcut for viscous stabilization, this simulator actually solves the Laplace pressure equation over the defending fluid by relaxation every frame, and separately runs a real connectivity search for pockets of defending fluid that the front has sealed off — an effect that barely exists in a coarse 3D lattice but dominates real 2D micromodel floods.
∇²φ = 0 in the defending fluid (Darcy flow ⇒ harmonic pressure field)
φ = 0 on the invaded cluster φ = 1 at the outlet (far-field source)
score = threshold·(1−w) − S·φ·w S = (1−M)/(1+M) (Saffman-Taylor sign)
Every frame the solver relaxes φ toward the true harmonic field with Gauss-Seidel sweeps (insulating trapped pockets from the field, since no flow reaches them), then the lowest-score frontier site invades next, where w is how strongly Ca has switched control from random capillary thresholds to the solved field. The sign of S = (1−M)/(1+M) — the actual Saffman-Taylor linear-stability factor for a Hele-Shaw interface — decides everything: S > 0 (M < 1, a thin invader pushing a thick defender) makes high-φ protruding tips score lowest, so they race ahead and the front fragments into fractal fingers; S < 0 (M > 1) penalises the same tips, so the front self-flattens into stable displacement; at low Ca the random threshold dominates regardless of S, giving chaotic capillary fingering. After every batch of invasions a flood-fill from the outlet marks any defending cell it can no longer reach as trapped — bypassed fluid that stays behind no matter how long injection continues, the mechanism real coreflood experiments cite for residual saturation.
- Capillary number / Viscosity ratio — move between the three Lenormand regimes, exactly as in the 3D model, but here M's effect comes from the actual (1−M)/(1+M) stability sign, not a lookup.
- Pore-throat disorder — how heterogeneous the local capillary thresholds are.
- Injection rate — invasion events per second, for visualization only.
- Bypassed (trapped) — defending fluid cut off from the outlet by the invading front; unique to a real 2D flood, where it is trivial to encircle a pocket, unlike a 3D lattice where fluid can usually route around in the third dimension.