From 47dd7877cf305ee42a937f8e37547ec0f1109d87 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Mon, 7 May 2018 17:35:42 +0200
Subject: [PATCH] [2p2c] Remove useKelvinVaporPressure as property and model
 trait. Set directly for the fluid system

---
 dumux/common/properties.hh                         |  1 -
 dumux/porousmediumflow/2p2c/model.hh               | 10 ++--------
 dumux/porousmediumflow/richards/model.hh           | 14 +++-----------
 dumux/porousmediumflow/richards/volumevariables.hh |  4 ----
 4 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh
index 7974745b5a..575e1f58e4 100644
--- a/dumux/common/properties.hh
+++ b/dumux/common/properties.hh
@@ -116,7 +116,6 @@ NEW_PROP_TAG(VelocityOutput);                      //!< specifies the velocity c
 NEW_PROP_TAG(Formulation);                         //!< The formulation of the model
 // TODO: is this useful? -> everything is a constraint solver just a different type
 NEW_PROP_TAG(UseConstraintSolver);                 //!< Whether to use a contraint solver for computing the secondary variables
-NEW_PROP_TAG(UseKelvinEquation);                   //!< If we use Kelvin equation to lower the vapor pressure as a function of capillary pressure, temperature
 
 // When using the box method in a multi-phase context, an interface solver might be necessary
 NEW_PROP_TAG(EnableBoxInterfaceSolver);
diff --git a/dumux/porousmediumflow/2p2c/model.hh b/dumux/porousmediumflow/2p2c/model.hh
index 723f52b20b..b5ec3eef8a 100644
--- a/dumux/porousmediumflow/2p2c/model.hh
+++ b/dumux/porousmediumflow/2p2c/model.hh
@@ -134,10 +134,9 @@ struct TwoPTwoCModelTraits
  * \tparam FST The fluid state type
  * \tparam PT The type used for permeabilities
  * \tparam MT The model traits
- * \tparam useKE boolean to indicate if kelvin equation is used for vapour pressure
  * \tparam useCS boolean to indicate if a constraint solver is to be used
  */
-template<class PV, class FSY, class FST, class PT, class MT, bool useKE, bool useCS>
+template<class PV, class FSY, class FST, class PT, class MT, bool useCS>
 struct TwoPTwoCVolumeVariablesTraits
 {
     using PrimaryVariables = PV;
@@ -146,7 +145,6 @@ struct TwoPTwoCVolumeVariablesTraits
     using PermeabilityType = PT;
     using ModelTraits = MT;
 
-    static constexpr bool useKelvinEquation = useKE;
     static constexpr bool useConstraintSolver = useCS;
 };
 
@@ -228,10 +226,9 @@ private:
     using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits);
     using PT = typename GET_PROP_TYPE(TypeTag, SpatialParams)::PermeabilityType;
 
-    static constexpr bool useKE = GET_PROP_VALUE(TypeTag, UseKelvinEquation);
     static constexpr bool useCS = GET_PROP_VALUE(TypeTag, UseConstraintSolver);
 
-    using Traits = TwoPTwoCVolumeVariablesTraits<PV, FSY, FST, PT, MT, useKE, useCS>;
+    using Traits = TwoPTwoCVolumeVariablesTraits<PV, FSY, FST, PT, MT, useCS>;
 public:
     using type = TwoPTwoCVolumeVariables<Traits>;
 };
@@ -246,9 +243,6 @@ SET_BOOL_PROP(TwoPTwoC, UseMoles, true);
 //! Determines whether the constraint solver is used
 SET_BOOL_PROP(TwoPTwoC, UseConstraintSolver, true);
 
-//! Determines whether the Kelvin equation is used to adapt the saturation vapor pressure
-SET_BOOL_PROP(TwoPTwoC, UseKelvinEquation, false);
-
 //! Somerton is used as default model to compute the effective thermal heat conductivity
 SET_PROP(TwoPTwoCNI, ThermalConductivityModel)
 {
diff --git a/dumux/porousmediumflow/richards/model.hh b/dumux/porousmediumflow/richards/model.hh
index a46fed48ed..0f64dd37b4 100644
--- a/dumux/porousmediumflow/richards/model.hh
+++ b/dumux/porousmediumflow/richards/model.hh
@@ -122,9 +122,8 @@ namespace Dumux {
  * \brief Specifies a number properties of the Richards model.
  *
  * \tparam enableDiff specifies if diffusion of water in air is to be considered.
- * \tparam useKelvin whether kelvin equation is used for the vapor pressure
  */
-template<bool enableDiff, bool useKelvin>
+template<bool enableDiff>
 struct RichardsModelTraits
 {
     using Indices = RichardsIndices;
@@ -136,8 +135,6 @@ struct RichardsModelTraits
     static constexpr bool enableAdvection() { return true; }
     static constexpr bool enableMolecularDiffusion() { return enableDiff; }
     static constexpr bool enableEnergyBalance() { return false; }
-
-    static constexpr bool useKelvinVaporPressure() { return useKelvin; }
 };
 
 /*!
@@ -193,8 +190,7 @@ public:
 };
 
 //! The model traits
-SET_TYPE_PROP(Richards, ModelTraits, RichardsModelTraits<GET_PROP_VALUE(TypeTag, EnableWaterDiffusionInAir),
-                                                         GET_PROP_VALUE(TypeTag, UseKelvinEquation)>);
+SET_TYPE_PROP(Richards, ModelTraits, RichardsModelTraits<GET_PROP_VALUE(TypeTag, EnableWaterDiffusionInAir)>);
 
 //! Set the volume variables property
 SET_PROP(Richards, VolumeVariables)
@@ -219,9 +215,6 @@ SET_BOOL_PROP(Richards, EnableWaterDiffusionInAir, false);
 SET_TYPE_PROP(Richards, EffectiveDiffusivityModel,
               DiffusivityMillingtonQuirk<typename GET_PROP_TYPE(TypeTag, Scalar)>);
 
-//! The default is not to use the kelvin equation for the water vapor pressure (dependency on pc)
-SET_BOOL_PROP(Richards, UseKelvinEquation, false);
-
 //! The primary variables vector for the richards model
 SET_PROP(Richards, PrimaryVariables)
 {
@@ -281,8 +274,7 @@ public:
 SET_PROP(RichardsNI, ModelTraits)
 {
 private:
-    using IsothermalTraits = RichardsModelTraits<GET_PROP_VALUE(TypeTag, EnableWaterDiffusionInAir),
-                                                 GET_PROP_VALUE(TypeTag, UseKelvinEquation)>;
+    using IsothermalTraits = RichardsModelTraits<GET_PROP_VALUE(TypeTag, EnableWaterDiffusionInAir)>;
 public:
     using type = PorousMediumFlowNIModelTraits<IsothermalTraits>;
 };
diff --git a/dumux/porousmediumflow/richards/volumevariables.hh b/dumux/porousmediumflow/richards/volumevariables.hh
index 8f2169eefd..62478d4ffa 100644
--- a/dumux/porousmediumflow/richards/volumevariables.hh
+++ b/dumux/porousmediumflow/richards/volumevariables.hh
@@ -75,10 +75,6 @@ public:
                 const Element &element,
                 const Scv& scv)
     {
-        // TODO check this is the fluid system now
-        static_assert(!(!enableWaterDiffusionInAir() && ModelTraits::useKelvinVaporPressure()),
-          "Kevin vapor presssure only makes sense if water in air is considered!");
-
         ParentType::update(elemSol, problem, element, scv);
         const auto& materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
         const auto& priVars = ParentType::extractDofPriVars(elemSol, scv);
-- 
GitLab