⏱️ CFL Criterion Calculator — Courant-Friedrichs-Lewy
Compute CFL number C = |u|Δt/Δx, diffusion/Fourier numbers, combined stability, max stable Δt for explicit schemes, cell Reynolds & Péclet. Ref: §2.7.2, Eq. 2.86.
⏱️ Wave Propagation & Grid
📝 Configuration
Key Equations:
$C = \dfrac{|u|\Delta t}{\Delta x} \le C_{\max}$
$d = \dfrac{\alpha\Delta t}{\Delta x^2} \le \tfrac{1}{2}$
$C + 2d \le 1\;\;\text{(combined)}$
$C = \dfrac{|u|\Delta t}{\Delta x} \le C_{\max}$
$d = \dfrac{\alpha\Delta t}{\Delta x^2} \le \tfrac{1}{2}$
$C + 2d \le 1\;\;\text{(combined)}$
📊 Results
Configure inputs and click Check Stability.
ℹ️ About CFL
The Courant-Friedrichs-Lewy (CFL) condition (1928) ensures numerical stability by requiring that the numerical domain of dependence includes the physical domain of dependence. For explicit time-stepping: C = |u|Δt/Δx ≤ Cmax. The diffusion number d = αΔt/Δx² must also satisfy d≤0.5.
The Courant-Friedrichs-Lewy (CFL) condition (1928) ensures numerical stability by requiring that the numerical domain of dependence includes the physical domain of dependence. For explicit time-stepping: C = |u|Δt/Δx ≤ Cmax. The diffusion number d = αΔt/Δx² must also satisfy d≤0.5.
📘 Calculation Methodology
Theory
$$C = \frac{|u|\Delta t}{\Delta x} \le C_{\max}\quad\text{(Eq. 2.86)}$$
$$d = \frac{\alpha\Delta t}{\Delta x^2}\le\frac{1}{2}\quad\text{(Eq. 2.80)}$$
$$C + 2d \le 1\quad\text{(convection-diffusion)}$$
$$\Delta t_{\max} = \min\!\left(\frac{C_{\max}\Delta x}{|u|+c},\;\frac{0.5}{\alpha\sum 1/\Delta x_i^2}\right)$$
Scheme CFL limits:
Euler Explicit: C≤1 • Leapfrog: C≤1 • RK4: C≤2√2≈2.83 • Implicit: unconditional
Scheme CFL limits:
Euler Explicit: C≤1 • Leapfrog: C≤1 • RK4: C≤2√2≈2.83 • Implicit: unconditional
Worked Example
Problem: u=10 m/s, c=340 m/s, Δx=0.01 m, Euler explicit
1. ΔtCFL = Cmax·Δx/(|u|+c) = 1×0.01/(10+340) = 2.86×10-5 s
2. Δtdiff = 0.5/(α/Δx²) = 0.5/(2.2e-5/1e-4) = 2.27 s
3. Δtmax = min(2.86e-5, 2.27) = 2.86×10-5 s
4. At Δt = 0.9×Δtmax: CFL=0.026, d=5.7e-6 ✅ STABLE
1. ΔtCFL = Cmax·Δx/(|u|+c) = 1×0.01/(10+340) = 2.86×10-5 s
2. Δtdiff = 0.5/(α/Δx²) = 0.5/(2.2e-5/1e-4) = 2.27 s
3. Δtmax = min(2.86e-5, 2.27) = 2.86×10-5 s
4. At Δt = 0.9×Δtmax: CFL=0.026, d=5.7e-6 ✅ STABLE
References
- Courant, R., Friedrichs, K. & Lewy, H. “Über die partiellen Differenzengleichungen der mathematischen Physik,” Math. Ann., 100:32–74, 1928.
- Gupta, S. C. Applied CFD — §2.7.2, Eq. 2.86, Eq. 2.80.
- Anderson, J. D. Computational Fluid Dynamics, McGraw-Hill.
- Ferziger, J. H. & Perić, M. Computational Methods for Fluid Dynamics, Springer.