25#ifndef DUMUX_PNM2P_SPATIAL_PARAMS_HH
26#define DUMUX_PNM2P_SPATIAL_PARAMS_HH
46template<
class Gr
idGeometry,
class Scalar,
class LocalRules,
class Implementation>
48:
public BaseSpatialParams<GridGeometry, Scalar, TwoPBaseSpatialParams<GridGeometry, Scalar, LocalRules, Implementation>>
51 using GridView =
typename GridGeometry::GridView;
52 using SubControlVolume =
typename GridGeometry::SubControlVolume;
53 using Element =
typename GridView::template Codim<0>::Entity;
60 if (!
gridGeometry->useSameGeometryForAllPores() && LocalRules::supportsMultipleGeometries())
61 DUNE_THROW(Dune::InvalidStateException,
"Your MaterialLaw does not support multiple pore body shapes.");
65 cornerHalfAngles_.resize(1);
66 const auto& shape = this->
gridGeometry().throatCrossSectionShape(0);
74 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
75 const auto& shape = this->
gridGeometry().throatCrossSectionShape(eIdx);
84 template<
class FS,
class ElementVolumeVariables>
85 int wettingPhase(
const Element&,
const ElementVolumeVariables& elemVolVars)
const
91 template<
class FS,
class ElementSolutionVector>
92 int wettingPhase(
const Element&,
const SubControlVolume& scv,
const ElementSolutionVector& elemSol)
const
102 template<
class ElementVolumeVariables>
104 const ElementVolumeVariables& elemVolVars)
const
106 static const Scalar theta =
getParam<Scalar>(
"SpatialParams.ContactAngle", 0.0);
118 template<
class ElementSolutionVector>
120 const SubControlVolume& scv,
121 const ElementSolutionVector& elemSol)
const
123 static const Scalar theta =
getParam<Scalar>(
"SpatialParams.ContactAngle", 0.0);
132 template<
class ElementVolumeVariables>
133 const Scalar
pcEntry(
const Element& element,
const ElementVolumeVariables& elemVolVars)
const
135 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
149 template<
class ElementVolumeVariables>
150 const Scalar
pcSnapoff(
const Element& element,
const ElementVolumeVariables& elemVolVars)
const
166 template<
class ElementSolution>
168 const SubControlVolume& scv,
169 const ElementSolution& elemSol)
const
171 static const Scalar gamma =
getParam<Scalar>(
"SpatialParams.SurfaceTension", 0.0725);
183 template<
class ElementSolution>
185 const SubControlVolume& scv,
186 const ElementSolution& elemSol)
const
188 const auto params =
typename LocalRules::BasicParams(*
this, element, scv, elemSol);
195 return cornerHalfAngles_[0];
198 const auto eIdx = this->
gridGeometry().gridView().indexSet().index(element);
199 return cornerHalfAngles_[eIdx];
204 std::vector<Dune::ReservedVector<Scalar, 4>> cornerHalfAngles_;
208template<
class Gr
idGeometry,
class Scalar,
class MaterialLawT>
210 TwoPDefaultSpatialParams<GridGeometry, Scalar, MaterialLawT>>
215 using ParentType::ParentType;
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Specification of threshold capillary pressures for the PNM.
The base class for spatial parameters for pore-network models.
This file contains functions related to calculate pore-body properties.
This file contains functions related to calculate pore-throat properties.
auto makeFluidMatrixInteraction(Laws &&... laws)
Helper function to create an FluidMatrixInteraction object containing an arbitrary number of fluid ma...
Definition fluidmatrixinteraction.hh:51
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:348
Definition discretization/porenetwork/fvelementgeometry.hh:33
Dune::ReservedVector< Scalar, 4 > cornerHalfAngles(Shape shape)
Returns the corner half angle.
Definition throatproperties.hh:97
Base class for the finite volume geometry for porenetwork models.
Definition discretization/porenetwork/gridgeometry.hh:488
static constexpr Scalar pcSnapoff(const Scalar surfaceTension, const Scalar contactAngle, const Scalar inscribedRadius) noexcept
The snap-off capillary pressure of a pore throat.
Definition thresholdcapillarypressures.hh:36
static constexpr Scalar pcEntry(const Scalar surfaceTension, const Scalar contactAngle, const Scalar inscribedRadius, const Scalar shapeFactor) noexcept
The entry capillary pressure of a pore throat.
Definition thresholdcapillarypressures.hh:54
const Scalar pcSnapoff(const Element &element, const ElementVolumeVariables &elemVolVars) const
Return the element (throat) specific snap-off capillary pressure .
Definition porenetwork2p.hh:150
int wettingPhase(const Element &, const SubControlVolume &scv, const ElementSolutionVector &elemSol) const
The index of the wetting phase within a pore body.
Definition porenetwork2p.hh:92
int wettingPhase(const Element &, const ElementVolumeVariables &elemVolVars) const
The index of the wetting phase within a pore throat.
Definition porenetwork2p.hh:85
Scalar contactAngle(const Element &element, const SubControlVolume &scv, const ElementSolutionVector &elemSol) const
The contact angle within a pore body .
Definition porenetwork2p.hh:119
TwoPBaseSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition porenetwork2p.hh:57
Scalar contactAngle(const Element &element, const ElementVolumeVariables &elemVolVars) const
The contact angle within a pore throat .
Definition porenetwork2p.hh:103
auto fluidMatrixInteraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the parameter object for the pore-local pc-Sw law.
Definition porenetwork2p.hh:184
const Dune::ReservedVector< Scalar, 4 > & cornerHalfAngles(const Element &element) const
Definition porenetwork2p.hh:192
Scalar surfaceTension(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition porenetwork2p.hh:167
const Scalar pcEntry(const Element &element, const ElementVolumeVariables &elemVolVars) const
Return the element (throat) specific entry capillary pressure .
Definition porenetwork2p.hh:133
Definition porenetwork2p.hh:211
Implementation & asImp_()
Definition porenetworkbase.hh:308
Scalar throatInscribedRadius(const Element &element, const ElementVolumeVariables &elemVolVars) const
Definition porenetworkbase.hh:135
const GridGeometry & gridGeometry() const
Definition porenetworkbase.hh:203
BaseSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition porenetworkbase.hh:103
const GridView & gridView() const
Definition porenetworkbase.hh:176