Skip to main content

limitFields

Description

The limitFields function object limits input fields to user-specified min and max bounds.

For non-scalar types of input fields, the user limit is used to create a scaling factor using the field magnitudes.

Operands

OperandTypeLocation
inputvol<Type>Field$FOAM_CASE/<time>/<inpField>
output file--
output fieldvol<Type>Field$FOAM_CASE/<time>/<outField>

where <Type>=Scalar/Vector/SphericalTensor/SymmTensor/Tensor.

Usage

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

limitFields1
{
// Mandatory entries (unmodifiable)
type limitFields;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
fields (U);
limit max;
max 100;

// Optional (inherited) entries
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: limitFieldswordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldsList of fields to processwordListyes-
limitBound to limit - see belowwordyes-
minMin limit valuescalarconditional-
maxMax limit valuescalarconditional-

Options for the limit entry:

  • min : Specify a minimum value
  • max : Specify a maximum value
  • both : Specify a minimum value and a maximum value

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func limitFields

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1912