3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p2c/implicit/injection/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_PARAMS_HH
27#define DUMUX_INJECTION_SPATIAL_PARAMS_HH
28
33
34namespace Dumux {
35
41template<class GridGeometry, class Scalar>
43: public FVSpatialParams<GridGeometry, Scalar,
44 InjectionSpatialParams<GridGeometry, Scalar>>
45{
46 using GridView = typename GridGeometry::GridView;
47 using FVElementGeometry = typename GridGeometry::LocalView;
48 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
49 using Element = typename GridView::template Codim<0>::Entity;
51
52 static constexpr int dimWorld = GridView::dimensionworld;
53
55
56 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
57
58public:
60 using PermeabilityType = Scalar;
64
65 InjectionSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
67 {
68 layerBottom_ = 22.5;
69
70 // intrinsic permeabilities
71 fineK_ = 1e-13;
72 coarseK_ = 1e-12;
73
74 // porosities
75 finePorosity_ = 0.3;
76 coarsePorosity_ = 0.3;
77
78 // residual saturations
79 fineMaterialParams_.setSwr(0.2);
80 fineMaterialParams_.setSnr(0.0);
81 coarseMaterialParams_.setSwr(0.2);
82 coarseMaterialParams_.setSnr(0.0);
83
84 // parameters for the Brooks-Corey law
85 fineMaterialParams_.setPe(1e4);
86 coarseMaterialParams_.setPe(1e4);
87 fineMaterialParams_.setLambda(2.0);
88 coarseMaterialParams_.setLambda(2.0);
89 }
90
96 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
97 {
98 if (isFineMaterial_(globalPos))
99 return fineK_;
100 return coarseK_;
101 }
102
108 Scalar porosityAtPos(const GlobalPosition& globalPos) const
109 {
110 if (isFineMaterial_(globalPos))
111 return finePorosity_;
112 return coarsePorosity_;
113 }
114
115
122 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
123 {
124 if (isFineMaterial_(globalPos))
125 return fineMaterialParams_;
126 return coarseMaterialParams_;
127 }
128
135 template<class FluidSystem>
136 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
137 { return FluidSystem::H2OIdx; }
138
139private:
140 bool isFineMaterial_(const GlobalPosition &globalPos) const
141 { return globalPos[dimWorld-1] > layerBottom_; }
142
143 Scalar fineK_;
144 Scalar coarseK_;
145 Scalar layerBottom_;
146
147 Scalar finePorosity_;
148 Scalar coarsePorosity_;
149
150 MaterialLawParams fineMaterialParams_;
151 MaterialLawParams coarseMaterialParams_;
152};
153
154} // end namespace Dumux
155
156#endif
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
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 injection problem which uses the isothermal two-phase tw...
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:45
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:136
InjectionSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:65
Scalar PermeabilityType
Export the type used for the permeability.
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:60
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameter object for the capillary-pressure/ saturation material law.
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:122
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Returns the porosity .
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:108
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:63
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
Returns the intrinsic permeability tensor .
Definition: porousmediumflow/2p2c/implicit/injection/spatialparams.hh:96
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...