3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/3p3c/implicit/kuevette/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_KUEVETTE3P3CNI_SPATIAL_PARAMS_HH
26#define DUMUX_KUEVETTE3P3CNI_SPATIAL_PARAMS_HH
27
28#include <dune/common/float_cmp.hh>
29
35
36namespace Dumux {
37
42template<class GridGeometry, class Scalar>
44: public FVSpatialParams<GridGeometry, Scalar,
45 KuevetteSpatialParams<GridGeometry, Scalar>>
46{
47 using GridView = typename GridGeometry::GridView;
48 using FVElementGeometry = typename GridGeometry::LocalView;
49 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
50
51 using Element = typename GridView::template Codim<0>::Entity;
52 using ParentType = FVSpatialParams<GridGeometry, Scalar,
54
55 using GlobalPosition = typename SubControlVolume::GlobalPosition;
56
58
59public:
62 using PermeabilityType = Scalar;
63
64 KuevetteSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
66 {
67 // intrinsic permeabilities
68 fineK_ = 6.28e-12;
69 coarseK_ = 9.14e-10;
70
71 // porosities
72 finePorosity_ = 0.42;
73 coarsePorosity_ = 0.42;
74
75 // residual saturations
76 fineMaterialParams_.setSwr(0.12);
77 fineMaterialParams_.setSnr(0.07);
78 fineMaterialParams_.setSgr(0.01);
79 coarseMaterialParams_.setSwr(0.12);
80 coarseMaterialParams_.setSnr(0.07);
81 coarseMaterialParams_.setSgr(0.01);
82
83 // parameters for the 3phase van Genuchten law
84 fineMaterialParams_.setVgAlpha(0.0005);
85 coarseMaterialParams_.setVgAlpha(0.005);
86 fineMaterialParams_.setVgn(4.0);
87 coarseMaterialParams_.setVgn(4.0);
88
89 coarseMaterialParams_.setKrRegardsSnr(true);
90 fineMaterialParams_.setKrRegardsSnr(true);
91
92 // parameters for adsorption
93 coarseMaterialParams_.setKdNAPL(0.);
94 coarseMaterialParams_.setRhoBulk(1500.);
95 fineMaterialParams_.setKdNAPL(0.);
96 fineMaterialParams_.setRhoBulk(1500.);
97 }
98
108 template<class ElementSolution>
109 PermeabilityType permeability(const Element& element,
110 const SubControlVolume& scv,
111 const ElementSolution& elemSol) const
112 {
113 const auto& globalPos = scv.dofPosition();
114 if (isFineMaterial_(globalPos))
115 return fineK_;
116 return coarseK_;
117 }
118
124 Scalar porosityAtPos(const GlobalPosition& globalPos) const
125 {
126 if (isFineMaterial_(globalPos))
127 return finePorosity_;
128 else
129 return coarsePorosity_;
130 }
131
132
141 template<class ElementSolution>
142 const MaterialLawParams& materialLawParams(const Element& element,
143 const SubControlVolume& scv,
144 const ElementSolution& elemSol) const
145 {
146 const auto& globalPos = scv.dofPosition();
147 if (isFineMaterial_(globalPos))
148 return fineMaterialParams_;
149 else
150 return coarseMaterialParams_;
151 }
152
153private:
154 bool isFineMaterial_(const GlobalPosition &globalPos) const
155 {
156 return ((Dune::FloatCmp::ge<Scalar>(globalPos[0], 0.13)
157 && Dune::FloatCmp::le<Scalar>(globalPos[0], 1.24)
158 && Dune::FloatCmp::ge<Scalar>(globalPos[1], 0.32)
159 && Dune::FloatCmp::le<Scalar>(globalPos[1], 0.60))
160 || (Dune::FloatCmp::ge<Scalar>(globalPos[0], 1.20)
161 && Dune::FloatCmp::le<Scalar>(globalPos[1], 0.15)));
162 }
163
164 Scalar fineK_;
165 Scalar coarseK_;
166
167 Scalar finePorosity_;
168 Scalar coarsePorosity_;
169
170 MaterialLawParams fineMaterialParams_;
171 MaterialLawParams coarseMaterialParams_;
172
173};
174
175} // end namespace Dumux
176
177#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 kuevette problem.
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:46
Scalar PermeabilityType
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:62
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/3p3c/implicit/kuevette/spatialparams.hh:142
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Define the porosity of the spatial parameters.
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:124
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:109
KuevetteSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:64
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/3p3c/implicit/kuevette/spatialparams.hh:61
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...