3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
test_3d2pspatialparams.hh
Go to the documentation of this file.
1/*****************************************************************************
2 * See the file COPYING for full copying permissions. *
3 * *
4 * This program is free software: you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation, either version 3 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
16 *****************************************************************************/
22#ifndef TEST_3D2P_SPATIALPARAMETERS_HH
23#define TEST_3D2P_SPATIALPARAMETERS_HH
24
29
30
31namespace Dumux
32{
37//forward declaration
38template<class TypeTag>
40
41namespace Properties
42{
43// The spatial parameters TypeTag
45
46// Set the spatial parameters
48
49// Set the material law
50template<class TypeTag>
51struct MaterialLaw<TypeTag, TTag::Test3d2pSpatialParams>
52{
53private:
54 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
56// using RawMaterialLaw = LinearMaterial<Scalar>;
57public:
59};
60}
61
67template<class TypeTag>
69{
71 using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
72 using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
73 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
74 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
75 using CoordScalar = typename Grid::ctype;
76
77 enum
78 {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1};
79 using Element = typename Grid::Traits::template Codim<0>::Entity;
80
81 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
82 using LocalPosition = Dune::FieldVector<CoordScalar, dim>;
83 using FieldMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
84
85public:
86 using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
87 using MaterialLawParams = typename MaterialLaw::Params;
88
89 void update (Scalar saturationW, const Element& element)
90 {
91 }
92
93 const FieldMatrix& intrinsicPermeabilityAtPos (const GlobalPosition& globalPos) const
94 {
95 return constPermeability_;
96 }
97
98 double porosity(const Element& element) const
99 {
100#if PROBLEM == 1
101 return 0.3;
102#else
103 return 0.2;
104#endif
105 }
106
107
108 // return the parameter object for the Brooks-Corey material law which depends on the position
109 const MaterialLawParams& materialLawParams(const Element &element) const
110 {
111 return materialLawParams_;
112 }
113
114
115 Test3d2pSpatialParams(const Problem& problem)
116 : ParentType(problem), constPermeability_(0)
117 {
118
119
120
121// // parameters for the Brooks-Corey Law
122#if PROBLEM == 1
123 // residual saturations
124 materialLawParams_.setSwr(0.);
125 materialLawParams_.setSnr(0.);
126
127 // entry pressures
128 materialLawParams_.setPe(5000);
129#else
130 // residual saturations
131 materialLawParams_.setSwr(0.2);
132 materialLawParams_.setSnr(0.2);
133
134 // entry pressures
135 materialLawParams_.setPe(0);
136#endif
137
138 // Brooks-Corey shape parameters
139 materialLawParams_.setLambda(2);
140
141#if PROBLEM == 1
142 for(int i = 0; i < dim; i++)
143 {
144 constPermeability_[i][i] = 1e-10;
145 }
146#else
147 for(int i = 0; i < dim; i++)
148 {
149 constPermeability_[i][i] = 1e-7;
150 }
151#endif
152 }
153
154private:
155 MaterialLawParams materialLawParams_;
156 FieldMatrix constPermeability_;
157
158};
159
160} // end namespace
161#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.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
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 Test3d2pSpatialParams
Definition: test_3d2pspatialparams.hh:44
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
Implementation of the regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition: regularizedbrookscorey.hh:62
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 2p 3d test
Definition: test_3d2pspatialparams.hh:69
const MaterialLawParams & materialLawParams(const Element &element) const
Definition: test_3d2pspatialparams.hh:109
typename MaterialLaw::Params MaterialLawParams
Definition: test_3d2pspatialparams.hh:87
double porosity(const Element &element) const
Definition: test_3d2pspatialparams.hh:98
const FieldMatrix & intrinsicPermeabilityAtPos(const GlobalPosition &globalPos) const
Definition: test_3d2pspatialparams.hh:93
Test3d2pSpatialParams(const Problem &problem)
Definition: test_3d2pspatialparams.hh:115
typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw
Definition: test_3d2pspatialparams.hh:86
void update(Scalar saturationW, const Element &element)
Definition: test_3d2pspatialparams.hh:89
This material law takes a material law defined for effective saturations and converts it to a materia...