3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/3pwateroil/implicit/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 *****************************************************************************/
25#ifndef DUMUX_SAGD_SPATIAL_PARAMS_HH
26#define DUMUX_SAGD_SPATIAL_PARAMS_HH
27
30
32
36
37namespace Dumux {
38
43template<class GridGeometry, class Scalar>
45: public FVSpatialParams<GridGeometry, Scalar,
46 SagdSpatialParams<GridGeometry, Scalar>>
47{
48 using GridView = typename GridGeometry::GridView;
49 using FVElementGeometry = typename GridGeometry::LocalView;
50 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
51
52 enum { dimWorld=GridView::dimensionworld };
53
54 using GlobalPosition = typename SubControlVolume::GlobalPosition;
55
56 using Element = typename GridView::template Codim<0>::Entity;
57 using ParentType = FVSpatialParams<GridGeometry, Scalar,
59
61
62public:
65 using PermeabilityType = Scalar;
66
67 SagdSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
68 : ParentType(gridGeometry), eps_(1e-6)
69 {
70 layerBottom_ = 35.0;
71
72 // intrinsic permeabilities
73 fineK_ = 1e-16;
74 coarseK_ = 4e-14;
75
76 // porosities
77 finePorosity_ = 0.10;
78 coarsePorosity_ = 0.1;
79
80 // residual saturations
81 fineMaterialParams_.setSwr(0.1);
82 fineMaterialParams_.setSnr(0.09); //Residual of NAPL if there is no water
83 fineMaterialParams_.setSgr(0.01);
84 coarseMaterialParams_.setSwr(0.1);
85 coarseMaterialParams_.setSnr(0.09);
86 coarseMaterialParams_.setSgr(0.01);
87
88 // parameters for the 3phase van Genuchten law
89 fineMaterialParams_.setVgn(4.0);
90 coarseMaterialParams_.setVgn(4.0);
91 fineMaterialParams_.setVgAlpha(1.);
92 coarseMaterialParams_.setVgAlpha(1.);
93
94 coarseMaterialParams_.setKrRegardsSnr(false);
95 fineMaterialParams_.setKrRegardsSnr(false);
96 }
97
107 template<class ElementSolution>
108 PermeabilityType permeability(const Element& element,
109 const SubControlVolume& scv,
110 const ElementSolution& elemSol) const
111 { return permeabilityAtPos(scv.dofPosition());}
112
118 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
119 {
120 if (isFineMaterial_(globalPos))
121 return fineK_;
122 return coarseK_;
123 }
124
130 Scalar porosityAtPos(const GlobalPosition& globalPos) const
131 {
132 if (isFineMaterial_(globalPos))
133 return finePorosity_;
134 else
135 return coarsePorosity_;
136 }
137
146 template<class ElementSolution>
147 const MaterialLawParams& materialLawParams(const Element& element,
148 const SubControlVolume& scv,
149 const ElementSolution& elemSol) const
150 {
151 return materialLawParamsAtPos(scv.dofPosition());
152 }
153
160 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
161 {
162 if (isFineMaterial_(globalPos))
163 return fineMaterialParams_;
164 else
165 return coarseMaterialParams_;
166 }
167
168
169private:
170 bool isFineMaterial_(const GlobalPosition &pos) const
171 {
172 return pos[dimWorld-1] > layerBottom_ - eps_;
173 };
174
175 Scalar layerBottom_;
176
177 Scalar fineK_;
178 Scalar coarseK_;
179
180 Scalar finePorosity_;
181 Scalar coarsePorosity_;
182
183 MaterialLawParams fineMaterialParams_;
184 MaterialLawParams coarseMaterialParams_;
185
186 Scalar eps_;
187};
188
189}
190
191#endif
Implementation of a regularized version of van Genuchten's capillary pressure-saturation relation for...
Parameters that are necessary for the regularization of the Parker - Van Genuchten capillary pressure...
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 van Genuchten's capillary pressure <-> saturation relation....
Definition: regularizedparkervangen3p.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 SAGD problem.
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:47
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:64
Scalar PermeabilityType
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:65
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Returns the porosity .
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:130
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:108
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:147
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameter object for the capillary-pressure/ saturation material law.
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:160
SagdSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:67
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
Returns the intrinsic permeability tensor .
Definition: porousmediumflow/3pwateroil/implicit/spatialparams.hh:118
Defines a type tag and some properties for models using the box scheme.
Defines the indices required for the 3p2cni model.
This material law takes a material law defined for effective saturations and converts it to a materia...