Buoyant solvers: Add special handling for ghRef in the case g = (0 0 0)

This commit is contained in:
Henry
2015-03-19 15:26:06 +00:00
parent f7914a858e
commit 13d4f5c386
15 changed files with 24 additions and 71 deletions

View File

@ -0,0 +1,9 @@
Info<< "Calculating field g.h\n" << endl;
dimensionedScalar ghRef
(
mag(g.value()) > SMALL
? g & (cmptMag(g.value())/mag(g.value()))*hRef
: dimensionedScalar("ghRef", g.dimensions()*dimLength, 0)
);
volScalarField gh("gh", (g & mesh.C()) - ghRef);
surfaceScalarField ghf("ghf", (g & mesh.Cf()) - ghRef);