compressibleInterFoam::pEqn: Limit pressure after calculating flux and dilatation rate

to avoid spurious phase-change from an inconsistency between the flux and the
dilatation rate that the pressure limiting might generate.
This commit is contained in:
Henry Weller
2021-12-06 23:12:19 +00:00
parent a0ac78c129
commit 50fb2477bd

View File

@ -129,10 +129,6 @@
if (pimple.finalNonOrthogonalIter())
{
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
p_rgh.correctBoundaryConditions();
dgdt =
(
alpha1*(p_rghEqnComp2 & p_rgh)
@ -141,6 +137,10 @@
phi = phiHbyA + p_rghEqnIncomp.flux();
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
p_rgh.correctBoundaryConditions();
U = HbyA
+ rAU()*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
U.correctBoundaryConditions();