3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/sequential/properties.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 *****************************************************************************/
19#ifndef DUMUX_SEQUENTIAL_PROPERTIES_HH
20#define DUMUX_SEQUENTIAL_PROPERTIES_HH
21
22#include <dune/common/deprecated.hh>
23
31
32
41namespace Dumux
42{
43namespace Properties
44{
45
47// Type tags
49
51// Create new type tags
52namespace TTag {
53struct SequentialModel { using InheritsFrom = std::tuple<GridAdapt, GridProperties, ModelProperties>; };
54} // end namespace TTag
55
57// Property tags
59
63template<class TypeTag, class MyTypeTag>
65template<class TypeTag, class MyTypeTag>
66struct Indices { using type = UndefinedProperty; };
67
68// Some properties that have been removed from numeric model
69template<class TypeTag, class MyTypeTag>
70struct Model { using type = UndefinedProperty; };
71template<class TypeTag, class MyTypeTag>
73
74template<class TypeTag, class MyTypeTag>
76template<class TypeTag, class MyTypeTag>
78template<class TypeTag, class MyTypeTag>
79struct Velocity { using type = UndefinedProperty; };
80template<class TypeTag, class MyTypeTag>
81struct NumEq { using type = UndefinedProperty; };
82template<class TypeTag, class MyTypeTag>
83struct NumPhases { using type = UndefinedProperty; };
84template<class TypeTag, class MyTypeTag>
86template<class TypeTag, class MyTypeTag>
87struct Variables { using type = UndefinedProperty; };
88template<class TypeTag, class MyTypeTag>
89struct CellData { using type = UndefinedProperty; };
90template<class TypeTag, class MyTypeTag>
92template<class TypeTag, class MyTypeTag>
94}
95}
96
97#include <dune/grid/common/mcmgmapper.hh>
98#include <dune/istl/bvector.hh>
99
104
105namespace Dumux
106{
107
108template<class TypeTag>
109class VariableClass;
110
111namespace Properties
112{
113
115// Properties
117
119template<class TypeTag>
120struct JacobianMatrix<TypeTag, TTag::SequentialModel> { using type = GetPropType<TypeTag, Properties::PressureCoefficientMatrix>; };
121
124template<class TypeTag>
125struct ModelTraits<TypeTag, TTag::SequentialModel>
126{
127private:
128 struct DummyTraits
129 {
131 static constexpr int numEq() { return getPropValue<TypeTag, Properties::NumEq>(); }
132 };
133public:
134 using type = DummyTraits;
135};
136
137DUNE_NO_DEPRECATED_BEGIN
139template<class TypeTag>
140struct GridView<TypeTag, TTag::SequentialModel>
141{
142private:
144
145public:
146 using type = typename Grid::LeafGridView;
147};
148DUNE_NO_DEPRECATED_END
149
151template<class TypeTag>
152struct MaxIntersections<TypeTag, TTag::SequentialModel>
153{
154private:
155 DUNE_NO_DEPRECATED_BEGIN
157 DUNE_NO_DEPRECATED_END
158 enum
159 {
160 dim = GridView::dimension
161 };
162public:
163 static const int value = 2*dim;
164};
165
167template<class TypeTag>
168struct GridGeometry<TypeTag, TTag::SequentialModel>
169{
170DUNE_NO_DEPRECATED_BEGIN
171 struct MockFVGridGeometry
172 : public DefaultMapperTraits<GetPropType<TypeTag, Properties::GridView>>
173 {
176 };
177DUNE_NO_DEPRECATED_END
178public:
179 using type = MockFVGridGeometry;
180};
181
183template<class TypeTag>
184struct SolutionVector<TypeTag, TTag::SequentialModel>
185{
186public:
188};
189
195template<class TypeTag>
196struct SolutionTypes<TypeTag, TTag::SequentialModel>
197{
199 DUNE_NO_DEPRECATED_BEGIN
201 DUNE_NO_DEPRECATED_END
202 using Grid = typename GridView::Grid;
204
205 enum
206 {
207 dim = GridView::dimension,
208 numEq = getPropValue<TypeTag, Properties::NumEq>(),
209 numPhases = getPropValue<TypeTag, Properties::NumPhases>(),
210 numComponents = getPropValue<TypeTag, Properties::NumComponents>(),
211 maxIntersections = getPropValue<TypeTag, Properties::MaxIntersections>()
212 };
213
214public:
218 using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
219
223 using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
224
230 using PrimaryVariables = Dune::FieldVector<Scalar, numEq>;
232 using ScalarSolution = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >;
234 using ComponentProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numComponents>;
236 using PhaseProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
238 using FluidProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
240 using PhasePropertyElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, numPhases>, maxIntersections> >;
242 using DimVecElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, dim>, maxIntersections> >;
243};
244
245template<class TypeTag>
246struct Variables<TypeTag, TTag::SequentialModel> { using type = VariableClass<TypeTag>; };
247
248template<class TypeTag>
249struct PrimaryVariables<TypeTag, TTag::SequentialModel> { using type = typename GetProp<TypeTag, SolutionTypes>::PrimaryVariables; };
250
252template<class TypeTag>
253struct TimeManager<TypeTag, TTag::SequentialModel> { using type = Dumux::TimeManager<TypeTag>; };
254
258template<class TypeTag>
259struct BoundaryTypes<TypeTag, TTag::SequentialModel>
260{ private:
261 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
262public:
264};
265
267template<class TypeTag>
268struct ModelDefaultParameters<TypeTag, TTag::SequentialModel>
269{
270 static void defaultParams(Dune::ParameterTree& params, const std::string& group = "")
271 {
272 params["GridAdapt.CoarsenTolerance"] = "0.001";
273 params["GridAdapt.EnableInitializationIndicator"] = "false";
274 params["GridAdapt.EnableMultiPointFluxApproximation"] = "true";
275 params["GridAdapt.MaxLevel"] = "1";
276 params["GridAdapt.MaxInteractionVolumes"] = "4";
277 params["GridAdapt.MinLevel"] = "0";
278 params["GridAdapt.RefineAtDirichletBC"] = "false";
279 params["GridAdapt.RefineAtFluxBC"] = "false";
280 params["GridAdapt.RefineAtSource"] = "false";
281 params["GridAdapt.RefineTolerance"] = "0.05";
282
283 params["Impet.CFLFactor"] = "1.0";
284 params["Impet.EnableVolumeIntegral"] = "true";
285 params["Impet.ErrorTermFactor"] = "0.5";
286 params["Impet.ErrorTermLowerBound"] = "0.1";
287 params["Impet.ErrorTermUpperBound"] = "0.9";
288 params["Impet.PorosityThreshold"] = "1e-6";
289 params["Impet.SubCFLFactor"] = "1.0";
290 params["Impet.SwitchNormals"] = "false";
291
292 params["MPFA.CalcVelocityInTransport"] = "false";
293
294 params["TimeManager.SubTimestepVerbosity"] = "0";
295
296 params["Vtk.OutputLevel"] = "0";
297 }
298};
299
300}
301}
302
303#endif
Defines a type tags and some fundamental grid-related properties.
Definition of boundary condition types, extend if necessary.
Defines the default element and vertex mapper types.
Manages the handling of time dependent problems.
The available discretization methods in Dumux.
Class defining a start indicator for grid adaption.
Defines a type tag and some fundamental properties for linear solvers.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type GetProp
get the type of a property (equivalent to old macro GET_PROP(...))
Definition: propertysystem.hh:140
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Class to specify the type of a boundary.
Definition: common/boundarytypes.hh:38
Definition: defaultmappertraits.hh:35
Property which defines the group that is queried for parameters by default.
Definition: common/properties.hh:56
A vector of primary variables.
Definition: common/properties.hh:60
The type of the grid view according to the grid type.
Definition: common/properties.hh:64
Traits class encapsulating model specifications.
Definition: common/properties.hh:66
Type of the global jacobian matrix.
Definition: common/properties.hh:80
Vector containing all primary variable vector of the grid.
Definition: common/properties.hh:82
Stores the boundary types of a single degree of freedom.
Definition: common/properties.hh:84
Definition: common/properties.hh:113
Definition: common/properties.hh:302
a tag to mark properties as undefined
Definition: propertysystem.hh:36
Manages the handling of time dependent problems.
Definition: timemanager.hh:62
Base class holding the variables and discretized data for sequential models.
Definition: variableclass.hh:49
Definition: porousmediumflow/sequential/properties.hh:53
std::tuple< GridAdapt, GridProperties, ModelProperties > InheritsFrom
Definition: porousmediumflow/sequential/properties.hh:53
Definition: porousmediumflow/sequential/properties.hh:64
Definition: porousmediumflow/sequential/properties.hh:66
The type of the mode.
Definition: porousmediumflow/sequential/properties.hh:70
The type of discretization method.
Definition: porousmediumflow/sequential/properties.hh:72
The type of the discretization of a pressure model.
Definition: porousmediumflow/sequential/properties.hh:75
The type of the discretization of a transport model.
Definition: porousmediumflow/sequential/properties.hh:77
The type velocity reconstruction.
Definition: porousmediumflow/sequential/properties.hh:79
Number of equations in the system of PDEs.
Definition: porousmediumflow/sequential/properties.hh:81
Number of phases in the system.
Definition: porousmediumflow/sequential/properties.hh:83
Number of components in the system.
Definition: porousmediumflow/sequential/properties.hh:85
The type of the container of global variables.
Definition: porousmediumflow/sequential/properties.hh:87
Defines data object to be stored.
Definition: porousmediumflow/sequential/properties.hh:89
Gives maximum number of intersections of an element and neighboring elements.
Definition: porousmediumflow/sequential/properties.hh:91
Gives maximum number of intersections of an element and neighboring elements.
Definition: porousmediumflow/sequential/properties.hh:93
GetPropType< TypeTag, Properties::PressureCoefficientMatrix > type
Definition: porousmediumflow/sequential/properties.hh:120
DummyTraits type
Definition: porousmediumflow/sequential/properties.hh:134
typename Grid::LeafGridView type
Definition: porousmediumflow/sequential/properties.hh:146
MockFVGridGeometry type
Definition: porousmediumflow/sequential/properties.hh:179
GetPropType< TypeTag, Properties::GridView > GridView
Definition: porousmediumflow/sequential/properties.hh:175
typename GetProp< TypeTag, SolutionTypes >::ScalarSolution type
Definition: porousmediumflow/sequential/properties.hh:187
Dune::BlockVector< Dune::FieldVector< Scalar, 1 > > ScalarSolution
type for vector of scalars
Definition: porousmediumflow/sequential/properties.hh:232
Dune::BlockVector< Dune::FieldVector< Dune::FieldVector< Scalar, dim >, maxIntersections > > DimVecElemFace
type for vector of vectors (of size 2 x dimension) of vector (of size dimension) of scalars
Definition: porousmediumflow/sequential/properties.hh:242
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > PhaseProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:236
Dune::BlockVector< Dune::FieldVector< Dune::FieldVector< Scalar, numPhases >, maxIntersections > > PhasePropertyElemFace
type for vector of vectors (of size 2 x dimension) of scalars
Definition: porousmediumflow/sequential/properties.hh:240
GetPropType< TypeTag, Properties::Variables > Variables
Definition: porousmediumflow/sequential/properties.hh:203
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > VertexMapper
Mapper for the grid view's vertices.
Definition: porousmediumflow/sequential/properties.hh:218
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Mapper for the grid view's elements.
Definition: porousmediumflow/sequential/properties.hh:223
typename GridView::Grid Grid
Definition: porousmediumflow/sequential/properties.hh:202
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numComponents > ComponentProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:234
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > FluidProperty
type for vector of fluid properties: Vector[element][phase]
Definition: porousmediumflow/sequential/properties.hh:238
GetPropType< TypeTag, Properties::GridView > GridView
Definition: porousmediumflow/sequential/properties.hh:200
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/sequential/properties.hh:198
Dune::FieldVector< Scalar, numEq > PrimaryVariables
The type of a solution at a fixed time.
Definition: porousmediumflow/sequential/properties.hh:230
typename GetProp< TypeTag, SolutionTypes >::PrimaryVariables type
Definition: porousmediumflow/sequential/properties.hh:249
static void defaultParams(Dune::ParameterTree &params, const std::string &group="")
Definition: porousmediumflow/sequential/properties.hh:270
Class to specify the type of a boundary.
Declares all properties used in Dumux.
Defines a type tags and some fundamental properties for all models.