23#ifndef TEST_2P_SPATIALPARAMETERS_HH
24#define TEST_2P_SPATIALPARAMETERS_HH
34template<
class TypeTag>
46template<
class TypeTag>
61template<
class TypeTag>
69 using CoordScalar =
typename Grid::ctype;
73 dim = Grid::dimension, dimWorld = Grid::dimensionworld
75 using Element =
typename Grid::Traits::template Codim<0>::Entity;
77 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
78 using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
86 if (isLensOne(globalPos))
88 else if (isLensTwo(globalPos))
90 else if (isLensThree(globalPos))
93 return permBackground_;
110 if (isLensOne(globalPos))
111 return materialLawParamsLenses_;
112 else if (isLensTwo(globalPos))
113 return materialLawParamsLenses_;
114 else if (isLensThree(globalPos))
115 return materialLawParamsLenses_;
117 return materialLawParamsBackground_;
121 ParentType(problem), permBackground_(0), permLenses_(0),
122 lensOneLowerLeft_(0), lensOneUpperRight_(0), lensTwoLowerLeft_(0), lensTwoUpperRight_(0), lensThreeLowerLeft_(0), lensThreeUpperRight_(0)
126 materialLawParamsBackground_.setSwr(0.2);
127 materialLawParamsBackground_.setSnr(0.2);
129 materialLawParamsLenses_.setSwr(0.2);
130 materialLawParamsLenses_.setSnr(0.2);
135 materialLawParamsBackground_.setPe(0.);
136 materialLawParamsLenses_.setPe(0.);
139 materialLawParamsBackground_.setSwr(0.);
140 materialLawParamsBackground_.setSnr(0.);
142 materialLawParamsLenses_.setSwr(0.);
143 materialLawParamsLenses_.setSnr(0.);
148 materialLawParamsBackground_.setPe(5000.);
149 materialLawParamsLenses_.setPe(5000.);
152 materialLawParamsBackground_.setSwr(0.);
153 materialLawParamsBackground_.setSnr(0.);
155 materialLawParamsLenses_.setSwr(0.);
156 materialLawParamsLenses_.setSnr(0.);
161 materialLawParamsBackground_.setPe(
getParam<Scalar>(
"SpatialParams.BackgroundEntryPressure", 0.0));
162 materialLawParamsLenses_.setPe(
getParam<Scalar>(
"SpatialParams.LenseEntryPressure", 0.0));
167 materialLawParamsBackground_.setLambda(
getParam<Scalar>(
"SpatialParams.BackgroundLambda", 3.0));
168 materialLawParamsLenses_.setLambda(
getParam<Scalar>(
"SpatialParams.LenseLambda", 2.0));
170 materialLawParamsBackground_.setLambda(2.0);
171 materialLawParamsLenses_.setLambda(2.0);
175 permBackground_[0][0] = 1e-7;
176 permBackground_[1][1] = 1e-7;
177 permLenses_[0][0] = 1e-7;
178 permLenses_[1][1] = 1e-7;
180 permBackground_[0][0] = 1e-10;
181 permBackground_[1][1] = 1e-10;
182 permLenses_[0][0] = 1e-10;
183 permLenses_[1][1] = 1e-10;
185 permBackground_[0][0] =
getParam<Scalar>(
"SpatialParams.BackgroundPermeabilityXX", 1e-10);
186 permBackground_[0][1] =
getParam<Scalar>(
"SpatialParams.BackgroundPermeabilityXY", 0.0);
187 permBackground_[1][0] =
getParam<Scalar>(
"SpatialParams.BackgroundPermeabilityYX", 0.0);
188 permBackground_[1][1] =
getParam<Scalar>(
"SpatialParams.BackgroundPermeabilityYY", 1e-10);
189 permLenses_[0][0] =
getParam<Scalar>(
"SpatialParams.LensPermeabilityXX", 1e-10);
190 permLenses_[0][1] =
getParam<Scalar>(
"SpatialParams.LensPermeabilityXY", 0.0);
191 permLenses_[1][0] =
getParam<Scalar>(
"SpatialParams.LensPermeabilityYX", 0.0);
192 permLenses_[1][1] =
getParam<Scalar>(
"SpatialParams.LensPermeabilityYY", 1e-10);
205 bool isLensOne(
const GlobalPosition& globalPos)
const
207 for (
int i = 0; i < dim; i++)
209 if (globalPos[i] < lensOneLowerLeft_[i] - eps_ || globalPos[i] > lensOneUpperRight_[i] + eps_)
216 bool isLensTwo(
const GlobalPosition& globalPos)
const
218 for (
int i = 0; i < dim; i++)
220 if (globalPos[i] < lensTwoLowerLeft_[i] - eps_ || globalPos[i] > lensTwoUpperRight_[i] + eps_)
227 bool isLensThree(
const GlobalPosition& globalPos)
const
229 for (
int i = 0; i < dim; i++)
231 if (globalPos[i] < lensThreeLowerLeft_[i] - eps_ || globalPos[i] > lensThreeUpperRight_[i] + eps_)
241 FieldMatrix permBackground_;
242 FieldMatrix permLenses_;
243 GlobalPosition lensOneLowerLeft_;
244 GlobalPosition lensOneUpperRight_;
245 GlobalPosition lensTwoLowerLeft_;
246 GlobalPosition lensTwoUpperRight_;
247 GlobalPosition lensThreeLowerLeft_;
248 GlobalPosition lensThreeUpperRight_;
250 static constexpr Scalar eps_ = 1e-6;
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition propertysystemmacros.hh:283
#define NEW_TYPE_TAG(...)
Definition propertysystemmacros.hh:130
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
The base class for spatial parameters of problems using the fv method.
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition parameters.hh:428
#define SET_TYPE_PROP(EffTypeTagName, PropTagName,...)
Set a property which defines a type.
Definition propertysystemmacros.hh:232
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
Definition common/properties.hh:47
Type tag Test2PSpatialParams
Definition test_mpfa2pspatialparams.hh:40
Type tag for numeric models.
Definition grid.hh:35
The type of the spatial parameters object.
Definition common/properties.hh:221
This material law takes a material law defined for effective saturations and converts it to a materia...
Definition 2p/efftoabslaw.hh:60
Implementation of the regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition regularizedbrookscorey.hh:62
Definition sequentialfv.hh:34
SequentialFVSpatialParams(const Problem &problem)
Definition sequentialfv.hh:61
Test problem for the sequential 2p models.
Definition test_mpfa2pspatialparams.hh:63
typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw
Definition test_mpfa2pspatialparams.hh:81
Scalar porosity(const Element &element) const
Definition test_mpfa2pspatialparams.hh:96
Test2PSpatialParams(const Problem &problem)
Definition test_mpfa2pspatialparams.hh:120
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Definition test_mpfa2pspatialparams.hh:108
typename MaterialLaw::Params MaterialLawParams
Definition test_mpfa2pspatialparams.hh:82
const FieldMatrix & intrinsicPermeabilityAtPos(const GlobalPosition &globalPos) const
Definition test_mpfa2pspatialparams.hh:84
EffToAbsLaw< RawMaterialLaw > type
Definition test_mpfa2pspatialparams.hh:53
This material law takes a material law defined for effective saturations and converts it to a materia...