From c995c32cd688472aa90df8783c5c297800e00527 Mon Sep 17 00:00:00 2001
From: Klaus Mosthaf <klmos@env.dtu.dk>
Date: Fri, 16 Nov 2012 14:39:36 +0000
Subject: [PATCH] Renamed heatConductivity() methods to thermalConductivity()
 according to the name commonly employed in the fluid systems. Added return
 function for thermalConductivity in the 2p2cnivolumevariables - this is
 required for some coupled models and does not add any new objects (addresses
 static function of fluidsystem)

Reviewed by Melanie

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9568 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 .../boxmodels/2p2cni/2p2cnivolumevariables.hh  |  8 ++++++++
 .../stokes2cni/stokes2cnifluxvariables.hh      | 18 +++++++++++-------
 .../stokes2cni/stokes2cnilocalresidual.hh      |  2 +-
 .../stokes2cni/stokes2cnivolumevariables.hh    | 18 +++++++++---------
 4 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh
index 467599769e..2913f51005 100644
--- a/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh
+++ b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh
@@ -84,6 +84,14 @@ public:
     Scalar heatCapacity() const
     { return heatCapacity_; };
 
+    /*!
+     * \brief Returns the thermal conductivity \f$\mathrm{[W/(m*K)]}\f$ of the fluid phase in
+     *        the sub-control volume.
+     */
+    Scalar thermalConductivity(const int phaseIdx) const
+    { FluidSystem::thermalConductivity(this->fluidState_, phaseIdx); };
+
+
 protected:
     // this method gets called by the parent class. since this method
     // is protected, we are friends with our parent..
diff --git a/dumux/freeflow/stokes2cni/stokes2cnifluxvariables.hh b/dumux/freeflow/stokes2cni/stokes2cnifluxvariables.hh
index b73d6cfeb7..504084da6d 100644
--- a/dumux/freeflow/stokes2cni/stokes2cnifluxvariables.hh
+++ b/dumux/freeflow/stokes2cni/stokes2cnifluxvariables.hh
@@ -74,11 +74,15 @@ public:
     }
 
     /*!
-     * \brief Returns the heat conductivity at the integration point.
+     * \brief Returns the thermal conductivity \f$\mathrm{[W/(m*K)]}\f$ at the integration point.
      */
+    const Scalar thermalConductivity() const
+    { return thermalConductivity_; }
+
+	DUNE_DEPRECATED_MSG("use thermalConductivity() instead")    
     const Scalar heatConductivity() const
-    { return heatConductivity_; }
-    
+    { return thermalConductivity_; }
+
     /*!
      * \brief Returns the temperature gradient at the integration point.
      */
@@ -96,7 +100,7 @@ protected:
                           const Element &element,
                           const ElementVolumeVariables &elemVolVars)
     {
-        heatConductivity_ = Scalar(0);
+        thermalConductivity_ = Scalar(0);
         temperatureGrad_ = Scalar(0);
 
         // calculate gradients and secondary variables at IPs
@@ -105,7 +109,7 @@ protected:
              idx < this->fvGeometry_.numVertices;
              idx++) // loop over vertices of the element
         {
-            heatConductivity_ += elemVolVars[idx].heatConductivity() *
+            thermalConductivity_ += elemVolVars[idx].thermalConductivity() *
                 this->face().shapeValue[idx];
 
             // the gradient of the temperature at the IP
@@ -114,11 +118,11 @@ protected:
                     this->face().grad[idx][dimIdx]*
                     elemVolVars[idx].temperature();
         }
-        Valgrind::CheckDefined(heatConductivity_);
+        Valgrind::CheckDefined(thermalConductivity_);
         Valgrind::CheckDefined(temperatureGrad_);
     }
 
-    Scalar heatConductivity_;
+    Scalar thermalConductivity_;
     DimVector temperatureGrad_;
 };
 
diff --git a/dumux/freeflow/stokes2cni/stokes2cnilocalresidual.hh b/dumux/freeflow/stokes2cni/stokes2cnilocalresidual.hh
index 01d4143eb8..5638a71c08 100644
--- a/dumux/freeflow/stokes2cni/stokes2cnilocalresidual.hh
+++ b/dumux/freeflow/stokes2cni/stokes2cnilocalresidual.hh
@@ -133,7 +133,7 @@ public:
             flux[energyEqIdx] -=
                 fluxVars.temperatureGrad()[dimIdx] *
                 fluxVars.face().normal[dimIdx] *
-                (fluxVars.heatConductivity() + fluxVars.eddyConductivity());
+                (fluxVars.thermalConductivity() + fluxVars.eddyConductivity());
     }
 };
 
diff --git a/dumux/freeflow/stokes2cni/stokes2cnivolumevariables.hh b/dumux/freeflow/stokes2cni/stokes2cnivolumevariables.hh
index 6e8be73ace..c85918d209 100644
--- a/dumux/freeflow/stokes2cni/stokes2cnivolumevariables.hh
+++ b/dumux/freeflow/stokes2cni/stokes2cnivolumevariables.hh
@@ -69,10 +69,6 @@ public:
                 const int scvIdx,
                 bool isOldSol)
     {
-        // the internal energies and the enthalpies
-        heatConductivity_ = 0.0257;
-        //TODO: value (Source: www.engineeringtoolbox.com/air-properties-d_156.html)
-
         // vertex update data for the mass balance
         ParentType::update(priVars,
                            problem,
@@ -97,11 +93,17 @@ public:
     { return this->fluidState_.enthalpy(phaseIdx); };
 
     /*!
-     * \brief Returns the heat conductivity of the fluid phase in
-     *        the sub-control volume.
+     * \brief Returns the thermal conductivity \f$\mathrm{[W/(m*K)]}\f$
+     *        of the fluid phase in the sub-control volume.
      */
+    Scalar thermalConductivity() const
+    { 
+    	return FluidSystem::thermalConductivity(this->fluidState_, phaseIdx); 
+    };
+
+	DUNE_DEPRECATED_MSG("use thermalConductivity() instead")
     Scalar heatConductivity() const
-    { return heatConductivity_; };
+    { return thermalConductivity(); };
 
 
 protected:
@@ -125,8 +127,6 @@ protected:
     {
         return FluidSystem::enthalpy(fluidState, paramCache, phaseIdx);
     }
-
-    Scalar heatConductivity_;
 };
 
 } // end namespace
-- 
GitLab