3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
26#ifndef DUMUX_INJECTION_SPATIAL_PARAMETERS_HH
27#define DUMUX_INJECTION_SPATIAL_PARAMETERS_HH
28
35
36namespace Dumux {
37
43template<class GridGeometry, class Scalar>
45: public FVSpatialParams<GridGeometry, Scalar,
46 DissolutionSpatialParams<GridGeometry, Scalar>>
47{
48 using GridView = typename GridGeometry::GridView;
49 using FVElementGeometry = typename GridGeometry::LocalView;
50 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
51 using Element = typename GridView::template Codim<0>::Entity;
52
53 using ParentType = FVSpatialParams<GridGeometry, Scalar,
55
57
58 using GlobalPosition = typename SubControlVolume::GlobalPosition;
59
60public:
61 // type used for the permeability (i.e. tensor or scalar)
62 using PermeabilityType = Scalar;
66
67 DissolutionSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
69 {
70 solubilityLimit_ = getParam<Scalar>("SpatialParams.SolubilityLimit", 0.26);
71 referencePorosity_ = getParam<Scalar>("SpatialParams.referencePorosity", 0.11);
72 referencePermeability_ = getParam<Scalar>("SpatialParams.referencePermeability", 2.23e-14);
73 irreducibleLiqSat_ = getParam<Scalar>("SpatialParams.IrreducibleLiqSat", 0.2);
74 irreducibleGasSat_ = getParam<Scalar>("SpatialParams.IrreducibleGasSat", 1e-3);
75 pEntry1_ = getParam<Scalar>("SpatialParams.Pentry1", 500);
76 bcLambda1_ = getParam<Scalar>("SpatialParams.BCLambda1", 2);
77
78 // residual saturations
79 materialParams_.setSwr(irreducibleLiqSat_);
80 materialParams_.setSnr(irreducibleGasSat_);
81
82 // parameters of Brooks & Corey Law
83 materialParams_.setPe(pEntry1_);
84 materialParams_.setLambda(bcLambda1_);
85 }
86
93 Scalar minimalPorosity(const Element& element, const SubControlVolume &scv) const
94 { return 1e-5; }
95
102 template<class SolidSystem>
103 Scalar inertVolumeFractionAtPos(const GlobalPosition& globalPos, int compIdx) const
104 { return 1.0-referencePorosity_; }
105
115 Scalar referencePorosity(const Element& element, const SubControlVolume &scv) const
116 { return referencePorosity_; }
117
127 template<class ElementSolution>
128 PermeabilityType permeability(const Element& element,
129 const SubControlVolume& scv,
130 const ElementSolution& elemSol) const
131 {
132 auto priVars = evalSolution(element, element.geometry(), elemSol, scv.center(), /*ignoreState=*/true);
133
134 Scalar sumPrecipitates = priVars[/*numComp*/3];
135
136 using std::max;
137 const auto poro = max(/*minPoro*/1e-5, referencePorosity_ - sumPrecipitates);
138 return permLaw_.evaluatePermeability(referencePermeability_, referencePorosity_, poro);
139 }
140
141 Scalar solubilityLimit() const
142 { return solubilityLimit_; }
143
144 Scalar theta(const SubControlVolume &scv) const
145 { return 10.0; }
146
147 // return the brooks-corey context depending on the position
148 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
149 { return materialParams_; }
150
151 // define which phase is to be considered as the wetting phase
152 template<class FluidSystem>
153 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
154 { return FluidSystem::H2OIdx; }
155
156private:
157
158 MaterialLawParams materialParams_;
159
161
162 Scalar solubilityLimit_;
163 Scalar referencePorosity_;
164 PermeabilityType referencePermeability_ = 0.0;
165 Scalar irreducibleLiqSat_;
166 Scalar irreducibleGasSat_;
167 Scalar pEntry1_;
168 Scalar bcLambda1_;
169};
170
171} // end namespace Dumux
172
173#endif
Linear capillary pressure and relative permeability <-> saturation relations.
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.
Class for the evaluation of the porosity subject to precipitation.
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
PrimaryVariables evalSolution(const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const BoxElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
Interpolates a given box element solution at a given global position. Uses the finite element cache o...
Definition: evalsolution.hh:95
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
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
Spatial parameters for the dissolution problem where water is injected in a for flushing precipitated...
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:47
Scalar solubilityLimit() const
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:141
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:153
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:128
Scalar inertVolumeFractionAtPos(const GlobalPosition &globalPos, int compIdx) const
Defines the volume fraction of the inert component.
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:103
Scalar referencePorosity(const Element &element, const SubControlVolume &scv) const
Defines the reference porosity distribution.
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:115
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:65
Scalar PermeabilityType
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:62
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:148
Scalar theta(const SubControlVolume &scv) const
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:144
DissolutionSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:67
Scalar minimalPorosity(const Element &element, const SubControlVolume &scv) const
Defines the minimum porosity distribution.
Definition: porousmediumflow/2pncmin/implicit/isothermal/spatialparams.hh:93
This material law takes a material law defined for effective saturations and converts it to a materia...