Files
OpenFOAM-6/src/finiteVolume/cfdTools/general/include/gh.H
Will Bainbridge 268f1f612e hRef: Define height in opposite direction to gravity
The reference height is now defined in the direction of -g, whether as
previously it was defined in the direction cmptMag(g). This change makes
the behaviour consistent when the case is transformed. For a "typical"
case with g along one of the negative axes, this should make no
difference. None of the tutorials are affected.

Resolves bug report https://bugs.openfoam.org/view.php?id=2980
2018-06-14 10:49:15 +01:00

5 lines
203 B
C

Info<< "Calculating field g.h\n" << endl;
dimensionedScalar ghRef(- mag(g)*hRef);
volScalarField gh("gh", (g & mesh.C()) - ghRef);
surfaceScalarField ghf("ghf", (g & mesh.Cf()) - ghRef);