From b9fa4a4773df6035985c11c6fa4769f38e1eeda3 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Tue, 2 Jan 2018 12:00:05 +0100
Subject: [PATCH] [material] rename fluidsystem file

Manual cherry-pick of a part of 993d4801.
---
 dumux/material/fluidsystems/CMakeLists.txt    |  2 +-
 ...oheavyoilfluidsystem.hh => h2oheavyoil.hh} | 44 ++++++++++---------
 .../implicit/3pwateroilsagdproblem.hh         |  2 +-
 3 files changed, 26 insertions(+), 22 deletions(-)
 rename dumux/material/fluidsystems/{h2oheavyoilfluidsystem.hh => h2oheavyoil.hh} (95%)

diff --git a/dumux/material/fluidsystems/CMakeLists.txt b/dumux/material/fluidsystems/CMakeLists.txt
index 32b1396fe4..fec9328d2a 100644
--- a/dumux/material/fluidsystems/CMakeLists.txt
+++ b/dumux/material/fluidsystems/CMakeLists.txt
@@ -8,7 +8,7 @@ install(FILES
   h2oair.hh
   h2oairmesitylene.hh
   h2oairxylene.hh
-  h2oheavyoilfluidsystem.hh
+  h2oheavyoil.hh
   h2on2.hh
   h2on2kinetic.hh
   h2on2o2.hh
diff --git a/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh b/dumux/material/fluidsystems/h2oheavyoil.hh
similarity index 95%
rename from dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh
rename to dumux/material/fluidsystems/h2oheavyoil.hh
index db51258e8a..5c89ded510 100644
--- a/dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh
+++ b/dumux/material/fluidsystems/h2oheavyoil.hh
@@ -27,30 +27,34 @@
 #include <dumux/material/idealgas.hh>
 #include <dumux/material/components/h2o.hh>
 #include <dumux/material/components/tabulatedcomponent.hh>
+#include <dumux/material/components/simpleh2o.hh>
 #include <dumux/material/components/heavyoil.hh>
 
 #include <dumux/material/binarycoefficients/h2o_heavyoil.hh>
 
 #include <dumux/material/fluidsystems/base.hh>
 
-namespace Dumux {
-namespace FluidSystems {
+namespace Dumux
+{
+namespace FluidSystems
+{
 
 /*!
- * \brief A compositional fluid with water and heavy oil
- *        components in both, the liquid and the gas phase.
+ * \ingroup Fluidsystems
+ * \brief A compositional fluid system with water and heavy oil
+ *        components in both the liquid and the gas phase.
  */
-template <class Scalar,
+template <class TypeTag, class Scalar,
           class H2OType = Dumux::TabulatedComponent<Scalar, Dumux::H2O<Scalar> > >
 class H2OHeavyOil
-    : public BaseFluidSystem<Scalar, H2OHeavyOil<Scalar, H2OType> >
+    : public BaseFluidSystem<Scalar, H2OHeavyOil<TypeTag, Scalar, H2OType> >
 {
-    using ThisType = H2OHeavyOil<Scalar, H2OType>;
-    using Base = BaseFluidSystem<Scalar, ThisType>;
+    typedef H2OHeavyOil<TypeTag, Scalar, H2OType> ThisType;
+    typedef BaseFluidSystem<Scalar, ThisType> Base;
 
 public:
-    using HeavyOil = Dumux::HeavyOil<Scalar>;
-    using H2O = H2OType;
+    typedef Dumux::HeavyOil<Scalar> HeavyOil;
+    typedef H2OType H2O;
 
 
     static const int numPhases = 3;
@@ -156,7 +160,7 @@ public:
      *
      * \param phaseIdx The index of the fluid phase to consider
      */
-    static constexpr bool isCompressible(int phaseIdx)
+    static bool isCompressible(int phaseIdx)
     {
         assert(0 <= phaseIdx && phaseIdx < numPhases);
         // gases are always compressible
@@ -307,7 +311,8 @@ public:
             DUNE_THROW(Dune::InvalidStateException, "non-existent diffusion coefficient for phase index " << phaseIdx);
     }
 
-     /* Henry coefficients
+     /*!
+     * \brief Henry coefficients
      */
     template <class FluidState>
     static Scalar henryCoefficient(const FluidState &fluidState,
@@ -318,20 +323,20 @@ public:
         assert(0 <= compIdx  && compIdx < numComponents);
 
         const Scalar T = fluidState.temperature(phaseIdx);
-        const Scalar p = fluidState.pressure(phaseIdx);
 
         if (compIdx == NAPLIdx && phaseIdx == wPhaseIdx)
-            return Dumux::BinaryCoeff::H2O_HeavyOil::henryOilInWater(T)/p;
+            return Dumux::BinaryCoeff::H2O_HeavyOil::henryOilInWater(T);
 
         else if (phaseIdx == nPhaseIdx && compIdx == H2OIdx)
-            return Dumux::BinaryCoeff::H2O_HeavyOil::henryWaterInOil(T)/p;
+            return Dumux::BinaryCoeff::H2O_HeavyOil::henryWaterInOil(T);
 
         else
             DUNE_THROW(Dune::InvalidStateException, "non-existent henry coefficient for phase index " << phaseIdx
                                                      << " and component index " << compIdx);
     }
 
-     /*  partial pressures in the gas phase, taken from saturation vapor pressures
+     /*!
+     * \brief Partial pressures in the gas phase, taken from saturation vapor pressures
      */
     template <class FluidState>
     static Scalar partialPressureGas(const FluidState &fluidState, int phaseIdx,
@@ -348,7 +353,8 @@ public:
             DUNE_THROW(Dune::InvalidStateException, "non-existent component index " << compIdx);
     }
 
-     /*  inverse vapor pressures, taken from inverse saturation vapor pressures
+     /*!
+     * \brief Inverse vapor pressures, taken from inverse saturation vapor pressures
      */
     template <class FluidState>
     static Scalar inverseVaporPressureCurve(const FluidState &fluidState,
@@ -371,8 +377,7 @@ public:
     /*!
      * \brief Given all mole fractions in a phase, return the specific
      *        phase enthalpy [J/kg].
-     */
-    /*!
+     *
      *  \todo This system neglects the contribution of gas-molecules in the liquid phase.
      *        This contribution is probably not big. Somebody would have to find out the enthalpy of solution for this system. ...
      */
@@ -435,7 +440,6 @@ public:
 private:
 
 };
-
 } // end namespace FluidSystems
 } // end namespace Dumux
 
diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh
index ec74650644..7464e7a3dd 100644
--- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh
+++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh
@@ -28,7 +28,7 @@
 
 #include <dumux/discretization/box/properties.hh>
 #include <dumux/porousmediumflow/3pwateroil/model.hh>
-#include <dumux/material/fluidsystems/h2oheavyoilfluidsystem.hh>
+#include <dumux/material/fluidsystems/h2oheavyoil.hh>
 #include "3pwateroilsagdspatialparams.hh"
 
 namespace Dumux
-- 
GitLab