The CourantNo function object computes the field of Courant number, i.e. Co, for time-variant simulations.

\[ \text{Co} = \Delta_t \, \tau \]

where \(\Delta_t\) is the time-step size, and \(\tau\) is a characteristic time scale based on the local cell flow scales:

\[ \tau = \frac{1}{2 V} \sum_{faces} \left| \phi_i \right| \]

Here, \(V\) is the cell volume, \(\phi\) the face volumetric flux, and \(\sum_{faces}\) summation is over all cell faces.

The Courant number provides

  • a measure of the rate at which information is transported under the influence of a flux field,
  • a limiting factor for the performance of numerical schemes.


Operand Type Location
input - -
output file - -
output field volScalarField $FOAM_CASE/<time>/<outField>


Example of the CourantNo function object by using functions sub-dictionary in system/controlDict file:

    // Mandatory entries (unmodifiable)
    type            CourantNo;
    libs            (fieldFunctionObjects);

    // Optional entries (runtime modifiable)
    rho             rho;

    // Optional (inherited) entries
    field           <phi>;
    result          <fieldResult>;
    region          region0;
    enabled         true;
    log             true;
    timeStart       0;
    timeEnd         1000;
    executeControl  timeStep;
    executeInterval 1;
    writeControl    timeStep;
    writeInterval   1;

where the entries mean:

Property Description Type Required Default
type Type name: CourantNo word yes -
libs Library name: fieldFunctionObjects word yes -
rho Name of density field word no rho

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func CourantNo

Stored properties

The Courant number is stored on the mesh database, using the default name


If the field entry is set to a value other than phi, the default name becomes


This name can be overridden by using the result entry.

Further information


Source code:


  • Introduced in version v1606+