Description🔗
The continuityError function object computes local, global and cumulative
continuity errors for a flux field.
Local continuity error, \(\epsilon_\text{local}\):
\[\epsilon_\text{local} = \Delta_t \langle |x| \rangle\]Global continuity error, \(\epsilon_\text{global}\):
\[\epsilon_\text{global} = \Delta_t \langle |x| \rangle\]Cumulative continuity, \(\epsilon_\text{cum}\):
\[\epsilon_\text{cum} += \epsilon_\text{global}\]- where
- \(\Delta_t\)
- Time-step size
- \(<.>\)
- Cell-volume weighted average operator
- \(x\)
- \[\nabla \cdot \phi\]
- \(\phi\)
- Flux field
Operands🔗
| Operand | Type | Location |
|---|---|---|
| input | - | - |
| output file | dat | $FOAM_CASE/postProcessing/<FO>/<time>/<file> |
| output field | - | - |
Usage🔗
Example of the continuityError function object
by using functions sub-dictionary in system/controlDict file:
continuityError1
{
// Mandatory entries (unmodifiable)
type continuityError;
libs (fieldFunctionObjects);
// Optional entries (runtime modifiable)
phi phi;
// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
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: continuityError | word | yes | - |
| libs | Library name: fieldFunctionObjects | word | yes | - |
| phi | Name of flux field | word | no | phi |
The inherited entries are elaborated in:
Example by using the postProcess -func utility:
postProcess -func "continuityError(<field1>, <field2>, ..., <fieldN>)"
Stored properties🔗
Reduced data🔗
The following data are stored by the function object, and can be used by other function objects:
-
local: local continuity error -
global: global continuity error -
cumulative: cumulative continuity error
Further information🔗
Tutorial:
Source code:
API:
History:
- Introduced in version v1906
