3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/richardsnc/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_RICHARDS_LENS_SPATIAL_PARAMETERS_HH
26#define DUMUX_RICHARDS_LENS_SPATIAL_PARAMETERS_HH
27
31
33
36
37namespace Dumux {
38
44template<class GridGeometry, class Scalar>
46: public FVSpatialParams<GridGeometry, Scalar,
47 RichardsWellTracerSpatialParams<GridGeometry, Scalar>>
48{
49 using GridView = typename GridGeometry::GridView;
50 using ParentType = FVSpatialParams<GridGeometry, Scalar,
52
53 enum { dimWorld=GridView::dimensionworld };
54 using Element = typename GridView::template Codim<0>::Entity;
55 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
56
58
59public:
62 // export permeability type
63 using PermeabilityType = Scalar;
64
65 RichardsWellTracerSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
67 {
68
69 lensLowerLeft_ = getParam<GlobalPosition>("Problem.LensLowerLeft");
70 lensUpperRight_ = getParam<GlobalPosition>("Problem.LensUpperRight");
71
72 // residual saturations
73 lensMaterialParams_.setSwr(0.18);
74 lensMaterialParams_.setSnr(0.0);
75 outerMaterialParams_.setSwr(0.05);
76 outerMaterialParams_.setSnr(0.0);
77
78 // parameters for the Van Genuchten law
79 // alpha and n
80 lensMaterialParams_.setVgAlpha(0.00045);
81 lensMaterialParams_.setVgn(7.3);
82 outerMaterialParams_.setVgAlpha(0.0037);
83 outerMaterialParams_.setVgn(4.7);
84
85 lensMaterialParams_.setVgn(7.3);
86 outerMaterialParams_.setVgAlpha(0.0037);
87
88 lensK_ = 1e-14;
89 outerK_ = 5e-12;
90 }
91
97 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
98 {
99 if (isInLens_(globalPos))
100 return lensK_;
101 return outerK_;
102 }
103
109 Scalar porosityAtPos(const GlobalPosition& globalPos) const
110 {
111 if (isInLens_(globalPos))
112 return 0.2;
113 return 0.4;
114 }
115
121 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition &globalPos) const
122 {
123 if (isInLens_(globalPos))
124 return lensMaterialParams_;
125 return outerMaterialParams_;
126 }
127
128private:
129 bool isInLens_(const GlobalPosition &globalPos) const
130 {
131 for (int i = 0; i < dimWorld; ++i)
132 if (globalPos[i] < lensLowerLeft_[i] - eps_ || globalPos[i] > lensUpperRight_[i] + eps_)
133 return false;
134
135 return true;
136 }
137
138 static constexpr Scalar eps_ = 1.5e-7;
139
140 GlobalPosition lensLowerLeft_;
141 GlobalPosition lensUpperRight_;
142
143 Scalar lensK_;
144 Scalar outerK_;
145 MaterialLawParams lensMaterialParams_;
146 MaterialLawParams outerMaterialParams_;
147};
148
149} // end namespace Dumux
150
151#endif
Interface for passing data sets to a file and plotting them, if gnuplot is installed.
Interface for plotting the two-phase fluid-matrix-interaction laws.
Implementation of the capillary pressure and relative permeability <-> saturation relations according...
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 van Genuchten capillary pressure <-> saturation relation. This class bundles th...
Definition: vangenuchten.hh:49
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
The spatial parameters for the RichardsWellTracerProblem.
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:48
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Returns the porosity [] at a given location.
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:109
RichardsWellTracerSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:65
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
Returns the intrinsic permeability tensor [m^2] at a given location.
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:97
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameters for the material law at a given location.
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:121
Scalar PermeabilityType
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:63
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/richardsnc/implicit/spatialparams.hh:61
This model implements a variant of the Richards' equation for quasi-twophase flow.
This material law takes a material law defined for effective saturations and converts it to a materia...