Skip to content
VLASIFY™
CalculatorCalculators & technical tools

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.

CFL time step (Yee FDTD) results
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

Δt≤Δtmax=1c1Δx2+1Δy2+1Δz2,\Delta t \le \Delta t_{max} = \frac{1}{c\sqrt{\dfrac{1}{\Delta x^2} + \dfrac{1}{\Delta y^2} + \dfrac{1}{\Delta z^2}}},

using only the terms for the dimensions you simulate. The Courant number C=Δt/ΔtmaxC = \Delta t/\Delta t_{max} must be below 1. Most codes default to about 0.95–0.99.

For PIC, plasma oscillations must also be resolved:

ωpeΔt≲0.2,\omega_{pe}\Delta t \lesssim 0.2,

and the leapfrog particle push is unconditionally unstable for ωpeΔt>2\omega_{pe}\Delta t > 2.

Worked example

Laser–plasma simulation with λ0=0.8 μm\lambda_0 = 0.8\ \mu\text{m} resolved by 16 cells in each direction, so Δx=Δy=Δz=50\Delta x = \Delta y = \Delta z = 50 nm in 3D:

Δtmax=5×10−8 mc3=5×10−85.196×108 s≈96 as.\Delta t_{max} = \frac{5\times10^{-8}\ \text{m}}{c\sqrt{3}} = \frac{5\times10^{-8}}{5.196\times10^{8}}\ \text{s} \approx 96\ \text{as}.

At a Courant number of 0.95, Δt≈91\Delta t \approx 91 as. With ne=1019n_e = 10^{19} cm⁻³ (ωpe=1.78×1014\omega_{pe} = 1.78\times10^{14} rad/s), ωpeΔt≈0.016\omega_{pe}\Delta t \approx 0.016, comfortably resolved.

The same cells in 1D allow Δtmax=Δx/c≈167\Delta t_{max} = \Delta x/c \approx 167 as, 3\sqrt{3} times larger, which is one reason 1D and 2D runs are so much cheaper than 3D.

How to use the result

  1. Choose cell sizes from the physics first: see PIC grid size.
  2. Compute Δtmax\Delta t_{max} here and pick a Courant number supported by your code.
  3. Check ωpeΔt\omega_{pe}\Delta t for the densest region of your simulation.
  4. 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

  1. 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
  2. Yee, Numerical solution of initial boundary value problems involving Maxwell's equations, IEEE Trans. Antennas Propag. 14, 302 (1966) · Peer-reviewed article
  3. 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.

Related guides

How Vlasify can help

Get a Quote