From 5521dfece0551a19f382eba5c457dfe203d746fb Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Thu, 12 Sep 2013 17:48:08 +0100
Subject: [PATCH] multiphase: Improve the construction of rhoPhiSum

---
 .../compressibleInterFoam/alphaEqnsSubCycle.H        | 12 +++++++++++-
 .../interFoam/LTSInterFoam/alphaEqnSubCycle.H        | 12 +++++++++++-
 .../interFoam/interMixingFoam/alphaEqnsSubCycle.H    | 12 +++++++++++-
 .../twoLiquidMixingFoam/alphaEqnSubCycle.H           | 12 +++++++++++-
 4 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H
index accc3197ad9..5a74d1c456a 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/alphaEqnsSubCycle.H
@@ -9,7 +9,17 @@
     if (nAlphaSubCycles > 1)
     {
         dimensionedScalar totalDeltaT = runTime.deltaT();
-        surfaceScalarField rhoPhiSum(0.0*rhoPhi);
+        surfaceScalarField rhoPhiSum
+        (
+            IOobject
+            (
+                "rhoPhiSum",
+                runTime.timeName(),
+                mesh
+            ),
+            mesh,
+            dimensionedScalar("0", dimDensity, 0)
+        );
 
         for
         (
diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
index 428876fd229..ac40a9bc9e1 100644
--- a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
@@ -3,7 +3,17 @@
 if (nAlphaSubCycles > 1)
 {
     dimensionedScalar totalDeltaT = runTime.deltaT();
-    surfaceScalarField rhoPhiSum(0.0*rhoPhi);
+    surfaceScalarField rhoPhiSum
+    (
+        IOobject
+        (
+            "rhoPhiSum",
+            runTime.timeName(),
+            mesh
+        ),
+        mesh,
+        dimensionedScalar("0", dimDensity, 0)
+    );
 
     for
     (
diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H
index 9e3f4f6bd47..9682b30212c 100644
--- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H
+++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H
@@ -2,8 +2,18 @@
 
 if (nAlphaSubCycles > 1)
 {
-    surfaceScalarField rhoPhiSum(0.0*rhoPhi);
     dimensionedScalar totalDeltaT = runTime.deltaT();
+    surfaceScalarField rhoPhiSum
+    (
+        IOobject
+        (
+            "rhoPhiSum",
+            runTime.timeName(),
+            mesh
+        ),
+        mesh,
+        dimensionedScalar("0", dimDensity, 0)
+    );
 
     for
     (
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
index 428876fd229..ac40a9bc9e1 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
@@ -3,7 +3,17 @@
 if (nAlphaSubCycles > 1)
 {
     dimensionedScalar totalDeltaT = runTime.deltaT();
-    surfaceScalarField rhoPhiSum(0.0*rhoPhi);
+    surfaceScalarField rhoPhiSum
+    (
+        IOobject
+        (
+            "rhoPhiSum",
+            runTime.timeName(),
+            mesh
+        ),
+        mesh,
+        dimensionedScalar("0", dimDensity, 0)
+    );
 
     for
     (
-- 
GitLab