25#ifndef DUMUX_PNM2P_SPATIAL_PARAMS_HH
26#define DUMUX_PNM2P_SPATIAL_PARAMS_HH
28#warning "This file is deprecated, use PoreNetwork::TwoPDefaultSpatialParams from dumux/porenetwork/2p/spatialparams.hh instead!"
48template<
class Gr
idGeometry,
class Scalar,
class LocalRules,
class Implementation>
50[[deprecated(
"Use PoreNetwork::TwoPSpatialParams from dumux/porenetwork/2p/spatialparams.hh instead. This class will be removed after 3.5.")]]
55 using GridView =
typename GridGeometry::GridView;
56 using SubControlVolume =
typename GridGeometry::SubControlVolume;
57 using Element =
typename GridView::template Codim<0>::Entity;
64 if (!
gridGeometry->useSameGeometryForAllPores() && LocalRules::supportsMultipleGeometries())
65 DUNE_THROW(Dune::InvalidStateException,
"Your MaterialLaw does not support multiple pore body shapes.");
67 if (this->gridGeometry().useSameShapeForAllThroats())
69 cornerHalfAngles_.resize(1);
70 const auto& shape = this->gridGeometry().throatCrossSectionShape(0);
75 cornerHalfAngles_.resize(this->gridGeometry().
gridView().size(0));
76 for (
auto&& element : elements(this->gridGeometry().
gridView()))
78 const auto eIdx = this->gridGeometry().elementMapper().index(element);
79 const auto& shape = this->gridGeometry().throatCrossSectionShape(eIdx);
88 template<
class FS,
class ElementVolumeVariables>
89 int wettingPhase(
const Element&,
const ElementVolumeVariables& elemVolVars)
const
95 template<
class FS,
class ElementSolutionVector>
96 int wettingPhase(
const Element&,
const SubControlVolume& scv,
const ElementSolutionVector& elemSol)
const
106 template<
class ElementVolumeVariables>
108 const ElementVolumeVariables& elemVolVars)
const
110 static const Scalar theta =
getParam<Scalar>(
"SpatialParams.ContactAngle", 0.0);
122 template<
class ElementSolutionVector>
124 const SubControlVolume& scv,
125 const ElementSolutionVector& elemSol)
const
127 static const Scalar theta =
getParam<Scalar>(
"SpatialParams.ContactAngle", 0.0);
136 template<
class ElementVolumeVariables>
137 const Scalar
pcEntry(
const Element& element,
const ElementVolumeVariables& elemVolVars)
const
139 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
153 template<
class ElementVolumeVariables>
154 const Scalar
pcSnapoff(
const Element& element,
const ElementVolumeVariables& elemVolVars)
const
170 template<
class ElementSolution>
172 const SubControlVolume& scv,
173 const ElementSolution& elemSol)
const
175 static const Scalar gamma =
getParam<Scalar>(
"SpatialParams.SurfaceTension", 0.0725);
187 template<
class ElementSolution>
189 const SubControlVolume& scv,
190 const ElementSolution& elemSol)
const
192 const auto params =
typename LocalRules::BasicParams(*
this, element, scv, elemSol);
199 return cornerHalfAngles_[0];
202 const auto eIdx = this->
gridGeometry().gridView().indexSet().index(element);
203 return cornerHalfAngles_[eIdx];
208 std::vector<Dune::ReservedVector<Scalar, 4>> cornerHalfAngles_;
212template<
class Gr
idGeometry,
class Scalar,
class MaterialLawT>
214[[deprecated(
"Use PoreNetwork::TwoPDefaultSpatialParams from dumux/porenetwork/2p/spatialparams.hh instead. This class will be removed after 3.5.")]]
221 using ParentType::ParentType;
The base class for spatial parameters for pore-network models.
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Specification of threshold capillary pressures for the PNM.
This file contains functions related to calculate pore-throat properties.
This file contains functions related to calculate pore-body 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:151
Definition discretization/porenetwork/fvelementgeometry.hh:34
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:489
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:37
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:55
const Scalar pcSnapoff(const Element &element, const ElementVolumeVariables &elemVolVars) const
Return the element (throat) specific snap-off capillary pressure .
Definition porenetwork2p.hh:154
int wettingPhase(const Element &, const SubControlVolume &scv, const ElementSolutionVector &elemSol) const
The index of the wetting phase within a pore body.
Definition porenetwork2p.hh:96
int wettingPhase(const Element &, const ElementVolumeVariables &elemVolVars) const
The index of the wetting phase within a pore throat.
Definition porenetwork2p.hh:89
Scalar contactAngle(const Element &element, const SubControlVolume &scv, const ElementSolutionVector &elemSol) const
The contact angle within a pore body .
Definition porenetwork2p.hh:123
TwoPBaseSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition porenetwork2p.hh:61
Scalar contactAngle(const Element &element, const ElementVolumeVariables &elemVolVars) const
The contact angle within a pore throat .
Definition porenetwork2p.hh:107
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:188
const Dune::ReservedVector< Scalar, 4 > & cornerHalfAngles(const Element &element) const
Definition porenetwork2p.hh:196
Scalar surfaceTension(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition porenetwork2p.hh:171
const Scalar pcEntry(const Element &element, const ElementVolumeVariables &elemVolVars) const
Return the element (throat) specific entry capillary pressure .
Definition porenetwork2p.hh:137
TwoPDefaultSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition porenetwork/2p/spatialparams.hh:247
TwoPDefaultSpatialParams< GridGeometry, Scalar, MaterialLawT > & asImp_()
Definition porenetworkbase.hh:310
Scalar throatInscribedRadius(const Element &element, const ElementVolumeVariables &elemVolVars) const
Definition porenetworkbase.hh:137
const GridGeometry & gridGeometry() const
Definition porenetworkbase.hh:205
BaseSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition porenetworkbase.hh:105
const GridView & gridView() const
Definition porenetworkbase.hh:178