Numerical Methods · Design background
Adding a second spatial dimension doesn't just add work — it tightens the rules. ADI is the standard way out, and it's built entirely from pieces you already have.
The 1D fin-stability lab derived an explicit stability limit from a single diffusion direction. A 2D plate diffuses heat in both $x$ and $y$ at once:
Explicit time-stepping has to respect both directions' tendency to amplify error simultaneously, and the two effects add:
With equal spacing in both directions, that's exactly half the 1D limit. Every dimension you add to a problem squeezes explicit time-stepping further — in 3D, it's worse again.
A fully implicit 2D step would be unconditionally stable, but solving for every point's new value in terms of every other point's new value means a large, genuinely 2D linear system — expensive. Alternating Direction Implicit finds a middle path: split one time step into two half-steps, and in each half-step, be implicit in only one direction.
Each half-step is just the 1D implicit scheme from the fin-stability lab, applied row-by-row or column-by-column with the exact same Thomas algorithm. Swapping which direction is implicit each half-step is what makes the combined method stable in both directions, even though neither half-step alone is.
Set ADI to 5× the explicit-only limit and it stays smooth; set 2D Explicit to just 1.5× that same limit and it diverges within a few dozen steps. Open the lab →
It's tempting to read "unconditionally stable" as "any time step is fine" — it isn't. ADI's truncation error still grows with $\Delta t$, the same as any time-marching scheme; a huge step just won't diverge, it'll quietly give you a less accurate answer for the early transient (though it still relaxes to the correct steady state, since that's a fixed point of the scheme regardless of step size). Stability answers "will this number mean anything at all"; accuracy answers "how close is it to the truth." They're different questions, and a method can score well on one and only adequately on the other.
EngineeringCandy · Learn · the design thinking behind the playground