From 5bde9ad11781410a7c6640cc553ffad26d37ff34 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Fri, 6 Aug 2010 11:22:38 +0100
Subject: [PATCH] BUG: MRFZoneTemplates : absoluteFlux missing rho

---
 .../cfdTools/general/MRF/MRFZoneTemplates.C            | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
index 3a357601f33..2f1da5c6a0c 100644
--- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
+++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C
@@ -71,7 +71,7 @@ void Foam::MRFZone::relativeRhoFlux
 
             phi.boundaryField()[patchi][patchFacei] -=
                 rho.boundaryField()[patchi][patchFacei]
-               *(Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
+              * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
               & Sf.boundaryField()[patchi][patchFacei];
         }
     }
@@ -95,7 +95,7 @@ void Foam::MRFZone::absoluteRhoFlux
     forAll(internalFaces_, i)
     {
         label facei = internalFaces_[i];
-        phi[facei] += (Omega ^ (Cf[facei] - origin)) & Sf[facei];
+        phi[facei] += rho[facei]*(Omega ^ (Cf[facei] - origin)) & Sf[facei];
     }
 
     // Included patches
@@ -106,7 +106,8 @@ void Foam::MRFZone::absoluteRhoFlux
             label patchFacei = includedFaces_[patchi][i];
 
             phi.boundaryField()[patchi][patchFacei] +=
-                (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
+                rho.boundaryField()[patchi][patchFacei]
+              * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
               & Sf.boundaryField()[patchi][patchFacei];
         }
     }
@@ -119,7 +120,8 @@ void Foam::MRFZone::absoluteRhoFlux
             label patchFacei = excludedFaces_[patchi][i];
 
             phi.boundaryField()[patchi][patchFacei] +=
-                (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
+                rho.boundaryField()[patchi][patchFacei]
+              * (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
               & Sf.boundaryField()[patchi][patchFacei];
         }
     }
-- 
GitLab