The momentum
function object computes linear/angular momentum, reporting integral values and optionally writing the fields.
Operand | Type | Location |
---|---|---|
input | - | - |
output file | dat | $FOAM_CASE/postProcessing/<FO>/<time>/<file> |
output field | - | - |
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:
Property | Description | Type | Required | Default |
---|---|---|---|---|
type | Type name: momentum | word | yes | - |
libs | Library name: fieldFunctionObjects | word | yes | - |
regionType | Selection type: all/cellSet/cellZone | word | no | all |
writeMomentum | Write (linear, angular) momentum fields | bool | no | no |
writePosition | Write angular position component fields | bool | no | no |
writeVelocity | Write angular velocity fields | bool | no | no |
p | Pressure field name | word | no | p |
U | Velocity field name | word | no | U |
rho | Density field name | word | no | rho |
rhoRef | Reference density (incompressible) | scalar | no | 1.0 |
cylindrical | Use cylindrical coordinates | bool | no | no |
origin | Origin for cylindrical coordinates | vector | conditional | - |
name | Name of cellSet/cellZone if required | word | conditional | - |
The inherited entries are elaborated in:
Usage by the postProcess
utility is not available.
rhoRef
is used.rotation
sub-dictionary.For example:
origin (0 0 0); rotation { type cylindrical; axis (0 0 1); }
Tutorial:
Source code:
History