From 743dec3f73fad489d1d6d195222bd719dcf8576d Mon Sep 17 00:00:00 2001
From: sergio <sergio>
Date: Tue, 3 Jul 2012 14:41:38 +0100
Subject: [PATCH] BUG: Fixing soliWallHeatFlux working with the new solid
 thermo and fixing directionalSolidThermo in temperatureCoupledBase.C as mean
 value of the vector for heat conductivity

---
 .../wall/solidWallHeatFlux/createFields.H     |  4 +--
 .../solidWallHeatFlux/solidWallHeatFlux.C     |  2 +-
 .../temperatureCoupledBase.C                  | 31 ++++++++++---------
 3 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/applications/utilities/postProcessing/wall/solidWallHeatFlux/createFields.H b/applications/utilities/postProcessing/wall/solidWallHeatFlux/createFields.H
index c845710399b..712dd510508 100644
--- a/applications/utilities/postProcessing/wall/solidWallHeatFlux/createFields.H
+++ b/applications/utilities/postProcessing/wall/solidWallHeatFlux/createFields.H
@@ -1,6 +1,6 @@
-autoPtr<basicSolidThermo> thermo
+autoPtr<solidThermo> thermo
 (
-    basicSolidThermo::New(mesh)
+    solidThermo::New(mesh)
 );
 
 volScalarField& T = thermo->T();
diff --git a/applications/utilities/postProcessing/wall/solidWallHeatFlux/solidWallHeatFlux.C b/applications/utilities/postProcessing/wall/solidWallHeatFlux/solidWallHeatFlux.C
index 281107856e3..2ac074a5baf 100644
--- a/applications/utilities/postProcessing/wall/solidWallHeatFlux/solidWallHeatFlux.C
+++ b/applications/utilities/postProcessing/wall/solidWallHeatFlux/solidWallHeatFlux.C
@@ -33,7 +33,7 @@ Description
 
 #include "fvCFD.H"
 #include "wallFvPatch.H"
-#include "basicSolidThermo.H"
+#include "solidThermo.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
index 2cae3dee6d7..3579d15b6b8 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
+++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
@@ -98,8 +98,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
                     "turbulenceModel"
                 );
 
-            return
-                model.kappaEff(patch_.index());
+            return model.kappaEff(patch_.index());
         }
         break;
 
@@ -116,23 +115,25 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
 
         case DIRECTIONALSOLIDTHERMO:
         {
-            const vectorField n(patch_.nf());
-
             const solidThermo& thermo =
                 mesh.lookupObject<solidThermo>
                 (
-                    "solidThermophysicalProperties"
+                    "thermophysicalProperties"
                 );
-//          note  SAF : Temporarily!
-            //return n & thermo.Kappa(patch_.index()) & n;
-              /*
-              scalarField isoK =
-                    (thermo.Kappa(patch_.index())[0] +
-                     thermo.Kappa(patch_.index())[1] +
-                     thermo.Kappa(patch_.index())[2]) / 3.0;
-               */
-
-              return scalarField(0);
+
+            tmp<scalarField> tmeanKappa(Tp);
+            scalarField& meanKappa = tmeanKappa();
+            forAll(meanKappa, i)
+            {
+                meanKappa[i] =
+                (
+                    thermo.Kappa(patch_.index())()[i].x()
+                  + thermo.Kappa(patch_.index())()[i].y()
+                  + thermo.Kappa(patch_.index())()[i].z()
+                )/3.0;
+            }
+
+            return meanKappa;
         }
         break;
 
-- 
GitLab