From 498ff5a9cde416f6f837ae209487994f97c9d397 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Wed, 18 Dec 2013 22:55:57 +0000
Subject: [PATCH] compressibleInterDyMFoam: Corrected handling of the relative
 flux

---
 .../compressibleInterFoam/compressibleInterDyMFoam/pEqn.H | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
index a014a5ab4ed..e7fd7241db9 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
@@ -32,6 +32,9 @@
         )/(mesh.magSf().boundaryField()*rAUf.boundaryField())
     );
 
+    // Make the fluxes relative to the mesh motion
+    fvc::makeRelative(phiHbyA, U);
+
     tmp<fvScalarMatrix> p_rghEqnComp1;
     tmp<fvScalarMatrix> p_rghEqnComp2;
 
@@ -114,12 +117,9 @@
     {
         Uf = fvc::interpolate(U);
         surfaceVectorField n(mesh.Sf()/mesh.magSf());
-        Uf += n*(phi/mesh.magSf() - (n & Uf));
+        Uf += n*(fvc::absolute(phi, U)/mesh.magSf() - (n & Uf));
     }
 
-    // Make the fluxes relative to the mesh motion
-    fvc::makeRelative(phi, U);
-
     // Update densities from change in p_rgh
     rho1 += psi1*(p_rgh - p_rgh_0);
     rho2 += psi2*(p_rgh - p_rgh_0);
-- 
GitLab