The open source CFD toolbox
Function objects

Function objects are run-time selectable options that generate additional output both during and after the calculation. These vary from providing additional logging to the screen, to generating text, image and field files.

Many workflows can be configured to generate the desired post-processing data during the run. This eliminates the need to store all run-time generated data, hence saving considerable resources. Furthermore, function objects are readily applied to batch-driven processes, improving reliability by standardising the sequence of operations and reducing the amount of manual interaction.

# Usage

Function objects are specified in the main controlDict file in an optional functions dictionary:

functions
{
<user-defined name>
{
type        <objectType>;
libs        (<list library file names>);
...
}
}


Each object is defined in its own sub-dictionary, under a user-defined name, and evaluated either:

• at run-time,
• via the postProcess utility, or
• the -postProcess option, available to solver applications.

When applied at run-time, the objects are controlled according to the two options:

• evaluateControl: when the object is updated, and
• writeControl: when the object output is written.

These take the same type of values as the writeControl entry in the controlDict, with some additions:

• timeStep: regular time step intervals
• writeTime: calculation write times
• runTime/adjustableRunTime:
• clockTime:
• cpuTime:
• onEnd: on completion of the case.

Data derived from function objects are written to the case postProcessing directory, typically in a subdirectory with the same name as the object, e.g.

\$FOAM_CASE/postProcessing/<functionObjectName>/<time>/<data>


# Options

Function objects are grouped into libraries that perform similar operations or operate on similar object types:

Field

Forces

Graphics

Lagrangian

Solvers

Utilities