From 50fb2477bd6179dce13c2058632f156074876653 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 6 Dec 2021 23:12:19 +0000 Subject: [PATCH] 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. --- .../solvers/multiphase/compressibleInterFoam/pEqn.H | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 6440b73c10..e26d291792 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -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();