From 6a8957d485fe0db7fe010426097716d9dde6518a Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 30 Nov 2017 09:58:34 +0100
Subject: [PATCH] [spatialparams] Get Forchheimer coeff with getParam and
 default

---
 dumux/common/parameters.hh                 |  3 ---
 dumux/material/spatialparams/implicit1p.hh | 11 +++++------
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh
index 88e7cf5cdc..5f952529e7 100644
--- a/dumux/common/parameters.hh
+++ b/dumux/common/parameters.hh
@@ -361,9 +361,6 @@ private:
         params["TimeLoop.MaxTimeStepSize"] = "1e300";
         params["TimeLoop.MaxTimeStepDivisions"] = "10";
 
-        // parameters in the spatial params group
-        params["SpatialParams.ForchCoeff"] = "0.55";
-
         // parameters in the vtk group
         params["Vtk.AddVelocity"] = "false";
         params["Vtk.AddProcessRank"] = "true";
diff --git a/dumux/material/spatialparams/implicit1p.hh b/dumux/material/spatialparams/implicit1p.hh
index 5d41b887b6..bcc06400ac 100644
--- a/dumux/material/spatialparams/implicit1p.hh
+++ b/dumux/material/spatialparams/implicit1p.hh
@@ -49,6 +49,7 @@ class ImplicitSpatialParamsOneP
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Implementation = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
+    using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     using Element = typename GridView::template Codim<0>::Entity;
@@ -287,14 +288,12 @@ public:
      *        porous medium. Taking it as a constant is only a first approximation
      *        (Nield, Bejan, Convection in porous media, 2006, p. 10 \cite nield2006 )
      *
-     * \param element The current finite element
-     * \param fvGeometry The current finite volume geometry of the element
-     * \param scvIdx The index sub-control volume face where the
-     *                      intrinsic velocity ought to be calculated.
+     * \param scv The sub-control volume face where the
+     *           intrinsic velocity ought to be calculated.
      */
-    Scalar forchCoeff(const SubControlVolume &scv) const
+    Scalar forchCoeff(const SubControlVolumeFace &scvf) const
     {
-        static Scalar forchCoeff = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "SpatialParams.ForchCoeff");
+        static Scalar forchCoeff = getParamFromGroup<Scalar>(GET_PROP_VALUE(TypeTag, ModelParameterGroup), "SpatialParams.ForchCoeff", 0.55);
         return forchCoeff;
     }
 
-- 
GitLab