pressureControl: Added p.correctBoundaryConditions() after the pressure limiting
to ensure boundary consistency.
This commit is contained in:
@ -85,14 +85,16 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
bool limitedp = pressureControl.limit(p);
|
||||
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
if (limitedp)
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
|
||||
@ -99,14 +99,16 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
bool limitedp = pressureControl.limit(p);
|
||||
|
||||
// Thermodynamic density update
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
|
||||
if (limitedp)
|
||||
{
|
||||
rho = thermo.rho();
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
|
||||
bool pLimited = pressureControl.limit(p);
|
||||
pressureControl.limit(p);
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
@ -95,10 +95,6 @@ if (closedVolume)
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
|
||||
if (pLimited || closedVolume)
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ U = HbyA - rAtU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
|
||||
bool pLimited = pressureControl.limit(p);
|
||||
pressureControl.limit(p);
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
@ -108,10 +108,6 @@ if (closedVolume)
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
|
||||
if (pLimited || closedVolume)
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
@ -87,6 +87,7 @@
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
@ -93,10 +93,7 @@ constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
}
|
||||
pressureControl.limit(p);
|
||||
|
||||
// Thermodynamic density update
|
||||
if (!mesh.steady())
|
||||
|
||||
@ -66,7 +66,6 @@ p = p_rgh + rho*gh;
|
||||
|
||||
if (pressureControl.limit(p))
|
||||
{
|
||||
p.correctBoundaryConditions();
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -258,6 +258,8 @@ bool Foam::pressureControl::limit(volScalarField& p) const
|
||||
}
|
||||
}
|
||||
|
||||
p.correctBoundaryConditions();
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user