Post-processing

Function objects

OpenFOAM includes a collection of FunctionObjects 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;
        libs                (myFunctionObjectLib);
        region              defaultRegion;
        enabled             yes;
        timeStart           0;
        timeEnd             10;
        evaluateControl     timeStep;
        evaluateInterval    1;
        writeControl        outputTime;
        writeInterval       1;
        ...
    }
}

Where:

Property Description Required Default value
type type of function object yes
libs 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
evaluateControl when to evaluate: either 'writeTime' or 'timeStep' no timeStep
evaluateInterval steps between evaluation when evaluateControl=timeStep no 1
writeControl when to output: either 'writeTime' or 'timeStep' no timeStep
writeInterval steps between output when writeControl=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.