Skip to main content

volFieldValue

Description

The volFieldValue function object provides options to manipulate volume field data into derived forms, e.g. to report summations, averages and extrema.

Operations:

  • none : no operation
  • sum : summation
  • sumMag : sum of magnitude
  • average: average
  • weightedAverage: weighted average
  • volAverage: volume average
  • weightedVolAverage: weighted volume average
  • volIntegrate: volume integral
  • min: minimum
  • max: maximum
  • CoV: coefficient of variation

Usage

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

volFieldValue1
{
// Mandatory entries (unmodifiable)
type volFieldValue;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
fields (<field1> <field2> ... <fieldN>);
operation <operationType>;
regionType <volRegion>;

// Optional entries (runtime modifiable)
postOperation none;
weightField alpha1;

// Optional (inherited) entries
writeFields false;
scalingFactor 1.0;
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: surfaceFieldValuewordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldsNames of operand fieldswordListyes-
regionTypeFace regionType: see belowwordyes-
nameName for regionTypewordyes-
operationOperation type: see belowwordyes-
postOperationPost-operation type: see belowwordnonone
weightFieldName of field to apply weightingwordnonone

The inherited entries are elaborated in:

Options for the regionType entry:

cellZone | requires a 'name' entry to specify the cellZone
all | all cells

Options for the operation entry:

none | No operation
min | Minimum
max | Maximum
sum | Sum
sumMag | Sum of component magnitudes
average | Ensemble average
volAverage | Volume weighted average
volIntegrate | Volume integral
CoV | Coefficient of variation: standard deviation/mean
weightedSum | Weighted sum
weightedAverage | Weighted average
weightedVolAverage | Weighted volume average
weightedVolIntegrate | Weighted volume integral

Options for the postOperation entry:

none | No additional operation after calculation
mag | Component-wise `mag()` after normal operation
sqrt | Component-wise `sqrt()` after normal operation

Usage by the postProcess utility is not available.

Stored properties

Reduced data

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

  • <operation-type>(<region-name>, <field-name>) : result

Further information

Tutorial:

Source code:

API:

Related:

History: Introduced in version 1.7.0