3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
1p_richards/spatialparams_soil.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_SOIL_SPATIAL_PARAMS_HH
26#define DUMUX_SOIL_SPATIAL_PARAMS_HH
27
32
33namespace Dumux {
34
39template<class GridGeometry, class Scalar>
40class SoilSpatialParams
41: public FVSpatialParams<GridGeometry,Scalar, SoilSpatialParams<GridGeometry, Scalar>>
42{
43 using ThisType = SoilSpatialParams<GridGeometry, Scalar>;
44 using ParentType = FVSpatialParams<GridGeometry, Scalar, ThisType>;
45 using GridView = typename GridGeometry::GridView;
46 using Element = typename GridView::template Codim<0>::Entity;
47 using SubControlVolume = typename GridGeometry::SubControlVolume;
48 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
49
50public:
51 // export permeability type
52 using PermeabilityType = Scalar;
53 // export material law type
55 // export material law params
57
58 SoilSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
60 {
61 // residual saturations
62 materialParams_.setSwr(0.05);
63 materialParams_.setSnr(0.0);
64
65 // parameters for the Van Genuchten law
66 // alpha and n
67 materialParams_.setVgAlpha(2.956e-4);
68 materialParams_.setVgn(1.5);
69
70 // perm and poro
71 permeability_ = getParam<Scalar>("Soil.SpatialParams.Permeability");
72 porosity_ = getParam<Scalar>("Soil.SpatialParams.Porosity");
73 }
74
82 template<class ElementSolution>
83 PermeabilityType permeability(const Element& element,
84 const SubControlVolume& scv,
85 const ElementSolution& elemSol) const
86 {
87 return permeability_;
88 }
89
97 template<class ElementSolution>
98 Scalar porosity(const Element& element,
99 const SubControlVolume& scv,
100 const ElementSolution& elemSol) const
101 {
102 return porosity_;
103 }
104
113 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition &globalPos) const
114 { return materialParams_; }
115
116private:
117 MaterialLawParams materialParams_;
118 Scalar permeability_;
119 Scalar porosity_;
120};
121
122} // end namespace Dumux
123
124#endif
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
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
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
typename MaterialLaw::Params MaterialLawParams
Definition: 1p2c_richards2c/spatialparams_soil.hh:56
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Defines the porosity .
Definition: 1p_richards/spatialparams_soil.hh:98
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameters for the material law at a given location.
Definition: 1p_richards/spatialparams_soil.hh:113
Scalar PermeabilityType
Definition: 1p2c_richards2c/spatialparams_soil.hh:52
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Defines the intrinsic permeability .
Definition: 1p_richards/spatialparams_soil.hh:83
SoilSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: 1p_richards/spatialparams_soil.hh:58
This material law takes a material law defined for effective saturations and converts it to a materia...