Stability and the CFL Condition
Learning objectives
- State the CFL condition as a limit on the Courant number
- See an explicit solver blow up when the time step is too large
- Explain why faster rock or a finer grid needs a smaller time step
- Know the 1D and 2D stability limits
A Hard Speed Limit
Marching the wave equation forward with an explicit stencil is fast, but it comes with a non-negotiable rule. In a single time step, information may only travel a fraction of a grid cell. Break that rule and the scheme does not merely lose accuracy; it becomes unstable and the wavefield explodes. The controlling quantity is the Courant number
the distance a wave travels in one step measured in grid cells. The CFL condition (Courant, Friedrichs, Lewy) requires to stay below a limit set by the scheme: in one dimension, and for the two-dimensional engine.
Below the Line and Above It
Slide the Courant number and the two panels tell the whole story. Below the limit the space-time image shows a clean pulse tracing its path and the amplitude curve stays flat. Cross the limit and a checkerboard instability erupts, doubling every few steps until it saturates everything; the amplitude curve turns into a rising exponential. There is no gentle degradation, just a cliff.
The practical consequence shapes every large simulation. Because (up to the constant), faster rock forces a smaller time step, and so does a finer grid. A high-velocity salt body or a high-resolution model can dominate the cost of a run, not through more grid points alone but through the tiny time step the fastest cell demands. This is why the engine ships a cflDt helper that returns a safe step below the limit: it is cheaper to compute the right time step once than to watch a simulation blow up. With stability secured, the remaining error is the subtle one this part builds toward, numerical dispersion.