reactingParcelFoam: Updated density handling for consistency with rhoPimpleFoam
This commit is contained in:
@ -64,7 +64,9 @@ while (pimple.correctNonOrthogonal())
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
bool limitedp = pressureControl.limit(p);
|
||||
|
||||
if (limitedp)
|
||||
{
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
@ -72,6 +74,11 @@ if (pressureControl.limit(p))
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
if (limitedp)
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -94,7 +94,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (solvePrimaryRegion)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
if (pimple.firstPimpleIter() && !pimple.simpleRho())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- PIMPLE loop
|
||||
while (pimple.loop())
|
||||
@ -114,10 +117,10 @@ int main(int argc, char *argv[])
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
||||
Reference in New Issue
Block a user