3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2pnc/implicit/diffusion/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 *****************************************************************************/
26#ifndef DUMUX_TWOPNC_DIFFUSION_SPATIAL_PARAMS_HH
27#define DUMUX_TWOPNC_DIFFUSION_SPATIAL_PARAMS_HH
28
35
36namespace Dumux {
42template<class GridGeometry, class Scalar>
44: public FVSpatialParams<GridGeometry, Scalar,
45 TwoPNCDiffusionSpatialParams<GridGeometry, Scalar>>
46{
47 using GridView = typename GridGeometry::GridView;
48 using ParentType = FVSpatialParams<GridGeometry, Scalar,
50
51 static constexpr int dimWorld = GridView::dimensionworld;
52
53 using Element = typename GridView::template Codim<0>::Entity;
54 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
55
56 using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
57
59
60public:
61 using PermeabilityType = DimWorldMatrix;
62
65
66 TwoPNCDiffusionSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
67 : ParentType(gridGeometry), K_(0)
68 {
69 // intrinsic permeabilities
70 K_[0][0] = 5e-11;
71 K_[1][1] = 5e-11;
72
73 // porosities
74 porosity_ = 0.2;
75
76 // residual saturations
77 materialParams_.setSwr(0.02);
78 materialParams_.setSnr(0.0);
79
80 // parameters for the vanGenuchten law
81 materialParams_.setPe(1e2); // alpha = 1/pcb
82 materialParams_.setLambda(1.3);
83 }
84
90 DimWorldMatrix permeabilityAtPos(const GlobalPosition& globalPos) const
91 { return K_; }
92
98 Scalar porosityAtPos(const GlobalPosition& globalPos) const
99 { return 0.2; }
100
107 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
108 { return materialParams_; }
109
116 template<class FluidSystem>
117 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
118 { return FluidSystem::H2OIdx; }
119
120private:
121 DimWorldMatrix K_;
122 Scalar porosity_;
123 static constexpr Scalar eps_ = 1e-6;
124 MaterialLawParams materialParams_;
125};
126
127} // end namespace Dumux
128
129#endif
Linear capillary pressure and relative permeability <-> saturation relations.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
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
Implementation of the regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition: regularizedbrookscorey.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 TwoPNCDiffusion problem which uses the isothermal 2p2c b...
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:46
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameter object for the Brooks-Corey material law which depends on the position.
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:107
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity of the spatial parameters.
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:98
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:64
TwoPNCDiffusionSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:66
DimWorldMatrix PermeabilityType
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:61
DimWorldMatrix permeabilityAtPos(const GlobalPosition &globalPos) const
Returns the hydraulic conductivity .
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:90
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2pnc/implicit/diffusion/spatialparams.hh:117
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...