Skip to main content

ddt2

Description

The ddt2 function object computes the magnitude or magnitude squared of the Eulerian time derivative of an input volume field for time-variant simulations (not appropriate to steady-state simulations).

The result can be further used for determining e.g. variance or RMS values.

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 ddt2 function object by using functions sub-dictionary in system/controlDict file:

ddt21
{
// Mandatory entries (unmodifiable)
type ddt2;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
fields (<field1> <field2> ... <fieldN>);

// Optional entries (unmodifiable)
mag false;

// Optional entries (runtime modifiable)
result d@@dt2;

// 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: ddt2wordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldsNames of the operand fieldswordListyes-
magCompute 'mag' instead of 'magSqr'boolnofalse
resultName of resultswordnomagSqr(ddt2(@@))

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Notes on entries

A list of fields can contain exact names or regular expressions. The token \@\@ in the result name is replaced by the name of the source field. In the special case of a single source field (specified as a non-regex), the \@\@ token checking is suppressed.

The function object will skip over fields that appear to have already been processed (ie, their names are similar to the output names).

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1612+