Courant Number (CFL) Calculator
Compute the CFL (Courant–Friedrichs–Lewy) number for 1D or 2D advection-like problems and estimate a recommended maximum time step.
2D: C = |u|Δt / Δx + |v|Δt / Δy
What is the Courant Number?
The Courant number (often called the CFL number) is a dimensionless value used in numerical simulation to describe how far information travels during one time step relative to your spatial grid size. In plain language: it tells you whether your simulation is trying to move physics too far, too fast, between updates.
For many explicit finite-difference and finite-volume methods, stability depends strongly on this number. If the CFL number is too high, your solution can oscillate, diverge, or blow up. If it is chosen reasonably, your solver is much more likely to remain stable and physically meaningful.
Core Formulas
1D advection-style form
C = |u|Δt / Δx
- u: characteristic speed or wave speed in x direction
- Δt: time-step size
- Δx: cell size or node spacing in x direction
2D extension
C = |u|Δt / Δx + |v|Δt / Δy
In two dimensions, contributions from each direction add up. This means a setup that looks stable in x alone can still fail once y-direction transport is included.
Why the CFL condition matters
Numerical methods are constrained by information speed. If a wave, particle, or transported quantity crosses too many cells in one update, the algorithm loses causal accuracy. In that case, your discretization cannot properly represent the underlying PDE dynamics.
- Too large Δt → unstable or noisy solution
- Smaller Δx (finer mesh) → usually requires smaller Δt
- Larger flow speed → also requires smaller Δt
How to use this calculator
- Select 1D or 2D.
- Enter your velocity components and grid spacing values.
- Provide your current Δt.
- Set a target CFL (1.0 is a common first check for explicit hyperbolic updates).
- Click Calculate to see CFL value and suggested max time step.
The calculator also reports the directional parts of CFL (e.g., Cx and Cy in 2D), which helps identify which axis is creating the strictest stability requirement.
Interpreting results quickly
- C < 0.5: generally conservative and stable for many explicit transport setups
- 0.5 ≤ C ≤ 1.0: often acceptable but near method-dependent limits
- C > 1.0: commonly unstable for many explicit schemes
Important: CFL limits depend on your specific discretization and equation system. For example, diffusion terms and source stiffness can impose stronger constraints than advection alone.
Worked example
Suppose you have a 1D flow with u = 3 m/s, Δx = 0.06 m, and Δt = 0.01 s.
CFL = (3)(0.01)/0.06 = 0.5.
That is often a comfortable value for many explicit transport updates.
If you refine the mesh to Δx = 0.02 m but keep the same time step, CFL becomes 1.5, which may cause instability.
To recover stability, reduce Δt proportionally.
Common mistakes
- Using signed velocity directly without absolute value for CFL magnitude checks
- Forgetting that 2D/3D contributions accumulate
- Applying a rule-of-thumb threshold from one scheme to a different scheme
- Ignoring additional restrictions from diffusion, chemistry, or source terms
- Not re-checking CFL after mesh refinement or parameter changes
Practical tips for robust simulations
1) Start conservative
Start with a lower CFL (for example 0.2 to 0.5), verify stability and accuracy, then increase cautiously if runtime is a concern.
2) Use adaptive time stepping when possible
If velocity varies in space or time, adaptive stepping keeps CFL within your target range and prevents sudden instability events.
3) Monitor max CFL every step
For spatially varying fields, compute local CFL per cell and track the maximum. Stability is controlled by the worst-case location, not the average.
FAQ
Is CFL = 1 always stable?
No. CFL = 1 is a common threshold for some explicit hyperbolic schemes, but each method has its own stability region.
Can I ignore CFL for implicit methods?
Implicit methods often relax strict CFL stability limits, but very large time steps can still reduce accuracy and produce poor transient behavior.
Why does finer mesh force smaller time steps?
Because CFL scales with 1/Δx. Halving grid spacing often requires halving time step (or more) to keep CFL constant.
Bottom line
The Courant number is one of the most important first checks in computational fluid dynamics and transport simulation. Use this calculator as a quick stability sanity check, then validate against your specific discretization, physics, and accuracy goals.