Skip to main content

derivedFields

Description

The derivedFields function object computes computes two predefined derived fields, i.e. rhoU, and pTotal, where the defined fields are hard-coded as follows:

rhoUrhoU : ρu\rho \u

pTotalpTotal : p+0.5ρu2p + 0.5 \rho \mag{\u}^2

Operands

OperandTypeLocation
inputvol<Type>Field$FOAM_CASE/<time>/<inpField>
output file--
output fieldvol<Type>Field$FOAM_CASE/<time>/<outField>

where <Type>=Scalar/Vector/SphericalTensor/SymmTensor/Tensor.

Usage

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

derivedFields1
{
// Mandatory entries (unmodifiable)
type derivedFields;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
derived (rhoU pTotal);

// Optional entries (runtime modifiable)
rhoRef 1.0;

// Optional (inherited) entries
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: derivedFieldswordyes-
libsLibrary name: fieldFunctionObjectswordyes-
derivedNames of operand fields (rhoU|pTotal)wordyes-
rhoRefReference density for incompressible flowsscalarno1.0

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1906