Q

Description

The Q function object computes the second invariant of the velocity gradient tensor [ \(s^{-2}\)]:

\[ Q = \frac{1}{2}\left[\left(\mathrm{tr} \left(\grad \u\right)\right)^2 - \mathrm{tr} \left(\grad \u \dprod \grad \u\right)\right] \]

Q iso-surfaces are good indicators of turbulent flow structures.

Operands

Operand Type Location
input volVectorField $FOAM_CASE/<time>/<inpField>
output file - -
output field volScalarField $FOAM_CASE/<time>/<outField>

Usage

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

Q1
{
    // Mandatory entries (unmodifiable)
    type            Q;
    libs            (fieldFunctionObjects);

    // Optional (inherited) entries
    field           <inpField>;
    result          <fieldResult>;
    region          region0;
    enabled         true;
    log             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: Q word yes -
libs Library name: fieldFunctionObjects word yes -

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func Q

Stored properties

The Q field is stored on the mesh database, using the default name

Q

If the field entry is set to a value other than U, the default name becomes

Q(<field>)

This can be overridden using the result entry.

Sample output

Further information

Tutorial:

Source code:

Related:

History

  • Introduced in version v1606+