Skip to main content

CFL / Courant Number Calculator - Stable Time Step for CFD

Your CFD simulation was running fine — then the residuals exploded to infinity and everything turned to NaN. Nine times out of ten, the culprit is a time step that's too large, violating the CFL condition. The Courant–Friedrichs–Lewy number is the single most important control on the stability of any transient (time-marching) simulation, and getting it right is the difference between a clean run and a wasted afternoon. This guide gives you a free CFL calculator (validated against the standard formulas), explains the condition in plain language, and shows you exactly how to choose a stable, efficient time step.


CFL Courant number stable unstable time step CFD

Figure 1. The Courant number measures how far the flow travels per time step relative to the cell size. Keep it below 1 (explicit solvers) and the simulation stays stable; exceed it and the solution diverges.

The CFL / Courant Number Calculator

Three modes: compute the Courant number from your time step, find the maximum stable time step from a target CFL, or handle multi-dimensional / compressible cases. Each field has a working default.

⏱️ CFL / Courant Number Calculator

Time-step selection & numerical stability for transient CFD
Find CFL (from Δt)
Find max Δt (from CFL)
Multi-D / Compressible
Enter your time step to get the Courant number and a stability verdict.
CFL = u · Δt / Δx
Enter a target Courant number to get the largest stable time step.
Δt = CFL · Δx / u
3D Courant number using per-direction velocities and cell sizes. Tick compressible to add the speed of sound to the wave speed.
CFL = Δt·(uâ‚“/Δx + u_y/Δy + u_z/Δz)
result
Formulas: CFL = u·Î”t/Δx (1D); Δt = CFL·Î”x/u (max step); multi-D CFL = Δt·Î£(uáµ¢/Δxáµ¢); compressible uses wave speed u + c (sound). Explicit solvers need CFL ≤ 1 (often ≤ 0.7); implicit solvers allow higher but stay low for time-accurate transients. The smallest cell and fastest flow set the limit. Estimates for initialising a run — always monitor the solved Courant field and refine if it exceeds your target.
Validation note: the calculator matches the standard CFL formulas — u = 10 m/s, Δx = 0.01 m, Δt = 0.0005 s gives exactly CFL = 0.5; a target CFL of 0.7 on the same flow gives a max time step of 0.7 ms; and the 3D default case returns CFL = 0.48. All consistent with the Courant–Friedrichs–Lewy condition.

What Is the CFL / Courant Number?

The CFL number (also called the Courant number) is a dimensionless quantity that answers a simple question: in one time step, how many mesh cells does the flow travel across?

CFL = u · Δt / Δx

where u is the flow velocity, Δt is the time step, and Δx is the cell size. It's named after Richard Courant, Kurt Friedrichs and Hans Lewy, who derived the stability condition in their landmark 1928 paper on partial differential equations.

  • CFL < 1 — the flow stays within a single cell each step. The solver can "see" where information comes from. Stable.
  • CFL > 1 — the flow skips over one or more cells per step. Information is lost, and the solution grows without bound. Unstable.
Intuition: imagine a wave crossing a grid. If your time step is so large that the wave jumps past whole cells before the solver updates them, the numerical scheme literally can't keep track of it — and the errors amplify until the solution explodes. The CFL number keeps the time step small enough that the numbers can follow the physics.

The CFL Stability Condition

The formal CFL condition states that the numerical domain of dependence must contain the physical domain of dependence. In plain terms: the time step must be small enough that the flow doesn't travel further than one cell before the scheme updates it. For explicit time-marching schemes this gives:

CFL ≤ 1 (necessary for stability)

This is a necessary condition for convergence when solving hyperbolic PDEs (like the Euler and Navier–Stokes equations) with explicit schemes. Violate it, and the simulation produces unphysical results — the solution "blows up" and diverges.

Important: the CFL condition is a stability limit, not an accuracy guarantee. Staying under CFL = 1 keeps the solver stable, but you may still need a smaller time step to resolve the physics accurately in a time-dependent simulation.

The Formula & How to Use It

The real power comes from rearranging the formula. Since you usually know the velocity and the cell size, you solve for the time step:

Δt = CFL · Δx / u

Pick a target CFL (say 0.7 for an explicit solver), and this gives you the largest stable time step. Worked example:

  • Flow velocity u = 10 m/s
  • Smallest cell Δx = 0.01 m
  • Target CFL = 0.5
  • Δt = 0.5 × 0.01 / 10 = 0.0005 s (0.5 ms)

The calculator's second mode also tells you how many time steps a simulation of a given duration will need — directly proportional to your compute cost.

Key point — the limit is local. Every cell has its own Courant number. The smallest cell combined with the fastest flow sets the most restrictive limit for the whole simulation. Always base your time step on that worst-case cell, not an average.

Explicit vs Implicit Solvers


Using CFL condition explicit implicit solver time step

Figure 2. Explicit solvers are strictly bound by CFL ≤ 1; implicit solvers are unconditionally stable and allow much larger Courant numbers, at the cost of time accuracy.

The CFL limit you must obey depends entirely on your solver type:

Explicit solverImplicit solver
CFL limit≤ 1 (often 0.5–0.9)Can be 5, 10, 100+
StabilityConditionally stableUnconditionally stable
Cost per stepLow (cheap)Higher (solves a system)
Best forFast transients, shocks, DES/LESSteady-state, slow transients
CatchTime step strictly limitedLarge CFL hurts time accuracy

Implicit schemes can be unconditionally stable — any CFL can be applied without the solution blowing up. But there's a catch: at very high Courant numbers, the time step becomes so large that it no longer resolves the physics accurately. For a time-accurate transient simulation, keep CFL around 1 even with an implicit solver.

Multi-Dimensional & Compressible Flow

In 2D and 3D, contributions from each direction add up:

CFL = Δt · (uâ‚“/Δx + u_y/Δy + u_z/Δz)

This is why a fine cell in any direction tightens the limit. For compressible flow, the fastest-moving information isn't the flow itself — it's the pressure (sound) waves. So you use the wave speed:

wave speed = |u| + c (c = speed of sound)

At Mach 0.15 in air, the flow might be 50 m/s but sound travels at 343 m/s — so the wave speed is ~393 m/s, forcing a much smaller time step than the flow velocity alone would suggest. The calculator's multi-D mode handles both effects.

CFL, Mesh Size & y⁺

The CFL number ties your time step directly to your mesh — which is why this calculator pairs so naturally with mesh-quality tools:

  • Grid independence: as you refine the mesh in a grid independence study, Δx shrinks — so Δt must shrink too, or the CFL number rises past its limit.
  • Near-wall meshing (y⁺): resolving the boundary layer to a low y⁺ creates extremely thin first cells. Those tiny cells can force very small time steps in explicit or scale-resolving simulations — a real cost driver.
  • Velocity: the higher the flow speed (related to your Reynolds number setup), the smaller the stable time step.
The connected picture: mesh size (Δx), wall resolution (y⁺), flow speed (u) and time step (Δt) are all linked through the CFL number. Change one and you often must change another. Understanding this relationship is what separates a stable, efficient simulation from a slow or divergent one.

Common Mistakes

  • Using an average cell size instead of the smallest. One tiny cell sets the limit for the whole domain — always use the worst case.
  • Ignoring the speed of sound in compressible flow. The wave speed (u + c), not the flow speed, governs stability.
  • Assuming implicit means "any time step is fine." It's stable, but large CFL destroys time accuracy for transients.
  • Setting the time step once and forgetting it. If velocity rises during the run (e.g. accelerating flow), the CFL rises too.
  • Refining the mesh without shrinking Δt. A finer mesh needs a smaller time step to keep CFL in check.
  • Mixing units. Velocity in m/s, cell size in m, time in s — a stray mm silently corrupts the CFL.
  • Chasing an unnecessarily tiny time step. Too small wastes compute for no accuracy gain; aim for the largest stable and accurate step.
  • Forgetting to monitor the Courant field. Most solvers report CFL per cell — plot it and check the maximum, not just the average.

Frequently Asked Questions

What is the CFL or Courant number?

A dimensionless value comparing the distance flow travels in one time step to the cell size: CFL = u·Î”t/Δx. It measures how many cells the flow crosses per step and is the key control on explicit time-marching stability.

What is the CFL condition for stability?

For explicit schemes, the Courant number must not exceed about 1. If the flow crosses more than one cell per time step, information is lost and the solution diverges. Explicit solvers need CFL ≤ 1, often below 0.7.

How do you calculate the maximum time step?

Rearrange the formula: Δt = CFL·Î”x/u. For u = 10 m/s, Δx = 0.01 m and target CFL = 0.5, the maximum time step is 0.0005 s.

What is a good CFL number for CFD?

For explicit solvers, ≤ 1 (0.5–0.9 is common). Implicit solvers can run at 5, 10 or higher, but for time-accurate transients keep CFL near 1 so the time step resolves the physics.

What is the difference between explicit and implicit solvers for the CFL limit?

Explicit solvers are cheap per step but strictly limited to CFL ≈ 1. Implicit solvers cost more per step but are unconditionally stable, allowing larger time steps — though very large steps reduce time accuracy.

Does a finer mesh require a smaller time step?

Yes, for explicit solvers. Since CFL depends on cell size, smaller cells force a smaller time step. Very fine near-wall meshes (low y⁺) can demand extremely small time steps.

Conclusion

The CFL / Courant number is the guardrail of transient CFD. It links your time step, mesh size and flow speed into a single value that decides whether your simulation runs cleanly or diverges into NaN. The workflow is simple: find the smallest cell and fastest wave speed, choose a target CFL for your solver (≤ 1 explicit, low for accurate implicit transients), compute the time step, and monitor the Courant field as you go.

Use the calculator above at the start of every transient run — it takes seconds and saves you from the most common cause of blown-up simulations.


For more CFD theory, meshing guides and free engineering calculators, explore Free CFD Tutorial. If this tool helped you, please share it with your classmates and colleagues.

Comments

Popular posts from this blog

Ceiling Fan Simulation in a Room Using Ansys Fluent | Adding Fan Boundary Condition in CFD

Ceiling Fan Simulation in a Room Using Ansys Fluent | Adding Fan Boundary Condition in CFD Introduction In this tutorial, we will perform a CFD simulation of a ceiling fan inside a room using Ansys Fluent. We will also learn how to add a fan boundary condition to simulate airflow behavior accurately. Step 1: Setting Up the Geometry in Ansys Open Ansys Workbench and create a new Fluid Flow (Fluent) Project . Use SpaceClaim or DesignModeler to create the room and fan geometry. Ensure that the fan blades are modeled properly or import the 3D fan model. Step 2: Meshing the Model Open the Meshing Tool in Ansys. Apply a fine mesh around the fan for better resolution. Use inflation layers near walls for accurate boundary layer calculations. Step 3: Defining the Boundary Conditions Open Ansys Fluent and import the mesh. Set the room walls as no-slip boundaries. Define the fan region and apply the fan boundary condition . Set the inlet velocity and outlet pressure as per simulation r...

TUTORIAL 03: CFD ANALYSIS OF DATA CENTER USING OPEN FOAM SOFTWARE

Title : CFD analysis of data center using open foam software Figure 3.1 (a) Velocity Contour of data center with BCs Figure 3.1 (b) Meshed domain of data center Problem Identification In this problem investigation of data center using OPENFOAM is proposed for heat transfer modeling (data center cooling), in which air is flow in data center from prescribed location section from one inlet condition, which is assumed at surface of left side wall (See the following figure). Air properties are selected from literature available in digital medium. Outlet is at top of the room which is selected for cooling effect of data center system. Some assumptions are applied in this problem like initial room temperature is assumed at constant value for this problem. Air properties are also assumed constant for this problem. “ buoyantBoussinesqPimpleFoam ”  is selected as solver for this problem. Open Foam software is installed on Win 7, provided by FSD blueCAPE Lda: http://bluec...

FDS-01: SIMPLE FLUID FLOW ANALYSIS USING FDS (FIRE DYNAMICS SIMULATOR) TOOL

FDS-01: SIMPLE FLUID FLOW ANALYSIS USING FDS (FIRE DYNAMICS SIMULATOR) TOOL In this tutorial a window is created which is treated as inflow of air with velocity of 2.5 m/s having temperature of 5 C. The outflow conditions is treated at top of the office, and the boundary condition is set as open to atmosphere  The steps are followed in this tutorial are listed below::   Step I: create header syntax file to start program in FDS software.   &HEAD CHID='office'/ Note: office is user defined name of FDS function/ file.   Step II: create syntax for simulation flow time.   &TIME T_END=15.0 Note: 15 sec is simulation flow time, which is solved in FDS software.   Step III: create syntax for initial temperature of domain.   &MISC TMPA=45.0/   Note: 45 C is initial room temperature, which is provided in this tutorial. Following three syntax is must for every FDS function.   Step IV: Create syntax for geom...