HomeFluid Dynamics & AerodynamicsSaffman-Taylor — Viscous Fingering

🫧 Saffman-Taylor — Viscous Fingering

Inject a low-viscosity fluid into a high-viscosity one in a Hele-Shaw cell: the interface destabilises into branching viscous fingers governed by the capillary number.

Fluid Dynamics & Aerodynamics3DModerate60 FPS
saffman-taylor ↗ Open standalone

About this simulation

This simulation models viscous fingering in a Hele-Shaw cell (two flat plates separated by a thin gap) with a Darcy-law grid model. Each frame it relaxes a pressure field so that it satisfies Laplace's equation (∇²p = 0) in the untouched viscous fluid, then grows the injected low-viscosity fluid outward at a rate set by the local pressure gradient — the Darcy velocity u = -(k/μ)∇p. Surface tension lowers pressure at sharp, convex tips (the Gibbs-Thomson condition), damping small bumps; turn it down and growth becomes Laplacian and DLA-like, producing a branching fractal.

🔬 What it shows

A low-viscosity fluid, seeded as a small disc at the centre of the grid, is pushed outward into a surrounding high-viscosity fluid confined between two close plates (a Hele-Shaw cell). The interface refuses to stay smooth: convex tips race ahead of flatter regions and split into branching viscous fingers, whose shape depends on the balance of viscous and surface-tension forces.

🎮 How to use it

Drag Capillary number to move from a few wide fingers (low Ca) to a dense branching fractal (high Ca). Viscosity ratio sets the contrast between the two fluids; Surface tension controls how strongly curvature is penalised; Injection rate scales how many cells fill per frame. Pause/Play freezes the animation, Reset reseeds the central disc, and clicking or tapping the canvas injects extra fluid at that point. The ? button opens a help panel with the equations.

💡 Did you know?

At high capillary number the radial fingering pattern is statistically self-similar with a fractal dimension close to 1.7 — the same value long measured for diffusion-limited aggregation (DLA) clusters, because both processes are governed by growth along the gradient of a harmonic (Laplace) field.

Frequently asked questions

What is the Saffman-Taylor instability simulated here?

The Saffman-Taylor instability is what happens when a low-viscosity fluid is forced into a high-viscosity fluid inside a narrow gap: the flat interface between them cannot advance smoothly and instead breaks into branching fingers. This simulation reproduces it numerically by relaxing a pressure field each frame and growing the interface fastest where the pressure gradient is steepest — exactly the mechanism identified by Philip Saffman and Geoffrey Taylor in 1958.

What is a Hele-Shaw cell and why does it matter here?

A Hele-Shaw cell is two flat plates separated by a very thin gap; fluid squeezed between them behaves like a two-dimensional version of flow through a porous medium, obeying Darcy's law u = -(k/μ)∇p. The simulation's grid represents this cell from above: filled cells are the injected fluid, empty cells are the viscous fluid whose pressure the code solves for with a grid relaxation of Laplace's equation every frame.

What do the Capillary number, Viscosity ratio, and Surface tension sliders actually control in the code?

Capillary number scales how strongly a cell's growth chance depends on the local pressure drop, raised to the power 1/Ca — lower Ca means only the steepest gradients grow, giving wide fingers. Viscosity ratio multiplies that same growth chance directly, so a bigger contrast between the fluids speeds up fingering overall. Surface tension both lowers the pressure assigned to convex, filled tip-cells (Gibbs-Thomson) and subtracts extra growth chance from concave dimples, which smooths the interface and sets the minimum finger width.

Why does lowering surface tension make the pattern look like DLA?

With surface tension near zero the code stops damping sharp tips, so growth is governed purely by the pressure gradient of a Laplace field — the same rule that drives diffusion-limited aggregation (DLA), where particles stick where a diffusing field's gradient is steepest. Both processes are examples of Laplacian growth, so at low surface tension the simulation produces the same kind of self-similar branching fractal that DLA clusters show, with a fractal dimension near 1.7.

Why does the simulation occasionally reset itself?

Every 30 frames the code checks how many grid cells near the top and bottom edges have been filled by the injected fluid. If more than a quarter of the cells along those edges are filled, it calls the same seed() function used by the Reset button, clearing the grid and starting a fresh disc at the centre — this keeps the pattern from growing into an uninteresting solid block that has hit the boundary of the simulated cell.

⚙ Under the hood

Inject a low-viscosity fluid into a high-viscosity one in a Hele-Shaw cell: the interface destabilises into branching viscous fingers governed by the capillary number.

viscous fingeringSaffman-TaylorHele-ShawfractalCanvas 2D

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)