3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
test_diffusionspatialparams3d.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 *****************************************************************************/
24#ifndef TEST1_FVCA6_SPATIALPARAMETERS_HH
25#define TEST1_FVCA6_SPATIALPARAMETERS_HH
26
30
31namespace Dumux
32{
33
34//forward declaration
35template<class TypeTag>
37
38namespace Properties
39{
40// The spatial parameters TypeTag
42
43// Set the spatial parameters
45
46// Set the material law
47template<class TypeTag>
49{
50private:
51 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
53public:
55};
56}
57
62template<class TypeTag>
64{
66 using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
67 using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
68 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
69 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
70 using CoordScalar = typename Grid::ctype;
71
72 enum
73 {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1};
74 using Element = typename Grid::Traits::template Codim<0>::Entity;
75
76 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
77 using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
78
79public:
80 using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
81 using MaterialLawParams = typename MaterialLaw::Params;
82
83 const FieldMatrix& intrinsicPermeabilityAtPos (const GlobalPosition& globalPos) const
84 {
85 return permeability_;
86 }
87
88 double porosity(const Element& element) const
89 {
90 return 1.0;
91 }
92
93
94 // return the parameter object for the Brooks-Corey material law which depends on the position
95 const MaterialLawParams& materialLawParams(const Element &element) const
96 {
97 return materialLawParams_;
98 }
99
100 TestDiffusionSpatialParams3d(const Problem& problem)
101 : ParentType(problem), permeability_(0)
102 {
103 // residual saturations
104 materialLawParams_.setSwr(0.0);
105 materialLawParams_.setSnr(0.0);
106
107 // parameters for the linear entry pressure function
108 materialLawParams_.setEntryPc(0);
109 materialLawParams_.setMaxPc(0);
110
111 // permeability values
112 permeability_[0][0] = permeability_[1][1] = permeability_[2][2] = 1.0;
113 permeability_[0][1] = permeability_[1][0] = permeability_[1][2] = permeability_[2][1] = 0.5;
114 }
115
116private:
117 MaterialLawParams materialLawParams_;
118 FieldMatrix permeability_;
119};
120
121} // end namespace
122#endif
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
#define NEW_TYPE_TAG(...)
Definition: propertysystemmacros.hh:130
Linear capillary pressure and relative permeability <-> saturation relations.
The base class for spatial parameters of problems using the fv method.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
Type tag TestDiffusionSpatialParams3d
Definition: test_diffusionspatialparams3d.hh:41
The type of the spatial parameters object.
Definition: common/properties.hh:221
This material law takes a material law defined for effective saturations and converts it to a materia...
Definition: 2p/efftoabslaw.hh:60
Linear capillary pressure and relative permeability <-> saturation relations.
Definition: linearmaterial.hh:48
Definition: sequentialfv.hh:34
The base class for spatial parameters of a multi-phase problem using the fv method.
Definition: sequentialfv.hh:43
spatial parameters for the test problem for diffusion models.
Definition: test_diffusionspatialparams3d.hh:64
typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw
Definition: test_diffusionspatialparams3d.hh:80
const FieldMatrix & intrinsicPermeabilityAtPos(const GlobalPosition &globalPos) const
Definition: test_diffusionspatialparams3d.hh:83
typename MaterialLaw::Params MaterialLawParams
Definition: test_diffusionspatialparams3d.hh:81
const MaterialLawParams & materialLawParams(const Element &element) const
Definition: test_diffusionspatialparams3d.hh:95
TestDiffusionSpatialParams3d(const Problem &problem)
Definition: test_diffusionspatialparams3d.hh:100
double porosity(const Element &element) const
Definition: test_diffusionspatialparams3d.hh:88
This material law takes a material law defined for effective saturations and converts it to a materia...