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
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:
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:
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
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.
Tutorial:
Source code:
History