Skip to main content

momentum

Description

The momentum function object computes linear/angular momentum, reporting integral values and optionally writing the fields.

Operands

OperandTypeLocation
input--
output filedat$FOAM_CASE/postProcessing/<FO>/<time>/<file>
output field--

Usage

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

momentum1
{
// Mandatory entries (unmodifiable)
type momentum;
libs (fieldFunctionObjects);

// Optional entries (runtime modifiable)
regionType all;
writeMomentum yes;
writePosition yes;
writeVelocity yes;
p p;
U U;
rho rho;
rhoRef 1.0;

cylindrical true;
origin (0 0 0);
e1 (1 0 0);
e3 (0 0 1);

// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
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: momentumwordyes-
libsLibrary name: fieldFunctionObjectswordyes-
regionTypeSelection type: all/cellSet/cellZonewordnoall
writeMomentumWrite (linear, angular) momentum fieldsboolnono
writePositionWrite angular position component fieldsboolnono
writeVelocityWrite angular velocity fieldsboolnono
pPressure field namewordnop
UVelocity field namewordnoU
rhoDensity field namewordnorho
rhoRefReference density (incompressible)scalarno1.0
cylindricalUse cylindrical coordinatesboolnono
originOrigin for cylindrical coordinatesvectorconditional-
nameName of cellSet/cellZone if requiredwordconditional-

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Notes on entries

  • For incompressible cases, the value of rhoRef is used.
  • When specifying the cylindrical coordinate system, the rotation can be specified directly with e1/e2/e3 axes, or via a rotation sub-dictionary.

For example:

origin (0 0 0);
rotation
{
type cylindrical;
axis (0 0 1);
}

Stored properties

Reduced data

The following data are stored by the function object, and can be used by other function objects:

  • momentum_x : x-component of momentum
  • momentum_y : y-component of momentum
  • momentum_z : z-component of momentum
  • momentum_r : r-component of angular momentum
  • momentum_theta : theta-component of angular momentum
  • momentum_axis : axial-component of angular momentum

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1812