27#ifndef DUMUX_HETEROGENEOUS_SPATIAL_PARAMS_HH
28#define DUMUX_HETEROGENEOUS_SPATIAL_PARAMS_HH
45template<
class Gr
idGeometry,
class Scalar>
49 HeterogeneousSpatialParams<GridGeometry, Scalar>>
51 using Grid =
typename GridGeometry::Grid;
52 using GridView =
typename GridGeometry::GridView;
53 using FVElementGeometry =
typename GridGeometry::LocalView;
54 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
55 using Element =
typename GridView::template Codim<0>::Entity;
58 using GlobalPosition =
typename SubControlVolume::GlobalPosition;
74 barrierMiddleK_ = 1e-15;
78 barrierTopPorosity_ = 0.001;
79 barrierMiddlePorosity_ = 0.05;
80 reservoirPorosity_ = 0.2;
83 materialParams_.setSwr(0.2);
84 materialParams_.setSwr(0.05);
85 materialParams_.setLambda(2.0);
86 materialParams_.setPe(1e4);
95 paramIdx_.resize(gridView.size(0));
97 for (
const auto& element : elements(gridView))
99 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
100 paramIdx_[eIdx] = gridData_->parameters(element)[0];
114 template<
class ElementSolution>
116 const SubControlVolume& scv,
117 const ElementSolution& elemSol)
const
120 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
132 if (paramIdx_[eIdx] == barrierTop_)
134 else if (paramIdx_[eIdx] == barrierMiddle_)
135 return barrierMiddleK_;
149 template<
class Sol
idSystem,
class ElementSolution>
151 const SubControlVolume& scv,
152 const ElementSolution& elemSol,
156 const auto eIdx = this->
gridGeometry().elementMapper().index(element);
167 if (paramIdx_[eIdx] == barrierTop_)
168 return 1- barrierTopPorosity_;
169 else if (paramIdx_[eIdx] == barrierMiddle_)
170 return 1- barrierMiddlePorosity_;
172 return 1- reservoirPorosity_;
185 return materialParams_;
194 template<
class Flu
idSystem>
196 {
return FluidSystem::BrineIdx; }
200 std::shared_ptr<const GridData<Grid>> gridData_;
203 int barrierMiddle_ = 2;
206 Scalar barrierTopPorosity_;
207 Scalar barrierMiddlePorosity_;
208 Scalar reservoirPorosity_;
211 Scalar barrierMiddleK_;
215 std::vector<int> paramIdx_;
Class for grid data attached to dgf or gmsh grid files.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Class for grid data attached to dgf or gmsh grid files.
Definition: griddata.hh:66
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 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 of the spatial parameters for the heterogeneous problem which uses the non-isothermal or i...
Definition: porousmediumflow/co2/implicit/spatialparams.hh:50
Scalar inertVolumeFraction(std::size_t eIdx) const
Returns the porosity .
Definition: porousmediumflow/co2/implicit/spatialparams.hh:165
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/co2/implicit/spatialparams.hh:195
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/co2/implicit/spatialparams.hh:115
Scalar PermeabilityType
Definition: porousmediumflow/co2/implicit/spatialparams.hh:65
Scalar inertVolumeFraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
Returns the volume fraction of the inert component with index compIdx .
Definition: porousmediumflow/co2/implicit/spatialparams.hh:150
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/co2/implicit/spatialparams.hh:64
HeterogeneousSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry, std::shared_ptr< const GridData< Grid > > gridData)
Definition: porousmediumflow/co2/implicit/spatialparams.hh:67
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: porousmediumflow/co2/implicit/spatialparams.hh:183
void getParamsFromGrid()
Reads layer information from the grid.
Definition: porousmediumflow/co2/implicit/spatialparams.hh:92
PermeabilityType permeability(std::size_t eIdx) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/co2/implicit/spatialparams.hh:130
Adaption of the fully implicit scheme to the CO2Model model.
This material law takes a material law defined for effective saturations and converts it to a materia...