diff --git a/dumux/material/fluidmatrixinteractions/porenetwork/pore/2p/localrulesforplatonicbody.hh b/dumux/material/fluidmatrixinteractions/porenetwork/pore/2p/localrulesforplatonicbody.hh index c5d9455c24723bd68d74f846ba78a9232ba2a815..c97b28fcc132065e4704ec0b226b47a7aa272033 100644 --- a/dumux/material/fluidmatrixinteractions/porenetwork/pore/2p/localrulesforplatonicbody.hh +++ b/dumux/material/fluidmatrixinteractions/porenetwork/pore/2p/localrulesforplatonicbody.hh @@ -57,10 +57,8 @@ struct PlatonicBodyParams const ElemSol& elemSol) : shape_(spatialParams.gridGeometry().poreGeometry()[scv.dofIndex()]) , radius_(spatialParams.poreInscribedRadius(element, scv, elemSol)) - { - static const Scalar surfaceTension = getParam<Scalar>("SpatialParams.SurfaceTension", 0.0725); // TODO - surfaceTension_ = surfaceTension; - } + , surfaceTension_(spatialParams.surfaceTension(element, scv, elemSol)) + {} template<class SpatialParams, class Element, class SubControlVolume, class ElemSol> void update(const SpatialParams& spatialParams, @@ -71,9 +69,7 @@ struct PlatonicBodyParams const auto& gridGeometry = spatialParams.gridGeometry(); shape_ = gridGeometry.poreGeometry()[scv.dofIndex()]; radius_ = spatialParams.poreInscribedRadius(element, scv, elemSol); - - static const Scalar surfaceTension = getParam<Scalar>("SpatialParams.SurfaceTension", 0.0725); // TODO - surfaceTension_ = surfaceTension; + surfaceTension_ = spatialParams.surfaceTension(element, scv, elemSol); } Pore::Shape poreShape() const { return shape_; } diff --git a/dumux/material/spatialparams/porenetwork/porenetwork2p.hh b/dumux/material/spatialparams/porenetwork/porenetwork2p.hh index 415bca66c6535c20789234566f3bb0a390720a7c..79bbfe3627112fab0cda8863c5d30d895013f04d 100644 --- a/dumux/material/spatialparams/porenetwork/porenetwork2p.hh +++ b/dumux/material/spatialparams/porenetwork/porenetwork2p.hh @@ -157,9 +157,23 @@ public: } /*! - * \brief Returns the parameter object for the Brooks-Corey material law. + * \brief Returns the surface tension \f$ N/m\f$ * - * In this test, we use element-wise distributed material parameters. + * \param element The current element + * \param scv The sub-control volume inside the element. + * \param elemSol The solution at the dofs connected to the element. + */ + template<class ElementSolution> + Scalar surfaceTension(const Element& element, + const SubControlVolume& scv, + const ElementSolution& elemSol) const + { + static const Scalar gamma = getParam<Scalar>("SpatialParams.SurfaceTension", 0.0725); // default to surface tension of water/air + return gamma; + } + + /*! + * \brief Returns the parameter object for the pore-local pc-Sw law * * \param element The current element * \param scv The sub-control volume inside the element. diff --git a/dumux/porenetwork/2p/volumevariables.hh b/dumux/porenetwork/2p/volumevariables.hh index dcb859bc171e433df525b08a19c4986b4a98e5f8..f05245028c7d1731a79f41ac72b9380d0c3b77cf 100644 --- a/dumux/porenetwork/2p/volumevariables.hh +++ b/dumux/porenetwork/2p/volumevariables.hh @@ -76,10 +76,7 @@ public: ParentType::update(elemSol, problem, element, scv); poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol); poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity(); - - // the value of water/air TODO make general in fluid system - static const Scalar gamma = getParamFromGroup<Scalar>(problem.paramGroup(), "Problem.SurfaceTension", 0.0725); - surfaceTension_ = gamma; + surfaceTension_ = problem.spatialParams().surfaceTension(element, scv, elemSol); } /*!