26#ifndef DUMUX_EVAPORATION_ATMOSPHERE_SPATIALPARAMS_HH
27#define DUMUX_EVAPORATION_ATMOSPHERE_SPATIALPARAMS_HH
49template<
class Gr
idGeometry,
class Scalar>
52 EvaporationAtmosphereSpatialParams<GridGeometry, Scalar>>
54 using GridView =
typename GridGeometry::GridView;
55 using FVElementGeometry =
typename GridGeometry::LocalView;
56 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
57 using Element =
typename GridView::template Codim<0>::Entity;
61 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
63 static constexpr auto dimWorld = GridView::dimensionworld;
87 heightPM_ = getParam<std::vector<Scalar>>(
"Grid.Positions1")[1];
88 heightDomain_ = getParam<std::vector<Scalar>>(
"Grid.Positions1")[2];
90 porosityPM_ = getParam<Scalar>(
"SpatialParams.PorousMedium.porosity");
91 intrinsicPermeabilityPM_ = getParam<Scalar>(
"SpatialParams.PorousMedium.permeability");
93 porosityFF_ = getParam<Scalar>(
"SpatialParams.FreeFlow.porosity");
94 intrinsicPermeabilityFF_ = getParam<Scalar>(
"SpatialParams.FreeFlow.permeability");
96 aWettingNonWettingA1_ = getParam<Scalar>(
"SpatialParams.soil.aWettingNonWettingA1");
97 aWettingNonWettingA2_ = getParam<Scalar>(
"SpatialParams.soil.aWettingNonWettingA2");
98 aWettingNonWettingA3_ = getParam<Scalar>(
"SpatialParams.soil.aWettingNonWettingA3");
100 aNonWettingSolidA1_ = getParam<Scalar>(
"SpatialParams.soil.aNonWettingSolidA1");
101 aNonWettingSolidA2_ = getParam<Scalar>(
"SpatialParams.soil.aNonWettingSolidA2");
102 aNonWettingSolidA3_ = getParam<Scalar>(
"SpatialParams.soil.aNonWettingSolidA3");
104 BCPd_ = getParam<Scalar>(
"SpatialParams.soil.BCPd");
105 BClambda_ = getParam<Scalar>(
"SpatialParams.soil.BClambda");
106 Swr_ = getParam<Scalar>(
"SpatialParams.soil.Swr");
107 Snr_ = getParam<Scalar>(
"SpatialParams.soil.Snr");
109 characteristicLengthFF_ = getParam<Scalar>(
"SpatialParams.FreeFlow.meanPoreSize");
110 characteristicLengthPM_ = getParam<Scalar>(
"SpatialParams.PorousMedium.meanPoreSize");
112 factorEnergyTransfer_ = getParam<Scalar>(
"SpatialParams.PorousMedium.factorEnergyTransfer");
113 factorMassTransfer_ = getParam<Scalar>(
"SpatialParams.PorousMedium.factorMassTransfer");
116 materialParamsFF_.setSwr(0.0);
117 materialParamsFF_.setSnr(0.00);
119 materialParamsPM_.setSwr(Swr_);
120 materialParamsPM_.setSnr(Snr_);
123 materialParamsPM_.setLambda(BClambda_);
124 materialParamsPM_.setPe(BCPd_);
127 materialParamsFF_.setLambda(42.);
128 materialParamsFF_.setPe(0.);
140 const auto pcMax = TwoPLaw::pc(materialParamsPM_, 0.0);
141 aWettingNonWettingSurfaceParams_.setPcMax(pcMax);
144 aWettingNonWettingSurfaceParams_.setA1(aWettingNonWettingA1_);
145 aWettingNonWettingSurfaceParams_.setA2(aWettingNonWettingA2_);
146 aWettingNonWettingSurfaceParams_.setA3(aWettingNonWettingA3_);
149 aNonWettingSolidSurfaceParams_.setA1(aNonWettingSolidA1_);
150 aNonWettingSolidSurfaceParams_.setA2(aNonWettingSolidA2_);
151 aNonWettingSolidSurfaceParams_.setA3(aNonWettingSolidA3_);
154 aWettingNonWettingSurfaceParamsFreeFlow_.setA1(0.);
155 aWettingNonWettingSurfaceParamsFreeFlow_.setA2(0.);
156 aWettingNonWettingSurfaceParamsFreeFlow_.setA3(0.);
157 aWettingNonWettingSurfaceParamsFreeFlow_.setPcMax(42.);
160 aNonWettingSolidSurfaceParamsFreeFlow_.setA1(0.);
161 aNonWettingSolidSurfaceParamsFreeFlow_.setA2(0.);
162 aNonWettingSolidSurfaceParamsFreeFlow_.setA3(0.);
165 template<
class ElementSolution>
167 const SubControlVolume& scv,
168 const ElementSolution& elemSol)
const
170 const auto & globalPos = scv.dofPosition();
171 if (
inFF_(globalPos))
172 return intrinsicPermeabilityFF_ ;
173 else if (
inPM_(globalPos))
174 return intrinsicPermeabilityPM_ ;
176 DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
188 template<
class ElementSolution>
190 const SubControlVolume& scv,
191 const ElementSolution& elemSol)
const
193 const auto& globalPos = scv.dofPosition();
195 if (
inFF_(globalPos))
197 else if (
inPM_(globalPos))
200 DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
203 template<
class ElementSolution>
205 const SubControlVolume& scv,
206 const ElementSolution& elemSol)
const
211 if (
inFF_(globalPos))
212 return materialParamsFF_;
213 else if (
inPM_(globalPos))
214 return materialParamsPM_;
215 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
228 template<
class ElementSolution>
230 const SubControlVolume &scv,
231 const ElementSolution &elemSol)
const
233 const auto& globalPos = scv.dofPosition();
234 if (
inFF_(globalPos) )
235 return aWettingNonWettingSurfaceParamsFreeFlow_ ;
236 else if (
inPM_(globalPos))
237 return aWettingNonWettingSurfaceParams_ ;
238 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
250 template<
class ElementSolution>
252 const SubControlVolume &scv,
253 const ElementSolution &elemSol)
const
255 const auto& globalPos = scv.dofPosition();
256 if (
inFF_(globalPos) )
257 return aNonWettingSolidSurfaceParamsFreeFlow_ ;
258 else if (
inPM_(globalPos))
259 return aNonWettingSolidSurfaceParams_ ;
260 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
272 template<
class ElementSolution>
274 const SubControlVolume &scv,
275 const ElementSolution &elemSol)
const
277 DUNE_THROW(Dune::NotImplemented,
"wetting-solid-interface surface params");
286 if (
inFF_(globalPos) )
287 return characteristicLengthFF_ ;
288 else if (
inPM_(globalPos))
289 return characteristicLengthPM_ ;
290 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
299 if (
inFF_(globalPos) )
300 return factorEnergyTransfer_ ;
301 else if (
inPM_(globalPos))
302 return factorEnergyTransfer_ ;
303 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
312 if (
inFF_(globalPos) )
313 return factorMassTransfer_ ;
314 else if (
inPM_(globalPos))
315 return factorMassTransfer_ ;
316 else DUNE_THROW(Dune::InvalidStateException,
"You should not be here: x=" << globalPos[0] <<
" y= "<< globalPos[dimWorld-1]);
325 template<
class Flu
idSystem>
328 return FluidSystem::phase0Idx;
344 bool inPM_(
const GlobalPosition & globalPos)
const
345 {
return ( (globalPos[dimWorld-1] > 0. - eps_) and (globalPos[dimWorld-1] < (heightPM_ + eps_) ) ); }
360 bool inFF_(
const GlobalPosition & globalPos)
const
361 {
return ( (globalPos[dimWorld-1] < heightDomain_ + eps_) and (globalPos[dimWorld-1] > (heightPM_ + eps_) ) ); }
365 {
return heightPM_; }
368 static constexpr Scalar eps_ = 1e-6;
369 Scalar heightDomain_ ;
377 Scalar intrinsicPermeabilityPM_ ;
380 Scalar factorEnergyTransfer_ ;
381 Scalar factorMassTransfer_ ;
382 Scalar characteristicLengthPM_ ;
387 Scalar intrinsicPermeabilityFF_ ;
388 Scalar characteristicLengthFF_ ;
392 Scalar aWettingNonWettingA1_ ;
393 Scalar aWettingNonWettingA2_ ;
394 Scalar aWettingNonWettingA3_ ;
396 Scalar aNonWettingSolidA1_;
397 Scalar aNonWettingSolidA2_;
398 Scalar aNonWettingSolidA3_;
405 std::vector<Scalar> gridVector_;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Linear capillary pressure and relative permeability <-> saturation relations.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
This material law takes a material law (interfacial area surface) defined for effective saturations a...
Base class for spatial parameters dealing with thermal and chemical non-equilibrium.
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 a exponential function relating specific interfacial area to wetting phase saturati...
Definition: awnsurfaceexpswpcto3.hh:43
Implementation of an interfacial area surface.
Definition: awnsurfacepcmaxfct.hh:44
Implementation of the polynomial of second order relating specific interfacial area to wetting phase ...
Definition: awnsurfacepolynomial2ndorder.hh:43
This material law takes a material law (interfacial area surface) defined for effective saturations a...
Definition: efftoabslawia.hh:63
InterfacialAreaAbsParamsT Params
Definition: efftoabslawia.hh:68
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition of the spatial parameters for non-equilibrium.
Definition: fvnonequilibrium.hh:39
Definition of the spatial parameters for the evaporation atmosphere Problem (using a "poor man's coup...
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:53
bool inFF_(const GlobalPosition &globalPos) const
Returns whether the tested position is above PM / "free flow" in the domain.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:360
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:326
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:209
const Scalar heightPM() const
access function for the depth / height of the porous medium
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:364
const AwnSurfaceParams & aWettingNonWettingSurfaceParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns a reference to the container object for the parametrization of the surface between wetting an...
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:229
const Scalar factorMassTransferAtPos(const GlobalPosition &globalPos) const
Return the pre factor the the mass transfer.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:310
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:204
typename AwsSurface::Params AwsSurfaceParams
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:81
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:166
EvaporationAtmosphereSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:84
const AnsSurfaceParams & aNonWettingSolidSurfaceParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns a reference to the container object for the parametrization of the surface between non-Wettin...
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:251
const AwsSurfaceParams & aWettingSolidSurfaceParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns a reference to the container object for the parametrization of the surface between wetting an...
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:273
const Scalar characteristicLengthAtPos(const GlobalPosition &globalPos) const
Returns the characteristic length for the mass transfer.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:284
typename AwnSurface::Params AwnSurfaceParams
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:80
const Scalar factorEnergyTransferAtPos(const GlobalPosition &globalPos) const
Return the pre factor the the energy transfer.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:297
Scalar PermeabilityType
Export the type used for the permeability.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:66
bool inPM_(const GlobalPosition &globalPos) const
Returns whether the tested position is in the porous medium part of the domain.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:344
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the porosity. That is possibly solution dependent.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:189
typename MaterialLaw::Params MaterialLawParams
Convenience aliases of the law parameters.
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:70
typename AnsSurface::Params AnsSurfaceParams
Definition: porousmediumflow/mpnc/implicit/kinetic/spatialparams.hh:82
Defines a type tag and some properties for models using the box scheme.
This material law takes a material law defined for effective saturations and converts it to a materia...