24#ifndef DUMUX_INCOMPRESSIBLE_TWOP_TEST_SPATIAL_PARAMS_HH
25#define DUMUX_INCOMPRESSIBLE_TWOP_TEST_SPATIAL_PARAMS_HH
39template<
class Gr
idGeometry,
class Scalar>
40class TwoPTestSpatialParams
41:
public FVSpatialParams<GridGeometry, Scalar, TwoPTestSpatialParams<GridGeometry, Scalar>>
43 using GridView =
typename GridGeometry::GridView;
44 using Element =
typename GridView::template Codim<0>::Entity;
45 using FVElementGeometry =
typename GridGeometry::LocalView;
46 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
47 using ThisType = TwoPTestSpatialParams<GridGeometry, Scalar>;
48 using ParentType = FVSpatialParams<GridGeometry, Scalar, ThisType>;
50 static constexpr int dimWorld = GridView::dimensionworld;
51 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
53 using EffectiveLaw = RegularizedVanGenuchten<Scalar>;
63 lensIsOilWet_ = getParam<bool>(
"SpatialParams.LensIsOilWet",
false);
65 lensLowerLeft_ = getParam<GlobalPosition>(
"SpatialParams.LensLowerLeft");
66 lensUpperRight_ = getParam<GlobalPosition>(
"SpatialParams.LensUpperRight");
69 lensMaterialParams_.setSwr(0.18);
70 lensMaterialParams_.setSnr(0.0);
71 outerMaterialParams_.setSwr(0.05);
72 outerMaterialParams_.setSnr(0.0);
76 lensMaterialParams_.setVgAlpha(0.00045);
77 lensMaterialParams_.setVgn(7.3);
78 outerMaterialParams_.setVgAlpha(0.0037);
79 outerMaterialParams_.setVgn(4.7);
81 lensK_ = getParam<Scalar>(
"SpatialParams.lensK", 9.05e-12);
82 outerK_ = getParam<Scalar>(
"SpatialParams.outerK", 4.6e-10);
94 template<
class ElementSolution>
96 const SubControlVolume& scv,
97 const ElementSolution& elemSol)
const
101 if (isInLens_(element.geometry().center()) && !lensIsOilWet_)
124 template<
class ElementSolution>
126 const SubControlVolume& scv,
127 const ElementSolution& elemSol)
const
130 if (isInLens_(element.geometry().center()) && !lensIsOilWet_)
131 return lensMaterialParams_;
132 return outerMaterialParams_;
141 template<
class Flu
idSystem>
144 if (isInLens_(globalPos) && lensIsOilWet_)
145 return FluidSystem::phase1Idx;
146 return FluidSystem::phase0Idx;
150 template<
class SolutionVector>
154 materialInterfaceParams_.update(this->
gridGeometry(), *
this, x);
159 {
return materialInterfaceParams_; }
165 bool isInLens_(
const GlobalPosition &globalPos)
const
167 for (
int i = 0; i < dimWorld; ++i) {
168 if (globalPos[i] < lensLowerLeft_[i] + eps_ || globalPos[i] > lensUpperRight_[i] - eps_)
175 GlobalPosition lensLowerLeft_;
176 GlobalPosition lensUpperRight_;
184 BoxMaterialInterfaceParams<ThisType> materialInterfaceParams_;
186 static constexpr Scalar eps_ = 1.5e-7;
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
copydoc Dumux::BoxMaterialInterfaceParams
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
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
Class that determines the material with the lowest capillary pressure (under fully water-saturated co...
Definition: boxmaterialinterfaceparams.hh:47
const BoxMaterialInterfaceParams< ThisType > & materialInterfaceParams() const
Returns the material parameters associated with a nodal dof.
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:158
Scalar PermeabilityType
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:60
bool lensIsOilWet() const
Returns whether or not the lens is oil wet.
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:162
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the parameter object for the Brooks-Corey material law.
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:125
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability . In this test, we use element-wise distributed pe...
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:95
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:59
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:142
TwoPTestSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:60
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Returns the porosity .
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:111
void updateMaterialInterfaceParams(const SolutionVector &x)
Updates the map of which material parameters are associated with a nodal dof.
Definition: porousmediumflow/2p/implicit/incompressible/spatialparams.hh:151
This material law takes a material law defined for effective saturations and converts it to a materia...