# Courant number in CFD simulations

The Courant number is a non-dimensional number named after the mathematician Richard Courant. The Courant number can be used in Computational Fluid Dynamics (CFD) simulations to evaluate the time step requirements of a transient simulation for a given mesh size and flow velocity and is linked to the Courant–Friedrichs–Lewy (CFL) stability condition of numerical schemes.

## Courant number formula

The Courant number formula is defined as

\begin{gather} C=\frac{U \Delta{t}}{\Delta{h}} \end{gather}

Where $$U$$ indicates the flow velocity, $$\Delta t$$ is a representative time step of the simulation and $$\Delta{h}$$ the characteristic size of the mesh cell (in 1 dimension). For multi-dimensional problems, the condition can be evaluated as the sum in all directions, i.e.,

\begin{gather} C=\sum_{i} \frac{U_{i} \Delta t}{\Delta h_{i}} \end{gather}

In a CFD simulation, the Courant number broadly indicates how much the information travels (  $$U$$ ) across a computational grid cell ( $$\Delta h$$ ) in a unit of time ( $$\Delta t$$ ). If the Courant number is greater than one, it means that the information propagates through more than one grid cell at each time step, making the solution inaccurate and potentially leading to nonphysical results or divergence of the solution in certain integration schemes.

The Courant number plays an important role when running a transient CFD simulation, where we are interested in the variations of the flow field in time as well as in space. The physical time is discretised using a time step and the choice of time step has two main implications: one is related to the stability of the time discretisation scheme; the other is related to the physical meaning of the time step.

## The CFL condition

Let’s discuss the stability requirements first. From a numerical viewpoint, the time integration schemes can be broadly divided into three groups: explicit, implicit and semi-implicit. Roughly speaking, in explicit schemes the solution at the time step n+1 is calculated using the known values of the solution at time n. Conversely, in an implicit scheme, the solution at time n+1 is calculated using unknown values of the solution at time n+1, hence requiring the solution of an ODE. Lastly, semi-implicit schemes use both the solution at time n and n+1.

In order to converge explicit and semi-implicit schemes, the time step size needs to be carefully selected, otherwise the simulation might lead to nonphysical results or diverge altogether.

The stability requirements of time-integration schemes can be defined using the Courant–Friedrichs–Lewy (CFL) condition, which takes its name after Richard Courant, Kurt Friedrichs, and Hans Lewy  who introduced it in their paper [1].

The condition is expressed in terms of the Courant number as

\begin{gather} C=\frac{U \Delta{t}}{\Delta{h}} \leq C_{max} \end{gather}

Where $$C_{max}$$ varies depending on the type of time integration scheme, but it is generally equal to 1 or less. As anticipated before, this relates to the physical implications that the flow should not travel over more than one grid cell during a time step.

In many applications, the CFL condition implies that the time step could be very small leading to long and costly CFD simulations. Semi-implicit and implicit schemes alleviate such strict CFL condition allowing the use of time steps where the Courant number is higher than 1, however, this limit should not be exceeded in large areas of the computational domain, as this can lead to incorrect results.  As the Courant number is related to the local mesh size as well as the time step, some attention should be placed on mesh quality. In particular, very small sliver cells or cells with very high skewness can create unnecessarily stringent time step requirements.

Our free CFD software SimWorks adopts implicit time scheme solvers that are intrinsically stable, hence the CFL condition is not a necessary condition for stability, however the time step size should still be carefully selected.  The choice of the mesh size and time step should be studied based on the problem to be resolved, taking into account mesh requirements for spatial and geometrical accuracy, flow conditions (boundary conditions, velocity of the flow) and the accuracy required. In the next section, a few examples of how to select the time step will be discussed.

## How to select the time step of a CFD simulation

From a physical viewpoint, the time step indicates the smallest unit of time that we wish to resolve in the simulation, and therefore should be selected such that all the physics of interest are resolved in time. Any flow structure that changes faster than the time step will not be represented in the simulation. The characteristic time scale of the problem depends upon a number of factors that include the geometry size, the boundary conditions and the flow characteristics.

Identifying a representative physical time step for a problem can be challenging. If the problem has an intrinsic time varying quantity like the rotation of a geometrical part or a time varying boundary condition, a subdivision of such characteristic time can be used as a reference.

For example, in the case of a propeller simulation where the rotation rate of the propeller is $$\Omega = 1500$$ rpm (about 157.1 rad/s), the blades move by 1 degree of rotation in about 0.1 milliseconds (1.0e-4 seconds) therefore this could be used as a reference time for selecting the time step. Alternatively one can consider the radius of the propeller blades and calculate the linear speed of the tips ($$V_{t}$$). If we assume the propeller has a diameter of 0.3 m, with a time step of 1.0e-4 seconds, the tips would cover about 2.36 mm of space.Therefore we need to take into consideration the mesh size at around the tip of the blades to assess the CFL condition and adjust the time step accordingly.

Another way to estimate the required time step can be obtained using a characteristic geometry size and the characteristic velocity of the flow, typically the inlet velocity. The ratio of a length over velocity gives an indication of the time required for the flow to cover a distance equal to the characteristic length and such time should be subdivided into smaller units to define the time step.

In the example below, the aim is to simulate the flow past a glider of length $$L_{G}=12 m$$  at a speed of $$V_{\infty} = 25 m/s$$. The glider is set in a domain of length $$L_{D}=80 m$$. More details on how to define the computational domain for a CFD simulation are discussed here.

The time that would take a fluid particle to cross the entire domain from inlet to outlet can be calculated as:

\begin{gather} Flow-Though-Time=\frac{L_{D}}{V_{\infty}} = 3.2 seconds \end{gather}

This time can be considered as the largest time scale of the simulation. Similarly, it is possible to calculate a time scale relative to the glider, using the wing span or the length. The flow-through-time would be:

\begin{gather} Flow-Though-Time=\frac{L_{G}}{V_{\infty}} = 0.48 seconds \end{gather}

The time step should be selected to be a subdivision of a characteristic time scale of the system. In this case, let’s assume we are interested in capturing the unsteadiness of the glider wake, therefore we could use a small geometric feature of the glider as reference length. For example, one could use the main wing thickness (0.138 m) which would give a time scale of about 5.5e-3 seconds, and the time step could be set to be a subdivision of such time scale, e.g 5e-4 seconds.

Also, the type of flow, either laminar or turbulent, is a key factor to take into considerations, as in a turbulent flow the characteristic time scales of the solution are significantly smaller than a laminar flow. The implications of turbulent flows in a CFD simulation are discussed in more details in this article (link to article).

Once the time step is selected, this should be evaluated with respect to the mesh size. As discussed before, even in implicit time schemes approaches, it is recommended to maintain a CFL condition of order unity.

It is also possible to run transient simulations to obtain a steady-state solution. In particular, if the time evolution is of no interest a pseudo-transient approach can be adopted whereby the simulation is solved in time with relatively large time steps to drive the solution to convergence. To make the most of this approach, implicit time schemes should be used so that the time step can be increased beyond the stringent CFL requirements.

This pseudo-time marching procedure offers a degree of stability to the solution of the Ordinary Differential Equations (ODEs), however as the solution generally undergoes large changes during the initial phase of the convergence, a very large time step can drive the solution to nonphysical results. The pseudo-time step should be increased gradually as the flow evolves towards a steady-state solution.

In general, in transient and pseudo-transient approaches, the time step does not need to be constant. As the Courant number changes locally due to time, local velocity and cell size, an algorithm that tries to adapt the time step to the evolution of the flow can be used. Generally, an adaptive time step strategy requires the definition of a maximum allowed Courant number. The algorithm will try to adjust the time step by increasing or decreasing it in order to guarantee that the required CFL condition is met.

## Resources

2 – Courant, R.; Friedrichs, K.; Lewy, H. (September 1956) [1928], On the partial difference equations of mathematical physics, AEC Research and Development Report, NYO-7689, New York: AEC Computing and Applied Mathematics Centre – Courant Institute of Mathematical Sciences, pp. V + 76, archived from the original on October 23, 2008.: translated from the German by Phyllis Fox. This is an earlier version of the paper Courant, Friedrichs & Lewy 1967, circulated as a research report.

3 –  Courant, R.; Friedrichs, K.; Lewy, H. (March 1967) [1928], “On the partial difference equations of mathematical physics”, IBM Journal of Research and Development, 11 (2): 215–234, Bibcode:1967IBMJ…11..215C, doi:10.1147/rd.112.0215, MR 0213764, Zbl 0145.40402. A freely downloadable copy can be found here.

Try our free CFD software SimWorks, no registration required or contact us to find out more