BUG: Updating rho at the end of the pEq for rhoPimpleDyMFoam and limiting is needed

This commit is contained in:
sergio
2017-06-27 15:47:53 -07:00
parent 50cc938677
commit e98214b0ad

View File

@ -1,4 +1,11 @@
rho = thermo.rho();
if (!pimple.SIMPLErho())
{
rho = thermo.rho();
}
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const volScalarField psip0(psi*p);
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
@ -92,9 +99,11 @@ K = 0.5*magSqr(U);
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
}
thermo.correctRho(psi*p - psip0, rhoMin, rhoMax) ;
rho = thermo.rho();
{
rhoUf = fvc::interpolate(rho*U);
surfaceVectorField n(mesh.Sf()/mesh.magSf());