Skip to main content

CourantNo

Description

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

Co=Δtτ \text{Co} = \Delta_t \, \tau

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

τ=12Vfacesϕi \tau = \frac{1}{2 V} \sum_{faces} \left| \phi_i \right|

Here, VV is the cell volume, ϕ\phi the face volumetric flux, and faces\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.

Operands

OperandTypeLocation
input--
output file--
output fieldvolScalarField$FOAM_CASE/<time>/<outField>

Usage

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

Co1
{
// 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:

PropertyDescriptionTypeRequiredDefault
typeType name: CourantNowordyes-
libsLibrary name: fieldFunctionObjectswordyes-
rhoName of density fieldwordnorho

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func CourantNo

Stored properties

Fields

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

Co

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

Co(<field>)

This name can be overridden by using the result entry.

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1606+