Skip to main content

valueAverage

Description

The valueAverage function object computes the ensemble- or time-based singular-value average values, with optional windowing, from the output of function objects that generate non-field type values, e.g. Cd of forceCoeffs or momentum_x in momentum function objects.

Operands

OperandTypeLocation
input--
output filedat$FOAM_CASE/postProcessing/<FO>/<time>/<file>
output field--

Usage

Example of the valueAverage function object by using functions sub-dictionary in system/controlDict file:

valueAverage1
{
// Mandatory entries (unmodifiable)
type valueAverage;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
functionObject <FO>; // forceCoeffs1;
fields (<field1> ... <fieldN>); // (Cm Cd Cl);

// Optional entries (runtime modifiable)
resetOnRestart false;
window 0.5;

// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
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: valueAveragewordyes-
libsLibrary name: fieldFunctionObjectswordyes-
functionObjectName of function object to retrieve datawordyes-
fieldsNames of operand fieldswordListyes-
resetOnRestartReset the averaging on restartboolnofalse
windowAveraging windowscalarnoVGREAT

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Sample output

Text reporting:

  • Average value, e.g. using drag coefficient, Cd, retrieved from a forceCoeffs function object:
CdMean: 0.3

Stored properties

Reduced data

The following data are stored by the function object, and can be used by other function objects:

  • <field-name>Mean : average value

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1612+