3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p1c/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_STEAMINJECTION_SPATIAL_PARAMS_HH
26#define DUMUX_STEAMINJECTION_SPATIAL_PARAMS_HH
27
32
33namespace Dumux {
38template<class GridGeometry, class Scalar>
40: public FVSpatialParams<GridGeometry, Scalar,
41 InjectionProblemSpatialParams<GridGeometry, Scalar>>
42{
43 using GridView = typename GridGeometry::GridView;
44 using FVElementGeometry = typename GridGeometry::LocalView;
45 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
46 using Element = typename GridView::template Codim<0>::Entity;
47 using ParentType = FVSpatialParams<GridGeometry, Scalar,
49
50 static constexpr int dimWorld = GridView::dimensionworld;
51
52 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
53
54 using DimWorldMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
55
57
58public:
61 using PermeabilityType = DimWorldMatrix;
62
63 InjectionProblemSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
65 {
66 gasWetting_ = getParam<bool>("SpatialParams.GasWetting", false);
67
68 // set Van Genuchten Parameters
69 materialParams_.setSwr(0.1);
70 materialParams_.setSnr(0.0);
71 materialParams_.setVgAlpha(0.0028);
72 materialParams_.setVgn(2.0);
73 }
74
80 DimWorldMatrix permeabilityAtPos(const GlobalPosition& globalPos) const
81 {
82 DimWorldMatrix permMatrix(0.0);
83
84 // intrinsic permeability
85 permMatrix[0][0] = 1e-9;
86 permMatrix[1][1] = 1e-9;
87
88 return permMatrix; //default value
89 }
90
96 Scalar porosityAtPos(const GlobalPosition& globalPos) const
97 {
98 return 0.4;
99 }
100
107 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
108 {
109 return materialParams_;
110 }
111
118 template<class FluidSystem>
119 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
120 {
121 if (gasWetting_)
122 return FluidSystem::gasPhaseIdx;
123 else
124 return FluidSystem::liquidPhaseIdx;
125 }
126
127private:
128 bool gasWetting_;
129 MaterialLawParams materialParams_;
130};
131
132}
133
134#endif
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 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
Definition of the spatial parameters for various steam injection problems.
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:42
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Returns the parameter object for the capillary-pressure/ saturation material law.
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:107
InjectionProblemSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:63
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:60
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity of the spatial parameters.
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:96
DimWorldMatrix PermeabilityType
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:61
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:119
DimWorldMatrix permeabilityAtPos(const GlobalPosition &globalPos) const
Returns the hydraulic conductivity .
Definition: porousmediumflow/2p1c/implicit/spatialparams.hh:80
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...