ENH: momentum field function (issue #1105)

Calculates linear/angular momentum, reporting integral values
    and optionally writing the fields.

Example
    momentum1
    {
        type        momentum;
        libs        ("libfieldFunctionObjects.so");
        ...
        writeMomentum   yes;
        writeVelocity   no;

        cylindrical     true;
        origin  (0 0 0);
        e1      (1 0 0);
        e3      (0 0 1);
    }
This commit is contained in:
Mark Olesen
2018-12-04 15:16:03 +01:00
parent d842118994
commit 077910628e
5 changed files with 874 additions and 0 deletions

View File

@ -48,6 +48,7 @@ runTimeModifiable true;
functions
{
#include "coordinateTransform"
#include "momentum"
}

View File

@ -0,0 +1,33 @@
// -*- C++ -*-
// Calculate momentum fields
momentum
{
type momentum;
libs ("libfieldFunctionObjects.so");
log true;
executeInterval 10;
writeControl writeTime;
// writeToFile true;
writeMomentum true;
writePosition true;
writeVelocity true;
// Cells to select (all/cellSet/cellZone)
regionType all;
// name c0;
cylindrical true;
origin (0 0 0);
rotation
{
type cylindrical;
axis (1 0 0); //< local Z
}
}
// ************************************************************************* //