From 24a340ef7543c84100457f9f1f0923d44ee7771b Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Mon, 20 Apr 2015 16:50:02 +0100
Subject: [PATCH] applications/solvers/multiphase: for MRF make phiHbyA
 relative BEFORE adjustPhi Resolves bug-report
 http://openfoam.org/mantisbt/view.php?id=1665

---
 applications/solvers/multiphase/driftFluxFoam/pEqn.H           | 2 +-
 applications/solvers/multiphase/interFoam/pEqn.H               | 2 +-
 .../solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H         | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/applications/solvers/multiphase/driftFluxFoam/pEqn.H b/applications/solvers/multiphase/driftFluxFoam/pEqn.H
index d32683bc213..494ee5590cf 100644
--- a/applications/solvers/multiphase/driftFluxFoam/pEqn.H
+++ b/applications/solvers/multiphase/driftFluxFoam/pEqn.H
@@ -11,8 +11,8 @@
         (fvc::interpolate(HbyA) & mesh.Sf())
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
-    adjustPhi(phiHbyA, U, p_rgh);
     fvOptions.makeRelative(phiHbyA);
+    adjustPhi(phiHbyA, U, p_rgh);
 
     surfaceScalarField phig
     (
diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H
index 81a0391d6de..0343d111df8 100644
--- a/applications/solvers/multiphase/interFoam/pEqn.H
+++ b/applications/solvers/multiphase/interFoam/pEqn.H
@@ -11,8 +11,8 @@
         (fvc::interpolate(HbyA) & mesh.Sf())
       + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
     );
-    adjustPhi(phiHbyA, U, p_rgh);
     fvOptions.makeRelative(phiHbyA);
+    adjustPhi(phiHbyA, U, p_rgh);
 
     surfaceScalarField phig
     (
diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
index dbdf1ac66cf..f7de6089b55 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
@@ -16,9 +16,8 @@ surfaceScalarField phiHbyA
   + rAUf*fvc::ddtCorr(U, phi)
 );
 
-adjustPhi(phiHbyA, U, p_gh);
-
 fvOptions.makeRelative(phiHbyA);
+adjustPhi(phiHbyA, U, p_gh);
 
 // Update the fixedFluxPressure BCs to ensure flux consistency
 setSnGrad<fixedFluxPressureFvPatchScalarField>
-- 
GitLab