3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
multidomain/boundary/stokesdarcy/1p2c_2p2c/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_CONSERVATION_SPATIAL_PARAMS_HH
26#define DUMUX_CONSERVATION_SPATIAL_PARAMS_HH
27
32
33namespace Dumux
34{
35
41template<class GridGeometry, class Scalar>
43: public FVSpatialParams<GridGeometry, Scalar, TwoPTwoCSpatialParams<GridGeometry, Scalar>>
44{
45 using GridView = typename GridGeometry::GridView;
46 using Element = typename GridView::template Codim<0>::Entity;
47 using FVElementGeometry = typename GridGeometry::LocalView;
48 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
50
51 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
53
54public:
57 using PermeabilityType = Scalar;
58
59 TwoPTwoCSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
61 {
62 permeability_ = getParam<Scalar>("SpatialParams.Permeability");
63 porosity_ = getParam<Scalar>("SpatialParams.Porosity");
64 alphaBJ_ = getParam<Scalar>("SpatialParams.AlphaBJ");
65
66 // residual saturations
67 params_.setSwr(getParam<Scalar>("SpatialParams.Swr"));
68 params_.setSnr(getParam<Scalar>("SpatialParams.Snr"));
69 // parameters for the vanGenuchten law
70 params_.setVgAlpha(getParam<Scalar>("SpatialParams.VgAlpha"));
71 params_.setVgn(getParam<Scalar>("SpatialParams.VgN"));
72 }
73
80 PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const
81 { return permeability_; }
82
87 Scalar porosityAtPos(const GlobalPosition& globalPos) const
88 { return porosity_; }
89
94 Scalar beaversJosephCoeffAtPos(const GlobalPosition& globalPos) const
95 { return alphaBJ_; }
96
107 template<class ElementSolutionVector>
108 const MaterialLawParams& materialLawParams(const Element& element,
109 const SubControlVolume& scv,
110 const ElementSolutionVector& elemSol) const
111 { return params_; }
112
119 template<class FluidSystem>
120 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
121 { return FluidSystem::phase0Idx; }
122
123private:
124 Scalar permeability_;
125 Scalar porosity_;
126 Scalar alphaBJ_;
127 MaterialLawParams params_;
128 static constexpr Scalar eps_ = 1.0e-7;
129};
130
131} // end namespace Dumux
132
133#endif
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
Relation for the saturation-dependent effective thermal conductivity.
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 / relative permeability <-> satu...
Definition: regularizedvangenuchten.hh:71
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 class for the test problem using the 1p cc model.
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:44
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity in [-].
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:87
Scalar beaversJosephCoeffAtPos(const GlobalPosition &globalPos) const
Defines the Beavers-Joseph coefficient in [-].
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:94
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolutionVector &elemSol) const
Returns the parameter object for the Brooks-Corey material law.
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:108
TwoPTwoCSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:59
Scalar PermeabilityType
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:57
PermeabilityType permeabilityAtPos(const GlobalPosition &globalPos) const
Function for defining the (intrinsic) permeability .
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:80
typename MaterialLaw::Params MaterialLawParams
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:56
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: multidomain/boundary/stokesdarcy/1p2c_2p2c/spatialparams.hh:120
This material law takes a material law defined for effective saturations and converts it to a materia...