3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
test_dec2p2c_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 *****************************************************************************/
24#ifndef TEST_2P2C_SPATIALPARAMS_HH
25#define TEST_2P2C_SPATIALPARAMS_HH
26
31
32namespace Dumux
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>
48struct MaterialLaw<TypeTag, TTag::Test2P2CSpatialParams>
49{
50private:
51 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
53public:
55};
56}
57
62template<class TypeTag>
64{
65 using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
66 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
67 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
68
69 enum { dim = GridView::dimension };
70 using Element = typename GridView::Traits::template Codim<0>::Entity;
71
72 using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
73
74public:
75 using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
76 using MaterialLawParams = typename MaterialLaw::Params;
77
78 const FieldMatrix& intrinsicPermeability (const Element& element) const
79 {
80 return constPermeability_;
81 }
82
83 double porosity(const Element& element) const
84 {
85 return 0.2;
86 }
87
88
89 // return the parameter object for the Brooks-Corey material law which depends on the position
90 const MaterialLawParams& materialLawParams(const Element &element) const
91 {
92 return materialLawParams_;
93 }
94
95
96 Test2P2CSpatialParams(const Problem& problem) : SequentialFVSpatialParams<TypeTag>(problem),
97 constPermeability_(0)
98 {
99 // residual saturations
100 materialLawParams_.setSwr(0);
101 materialLawParams_.setSnr(0);
102
103 materialLawParams_.setEntryPc(0);
104 materialLawParams_.setMaxPc(10000);
105
106 for(int i = 0; i < dim; i++)
107 {
108 constPermeability_[i][i] = 1e-12;
109 }
110 }
111
112private:
113 MaterialLawParams materialLawParams_;
114 FieldMatrix constPermeability_;
115
116};
117
118} // end namespace
119#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
Type tag Test2P2CSpatialParams
Definition: test_dec2p2c_spatialparams.hh:41
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
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 sequential 2p2c test
Definition: test_dec2p2c_spatialparams.hh:64
const MaterialLawParams & materialLawParams(const Element &element) const
Definition: test_dec2p2c_spatialparams.hh:90
typename MaterialLaw::Params MaterialLawParams
Definition: test_dec2p2c_spatialparams.hh:76
double porosity(const Element &element) const
Definition: test_dec2p2c_spatialparams.hh:83
typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw
Definition: test_dec2p2c_spatialparams.hh:75
Test2P2CSpatialParams(const Problem &problem)
Definition: test_dec2p2c_spatialparams.hh:96
const FieldMatrix & intrinsicPermeability(const Element &element) const
Definition: test_dec2p2c_spatialparams.hh:78
Defines the properties required for the sequential 2p2c models.
This material law takes a material law defined for effective saturations and converts it to a materia...