Loading [MathJax]/extensions/tex2jax.js
3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
29
30
39namespace Dumux
40{
41namespace Properties
42{
43
45// Type tags
47
49// Create new type tags
50namespace TTag {
51struct SequentialModel { using InheritsFrom = std::tuple<GridAdapt, GridProperties, ModelProperties>; };
52} // end namespace TTag
53
55// Property tags
57
61template<class TypeTag, class MyTypeTag>
63template<class TypeTag, class MyTypeTag>
64struct Indices { using type = UndefinedProperty; };
65template<class TypeTag, class MyTypeTag>
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
138template<class TypeTag>
139struct MaxIntersections<TypeTag, TTag::SequentialModel>
140{
141private:
143public:
144 static constexpr int value = 2*GridView::dimension;
145};
146
148template<class TypeTag>
149struct GridGeometry<TypeTag, TTag::SequentialModel>
150{
152 struct MockFVGridGeometry
153 : public DefaultMapperTraits<GV>
154 {
156 using GridView = GV;
157 };
158public:
159 using type = MockFVGridGeometry;
160};
161
163template<class TypeTag>
164struct SolutionVector<TypeTag, TTag::SequentialModel>
165{
166public:
168};
169
175template<class TypeTag>
176struct SolutionTypes<TypeTag, TTag::SequentialModel>
177{
181
182 enum
183 {
184 dim = GridView::dimension,
185 numEq = getPropValue<TypeTag, Properties::NumEq>(),
186 numPhases = getPropValue<TypeTag, Properties::NumPhases>(),
187 numComponents = getPropValue<TypeTag, Properties::NumComponents>(),
188 maxIntersections = getPropValue<TypeTag, Properties::MaxIntersections>()
189 };
190
191public:
195 using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
196
200 using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
201
207 using PrimaryVariables = Dune::FieldVector<Scalar, numEq>;
209 using ScalarSolution = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >;
211 using ComponentProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numComponents>;
213 using PhaseProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
215 using FluidProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
217 using PhasePropertyElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, numPhases>, maxIntersections> >;
219 using DimVecElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, dim>, maxIntersections> >;
220};
221
222template<class TypeTag>
223struct Variables<TypeTag, TTag::SequentialModel> { using type = VariableClass<TypeTag>; };
224
225template<class TypeTag>
226struct PrimaryVariables<TypeTag, TTag::SequentialModel> { using type = typename GetProp<TypeTag, SolutionTypes>::PrimaryVariables; };
227
229template<class TypeTag>
230struct TimeManager<TypeTag, TTag::SequentialModel> { using type = Dumux::TimeManager<TypeTag>; };
231
235template<class TypeTag>
236struct SequentialBoundaryTypes<TypeTag, TTag::SequentialModel>
237{ private:
238 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
239public:
241};
242
244template<class TypeTag>
245struct ModelDefaultParameters<TypeTag, TTag::SequentialModel>
246{
247 static void defaultParams(Dune::ParameterTree& params, const std::string& group = "")
248 {
249 params["GridAdapt.CoarsenTolerance"] = "0.001";
250 params["GridAdapt.EnableInitializationIndicator"] = "false";
251 params["GridAdapt.EnableMultiPointFluxApproximation"] = "true";
252 params["GridAdapt.MaxLevel"] = "1";
253 params["GridAdapt.MaxInteractionVolumes"] = "4";
254 params["GridAdapt.MinLevel"] = "0";
255 params["GridAdapt.RefineAtDirichletBC"] = "false";
256 params["GridAdapt.RefineAtFluxBC"] = "false";
257 params["GridAdapt.RefineAtSource"] = "false";
258 params["GridAdapt.RefineTolerance"] = "0.05";
259
260 params["Impet.CFLFactor"] = "1.0";
261 params["Impet.EnableVolumeIntegral"] = "true";
262 params["Impet.ErrorTermFactor"] = "0.5";
263 params["Impet.ErrorTermLowerBound"] = "0.1";
264 params["Impet.ErrorTermUpperBound"] = "0.9";
265 params["Impet.PorosityThreshold"] = "1e-6";
266 params["Impet.SubCFLFactor"] = "1.0";
267 params["Impet.SwitchNormals"] = "false";
268
269 params["MPFA.CalcVelocityInTransport"] = "false";
270
271 params["TimeManager.SubTimestepVerbosity"] = "0";
272
273 params["Vtk.OutputLevel"] = "0";
274 }
275};
276
277}
278}
279
280#endif
Defines the default element and vertex mapper types.
Defines a type tags and some fundamental grid-related properties.
Definition of boundary condition types, extend if necessary.
Manages the handling of time dependent problems.
Defines a type tag and some fundamental properties for linear solvers.
Class defining a start indicator for grid adaption.
The available discretization methods in Dumux.
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:45
A vector of primary variables.
Definition: common/properties.hh:49
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
Type of the global jacobian matrix.
Definition: common/properties.hh:67
Vector containing all primary variable vector of the grid.
Definition: common/properties.hh:69
Definition: common/properties.hh:101
Definition: common/properties.hh:290
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:51
std::tuple< GridAdapt, GridProperties, ModelProperties > InheritsFrom
Definition: porousmediumflow/sequential/properties.hh:51
Definition: porousmediumflow/sequential/properties.hh:62
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
MockFVGridGeometry type
Definition: porousmediumflow/sequential/properties.hh:159
typename GetPropType< TypeTag, Properties::Grid >::LeafGridView GV
Definition: porousmediumflow/sequential/properties.hh:151
GV GridView
Definition: porousmediumflow/sequential/properties.hh:156
typename GetProp< TypeTag, SolutionTypes >::ScalarSolution type
Definition: porousmediumflow/sequential/properties.hh:167
typename GetPropType< TypeTag, Properties::GridGeometry >::GridView GridView
Definition: porousmediumflow/sequential/properties.hh:179
Dune::BlockVector< Dune::FieldVector< Scalar, 1 > > ScalarSolution
type for vector of scalars
Definition: porousmediumflow/sequential/properties.hh:209
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:219
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > PhaseProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:213
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:217
GetPropType< TypeTag, Properties::Variables > Variables
Definition: porousmediumflow/sequential/properties.hh:180
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > VertexMapper
Mapper for the grid view's vertices.
Definition: porousmediumflow/sequential/properties.hh:195
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Mapper for the grid view's elements.
Definition: porousmediumflow/sequential/properties.hh:200
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numComponents > ComponentProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:211
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > FluidProperty
type for vector of fluid properties: Vector[element][phase]
Definition: porousmediumflow/sequential/properties.hh:215
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/sequential/properties.hh:178
Dune::FieldVector< Scalar, numEq > PrimaryVariables
The type of a solution at a fixed time.
Definition: porousmediumflow/sequential/properties.hh:207
typename GetProp< TypeTag, SolutionTypes >::PrimaryVariables type
Definition: porousmediumflow/sequential/properties.hh:226
static void defaultParams(Dune::ParameterTree &params, const std::string &group="")
Definition: porousmediumflow/sequential/properties.hh:247
Class to specify the type of a boundary.
Defines a type tags and some fundamental properties for all models.
Declares all properties used in Dumux.