Skip to main content

Q

Description

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

Q=12[(tr(u))2tr(uu)] 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

OperandTypeLocation
inputvolVectorField$FOAM_CASE/<time>/<inpField>
output file--
output fieldvolScalarField$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:

PropertyDescriptionTypeRequiredDefault
typeType name: Qwordyes-
libsLibrary name: fieldFunctionObjectswordyes-

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func Q

Stored properties

Fields

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:

API:

Related:

History: Introduced in version v1606+ ]