rhoPimpleFoam: Improved pressure and density limiting

This commit is contained in:
Henry Weller
2019-02-15 08:30:32 +00:00
parent fbb7b5dfaf
commit f9cb8e21d9
2 changed files with 12 additions and 12 deletions

View File

@ -85,6 +85,11 @@ else
}
}
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
}
// Thermodynamic density update
thermo.correctRho(psi*p - psip0);
@ -99,12 +104,7 @@ U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
}
else if (pimple.simpleRho())
if (pimple.simpleRho())
{
rho = thermo.rho();
}

View File

@ -99,6 +99,11 @@ else
}
}
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
}
// Thermodynamic density update
thermo.correctRho(psi*p - psip0);
@ -113,12 +118,7 @@ U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
}
else if (pimple.simpleRho())
if (pimple.simpleRho())
{
rho = thermo.rho();
}