Function objects

Table of Contents

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:

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

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

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

Further information