CFL time step calculator for FDTD and PIC simulations
Updated · Scientifically reviewed by Dinkar Mishra, PhD on
Short answer
For the explicit Yee scheme used by most FDTD and electromagnetic PIC codes, the time step must satisfy Δt ≤ 1/(c √(1/Δx² + 1/Δy² + 1/Δz²)). With cubic cells of size Δx in D dimensions this is Δt ≤ Δx/(c√D). Codes usually run at 0.9–0.99 of the limit. PIC also needs ωpe Δt ≲ 0.2 to resolve plasma oscillations. Enter your cell sizes below.
Who this is for
Users of electromagnetic PIC and FDTD codes choosing a stable, accurate time step, and students learning numerical stability.
CFL time step (Yee FDTD) calculator
Results update as you type. Scientific notation such as 1e18 is accepted.
| Stability limit Δt_max | — | |
|---|---|---|
| Chosen time step | — | |
| ωpe·Δt (if density given) | — |
Formula
The Courant–Friedrichs–Lewy stability condition for the explicit, second-order Yee FDTD scheme is
using only the terms for the dimensions you simulate. The Courant number must be below 1. Most codes default to about 0.95–0.99.
For PIC, plasma oscillations must also be resolved:
and the leapfrog particle push is unconditionally unstable for .
Worked example
Laser–plasma simulation with resolved by 16 cells in each direction, so nm in 3D:
At a Courant number of 0.95, as. With cm⁻³ ( rad/s), , comfortably resolved.
The same cells in 1D allow as, times larger, which is one reason 1D and 2D runs are so much cheaper than 3D.
How to use the result
- Choose cell sizes from the physics first: see PIC grid size.
- Compute here and pick a Courant number supported by your code.
- Check for the densest region of your simulation.
- Multiply the number of steps by cells and particles to estimate cost with the PIC Simulation Planner.
Assumptions and limitations
- Applies to the standard Yee scheme. Higher-order stencils, CKC/Lehe-type modified solvers, implicit and spectral solvers have different stability limits, so consult your code’s documentation.
- Non-uniform or refined meshes are limited by their smallest cells, unless the code subcycles refined levels.
- Stability is not accuracy. Phase errors and numerical dispersion can be significant well below the limit for long propagation distances.
Frequently asked questions
What happens if I exceed the CFL limit?+
The explicit update becomes unstable: numerical errors grow exponentially, and fields blow up within a few hundred steps, often appearing first as checkerboard noise at the grid scale.
Is a smaller Courant number always better?+
Not necessarily. For the Yee scheme, numerical dispersion depends on the Courant number, and in 1D the scheme is exactly dispersion-free at the limit cΔt = Δx (the "magic time step"). Very small steps cost more without improving spatial accuracy. Some PIC numerical-Cherenkov mitigations prefer specific Courant numbers, so check your code documentation.
Does the CFL condition apply to spectral (PSATD) solvers?+
Pseudo-spectral analytical time-domain solvers integrate Maxwell's equations exactly in Fourier space for vacuum, so they are not limited by the Yee CFL condition in the same way. The particle push and plasma-frequency constraints still apply.
What about electrostatic PIC?+
Electrostatic codes have no light-wave CFL limit. Instead they need ωpe Δt ≲ 0.2 and that thermal particles cross less than about one cell per step.
References
- Courant, Friedrichs & Lewy, On the partial difference equations of mathematical physics, IBM J. Res. Dev. 11, 215 (1967; English translation of the 1928 paper) · Peer-reviewed article
- Yee, Numerical solution of initial boundary value problems involving Maxwell's equations, IEEE Trans. Antennas Propag. 14, 302 (1966) · Peer-reviewed article
- Birdsall & Langdon, Plasma Physics via Computer Simulation (CRC Press) · Standard textbook
Planning a real simulation?
Estimates are the start. We design, run and verify the full simulation, with convergence checks and documented limits.
Services listed on this page are available today. Products marked “early access” or “in development” on our platform page are not yet generally available.
Spotted an error or an outdated command? Tell us. We correct verified issues promptly.