rho?imple?Foam: Remove update of rho at beginning of pEqn to improve convergence

This commit is contained in:
Henry
2013-01-25 12:42:24 +00:00
parent bb4b63fd35
commit 7a86319cc0
4 changed files with 7 additions and 22 deletions

View File

@ -5,11 +5,10 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
if (pimple.nCorrPIMPLE() <= 1)
if (pimple.nCorrPISO() <= 1)
{
UEqn.clear();
}
@ -26,6 +25,8 @@ if (pimple.transonic())
)
);
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
surfaceScalarField phic
(
"phic",
@ -48,12 +49,9 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
// Relax the pressure equation to maintain diagonal dominance
pEqn.relax();
fvOptions.constrain(pEqn);
pEqn.solve();
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
@ -73,6 +71,8 @@ else
)
);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
HbyA -= (rAU - rAtU)*fvc::grad(p);
@ -91,7 +91,7 @@ else
fvOptions.constrain(pEqn);
pEqn.solve();
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{

View File

@ -1,9 +1,4 @@
{
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn().A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();

View File

@ -1,9 +1,4 @@
{
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
const volScalarField& psi = thermo.psi();
volVectorField HbyA("HbyA", U);

View File

@ -1,8 +1,3 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));