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);
71 cornerHalfAngles_[0] = Throat::cornerHalfAngles<Scalar>(
shape);
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);
80 cornerHalfAngles_[eIdx] = Throat::cornerHalfAngles<Scalar>(
shape);
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);
141 const Scalar surfaceTension = 0.5*(elemVolVars[0].surfaceTension() + elemVolVars[1].surfaceTension());
143 this->asImp_().contactAngle(element, elemVolVars),
144 this->asImp_().throatInscribedRadius(element, elemVolVars),
145 this->gridGeometry().throatShapeFactor(eIdx));
153 template<
class ElementVolumeVariables>
154 const Scalar
pcSnapoff(
const Element& element,
const ElementVolumeVariables& elemVolVars)
const
157 const Scalar surfaceTension = 0.5*(elemVolVars[0].surfaceTension() + elemVolVars[1].surfaceTension());
159 this->asImp_().contactAngle(element, elemVolVars),
160 this->asImp_().throatInscribedRadius(element, elemVolVars));
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);
198 if (this->gridGeometry().useSameShapeForAllThroats())
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.")]]
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
Definition: discretization/porenetwork/fvelementgeometry.hh:34
constexpr Shape shape(const Scalar shapeFactor) noexcept
Returns the shape for a given shape factor.
Definition: throatproperties.hh:176
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
The base class for spatial parameters for pore-network models.
Definition: porenetwork2p.hh:53
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
Returns the surface tension .
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
The default class for spatial parameters for two-phase pore-network models.
Definition: porenetwork2p.hh:217
The base class for spatial parameters for pore-network models.
Definition: porenetworkbase.hh:94