ENH: Adding momemtum predictor to chtSimpleFoam

This commit is contained in:
sergio
2017-11-06 09:03:42 -08:00
parent 0eeffc318b
commit 454e609fbc
2 changed files with 17 additions and 11 deletions

View File

@ -16,17 +16,20 @@
fvOptions.constrain(UEqn);
solve
(
UEqn
==
fvc::reconstruct
if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
(
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
fvOptions.correct(U);
fvOptions.correct(U);
}

View File

@ -2,3 +2,6 @@
const int nNonOrthCorr =
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
const bool momentumPredictor =
simple.lookupOrDefault("momentumPredictor", true);