Made ddtPhiCorr optional in moving-mesh solvers.

Controlled via the "ddtPhiCorr" switch in the PISO sub-dict,
defaults to false.
This commit is contained in:
henry
2008-05-09 12:48:45 +01:00
parent 337202a4b3
commit 6fc7b06b19
3 changed files with 21 additions and 8 deletions

View File

@ -75,6 +75,9 @@ int main(int argc, char *argv[])
# include "correctPhi.H"
}
// Keep the absolute fluxes for use in ddtPhiCorr
surfaceScalarField phiAbs("phiAbs", phi);
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
@ -95,7 +98,11 @@ int main(int argc, char *argv[])
U = rAU*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf());
//+ fvc::ddtPhiCorr(rAU, U, phi);
if (ddtPhiCorr)
{
phi += fvc::ddtPhiCorr(rAU, U, phiAbs);
}
adjustPhi(phi, U, p);
@ -116,7 +123,7 @@ int main(int argc, char *argv[])
{
pEqn.solve(mesh.solver(p.name()));
}
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();