Buoyant solvers: Add special handling for ghRef in the case g = (0 0 0)
This commit is contained in:
9
src/finiteVolume/cfdTools/general/include/gh.H
Normal file
9
src/finiteVolume/cfdTools/general/include/gh.H
Normal 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);
|
||||
Reference in New Issue
Block a user