Post-processing

Function objects

OpenFOAM includes a collection of Function objects that offer users the opportunity to closely manage their computational analyses. These objects can be applied to manipulate the workflow process, and provide a mechanism to extract predicted field and derived quantities at run-time. Alternatively, the actions can be executed afterwards using the execFlowFunctionObjects utility.


The current range of features comprises of:


Using function objects

Function objects are defined by additional entries in the $FOAM_CASE/system/controlDict input dictionary. Each object is listed in a functions sub-dictionary entry, e.g. the following shows the input options applicable to `output' -type objects:

functions
{
    myFunctionObject    // user-defined name of function object entry
    {
        type                functionObjectType;
        functionObjectLibs  ("libMyFunctionObjectlib.so");
        region              defaultRegion;
        enabled             yes;
        timeStart           0;
        timeEnd             10;
        outputControl       outputTime;
        outputInterval      1;
        ...
    }
}

Where:

Property Description Required Default value
type type of function object yes
functionObjectLibs libraries containing object implementation yes
region name of region for multi-region cases no
enabled on/off switch no yes
timeStart start time no
timeEnd end time no
outputControl when to output: either 'outputTime' or 'timeStep' no timeStep
outputInterval steps between output when outputControl=timeStep no 1

The sub-dictionary name myFunctionObject is chosen by the user, and is typically used as the name of the output directory for any derived data. The type entry defines the type of function object properties that follow. Since the function objects are packaged into separate libraries, the user must tell the code where to find the function object implementation, identified using the libs entry.