pow

Description

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

\[ f = s f_0^n + t \]

where

\( f \) = Output volScalarField
\( f_0 \) = Input volScalarField
\( n \) = Exponent
\( s \) = Scaling factor
\( t \) = Offset factor

Operands

Operand Type Location
input volScalarField $FOAM_CASE/<time>/<inpField>
output file - -
output field volScalarField $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>;

    // 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:

Property Description Type Required Default
type Type name: pow word yes -
libs Library name: fieldFunctionObjects word yes -
field Name of the operand field word yes -
checkDimensions Flag to check dimensions of the operand field bool no true
scale Scaling factor - s above scalar no 1.0
offset Offset factor - t above scalar no 0.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:

History

  • Introduced in version v2006