Commit d8079df6 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[PNM] Add surface tension to spatialParams

parent 5b01d89a
......@@ -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_; }
......
......@@ -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.
......
......@@ -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);
}
/*!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment