From d3d32d3231342b7ff65aae5275f53d5f58cae84f Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Mon, 13 Jul 2015 08:46:10 +0000
Subject: [PATCH] [material] - enthalpy function in the h2oairfs now use the
 given phaseIdx and not automatically the nPhaseIdx, this could affect
 local-non-equilibrium results - fixed one description and one unit given

reviewed by nicolas


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15048 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/material/components/air.hh                      | 2 +-
 dumux/material/fluidstates/compositionalfluidstate.hh | 4 ++--
 dumux/material/fluidsystems/h2oairfluidsystem.hh      | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dumux/material/components/air.hh b/dumux/material/components/air.hh
index 54a0149c9b..57e1b05655 100644
--- a/dumux/material/components/air.hh
+++ b/dumux/material/components/air.hh
@@ -167,7 +167,7 @@ public:
     };
 
     /*!
-     * \brief Specific enthalpy of liquid water \f$\mathrm{[J/kg]}\f$
+     * \brief Specific enthalpy of air \f$\mathrm{[J/kg]}\f$
      *        with 273.15 K as basis.
      * See:
      * W. Kays, M. Crawford, B. Weigand
diff --git a/dumux/material/fluidstates/compositionalfluidstate.hh b/dumux/material/fluidstates/compositionalfluidstate.hh
index 03ff8e62d1..101e160309 100644
--- a/dumux/material/fluidstates/compositionalfluidstate.hh
+++ b/dumux/material/fluidstates/compositionalfluidstate.hh
@@ -296,7 +296,7 @@ public:
     { density_[phaseIdx] = value; }
 
     /*!
-     * \brief Set the specific enthalpy of a phase [J/m^3]
+     * \brief Set the specific enthalpy of a phase [J/kg]
      */
     void setEnthalpy(int phaseIdx, Scalar value)
     { enthalpy_[phaseIdx] = value; }
@@ -327,7 +327,7 @@ public:
             Valgrind::CheckDefined(pressure_[phaseIdx]);
             Valgrind::CheckDefined(saturation_[phaseIdx]);
             Valgrind::CheckDefined(density_[phaseIdx]);
-            //Valgrind::CheckDefined(enthalpy_[phaseIdx]);
+            Valgrind::CheckDefined(enthalpy_[phaseIdx]);
             Valgrind::CheckDefined(viscosity_[phaseIdx]);
         }
 
diff --git a/dumux/material/fluidsystems/h2oairfluidsystem.hh b/dumux/material/fluidsystems/h2oairfluidsystem.hh
index fad1822939..7a231c40da 100644
--- a/dumux/material/fluidsystems/h2oairfluidsystem.hh
+++ b/dumux/material/fluidsystems/h2oairfluidsystem.hh
@@ -660,8 +660,8 @@ public:
                                     int phaseIdx,
                                     int componentIdx)
     {
-        Scalar T = fluidState.temperature(nPhaseIdx);
-        Scalar p = fluidState.pressure(nPhaseIdx);
+        Scalar T = fluidState.temperature(phaseIdx);
+        Scalar p = fluidState.pressure(phaseIdx);
         Valgrind::CheckDefined(T);
         Valgrind::CheckDefined(p);
 
@@ -671,7 +671,7 @@ public:
         }
         else if (phaseIdx == nPhaseIdx)
         {
-            if (componentIdx ==  H2OIdx)
+            if (componentIdx == H2OIdx)
             {
                 return H2O::gasEnthalpy(T, p);
             }
-- 
GitLab