Solvers based on p_rgh: Added support for optional hRef

Allows the specification of a reference height, for example the height
of the free-surface in a VoF simulation, which reduces the range of p_rgh.

hRef is a uniformDimensionedScalarField specified via the constant/hRef
file, equivalent to the way in which g is specified, so that it can be
looked-up from the database.  For example see the constant/hRef file in
the DTCHull LTSInterFoam and interDyMFoam cases.
This commit is contained in:
Henry
2015-03-17 17:15:11 +00:00
parent e68c5f666b
commit e588d61879
31 changed files with 161 additions and 51 deletions

View File

@ -67,9 +67,14 @@
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
dimensionedScalar ghRef(g & (cmptMag(g.value())/mag(g.value()))*hRef);
volScalarField gh("gh", (g & mesh.C()) - ghRef);
surfaceScalarField ghf("ghf", (g & mesh.Cf()) - ghRef);
volScalarField p
(