25#ifndef DUMUX_2P_TEST_SPATIALPARAMS_HH
26#define DUMUX_2P_TEST_SPATIALPARAMS_HH
43template<
class Gr
idGeometry,
class Scalar,
class CouplingManager>
45 TwoPSpatialParams<GridGeometry, Scalar, CouplingManager>>
47 using SubControlVolume =
typename GridGeometry::SubControlVolume;
48 using GridView =
typename GridGeometry::GridView;
49 using Element =
typename GridView::template Codim<0>::Entity;
50 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
63 std::shared_ptr<CouplingManager> couplingManagerPtr)
65 , couplingManagerPtr_(couplingManagerPtr)
66 , initPermeability_(
getParam<Scalar>(
"SpatialParams.Permeability"))
67 , initPorosity_(
getParam<Scalar>(
"SpatialParams.InitialPorosity"))
73 Scalar brooksCoreyLambda = m / (1 - m) * (1 - pow(0.5, 1/m));
76 myMaterialParams_.setSwr(0.3);
77 myMaterialParams_.setSnr(0.05);
80 myMaterialParams_.setPe(1.99e4);
81 myMaterialParams_.setLambda(brooksCoreyLambda);
85 template<
class ElementSolution >
87 const SubControlVolume& scv,
88 const ElementSolution& elemSol)
const
90 static constexpr auto poroMechId = CouplingManager::poroMechId;
92 const auto& poroMechGridGeom = couplingManagerPtr_->problem(poroMechId).gridGeometry();
93 const auto poroMechElemSol =
elementSolution(element, couplingManagerPtr_->curSol()[poroMechId], poroMechGridGeom);
100 template<
class ElementSolution >
102 const SubControlVolume& scv,
103 const ElementSolution& elemSol)
const
119 template<
class ElementSolution>
121 const SubControlVolume& scv,
122 const ElementSolution& elemSol)
const
125 return myMaterialParams_;
134 template<
class Flu
idSystem>
137 return FluidSystem::phase0Idx;
142 {
return *couplingManagerPtr_; }
145 std::shared_ptr<const CouplingManager> couplingManagerPtr_;
146 Scalar initPermeability_;
147 Scalar initPorosity_;
Element solution classes and factory functions.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
The Kozeny-Carman relationship for the calculation of a porosity-dependent permeability.
A relationship for the porosity of a porous medium under mechanical deformation.
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Creating random fields using gstat.
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethod::box, BoxElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for box schemes.
Definition: box/elementsolution.hh:115
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition: parameters.hh:428
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
This material law takes a material law defined for effective saturations and converts it to a materia...
Definition: 2p/efftoabslaw.hh:60
AbsParamsT Params
Definition: 2p/efftoabslaw.hh:64
Implementation of the regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition: regularizedbrookscorey.hh:62
The Kozeny-Carman relationship for the calculation of a porosity-dependent permeability....
Definition: permeabilitykozenycarman.hh:42
PermeabilityType evaluatePermeability(PermeabilityType refPerm, Scalar refPoro, Scalar poro) const
calculates the permeability for a given sub-control volume
Definition: permeabilitykozenycarman.hh:51
static Scalar evaluatePorosity(const FVGridGeom &gridGeometry, const typename FVGridGeom::GridView::template Codim< 0 >::Entity &element, const typename FVGridGeom::GridView::template Codim< 0 >::Entity::Geometry::GlobalCoordinate &globalPos, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0, Scalar maxPoro=1.0)
Calculates the porosity at a position inside an element.
Definition: porositydeformation.hh:65
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Definition: fv.hh:57
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition: multidomain/couplingmanager.hh:46
The spatial parameters class for the two-phase sub problem in the el2p test problem.
Definition: spatialparams_2p.hh:46
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the parameter object for the Brooks-Corey material law.
Definition: spatialparams_2p.hh:120
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Functions for defining the (intrinsic) permeability .
Definition: spatialparams_2p.hh:101
const CouplingManager & couplingManager() const
Returns reference to the coupling manager.
Definition: spatialparams_2p.hh:141
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the porosity for a sub-control volume.
Definition: spatialparams_2p.hh:86
Scalar PermeabilityType
Definition: spatialparams_2p.hh:60
TwoPSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< CouplingManager > couplingManagerPtr)
Definition: spatialparams_2p.hh:62
typename MaterialLaw::Params MaterialLawParams
Definition: spatialparams_2p.hh:58
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: spatialparams_2p.hh:135
This material law takes a material law defined for effective saturations and converts it to a materia...