Skip to main content

pow

Description

The pow function object computes the power of an input volScalarField.

f=sf0n+t f = s f_0^n + t

where ff : Output volScalarField

f0f_0 : Input volScalarField

nn : Exponent

ss : Scaling factor

tt : Offset factor

Operands

OperandTypeLocation
inputvolScalarField$FOAM_CASE/<time>/<inpField>
output file--
output fieldvolScalarField$FOAM_CASE/<time>/<outField>

Usage

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

pow1
{
// Mandatory entries (unmodifiable)
type pow;
libs (fieldFunctionObjects);

// Mandatory (inherited) entry (runtime modifiable)
field <inpField>;
n 4;

// Optional entries (runtime modifiable)
checkDimensions false;
scale 1.0;
offset 0.0;

// Optional (inherited) entries
result <fieldResult>;
region region0;
enabled true;
pow true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval 1;
}

where the entries mean:

PropertyDescriptionTypeRequiredDefault
typeType name: powwordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldName of the operand fieldwordyes-
nPower exponentscalaryes
checkDimensionsFlag to check dimensions of the operand fieldboolnotrue
scaleScaling factor - s abovescalarno1.0
offsetOffset factor - t abovescalarno0.0

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func "pow(<inpField>)" -scale 1.0 -offset 0.0

Further information

Tutorial:

Source code:

API:

History: Introduced in version v2006