Loading [MathJax]/extensions/tex2jax.js
3.1-git
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
49NEW_TYPE_TAG(SequentialModel, INHERITS_FROM(ModelProperties, GridAdapt, GridProperties));
50
52// Property tags
54
60
61// Some properties that have been removed from numeric model
64
75}
76}
77
78#include <dune/grid/common/mcmgmapper.hh>
79#include <dune/istl/bvector.hh>
80
85
86namespace Dumux
87{
88
89template<class TypeTag>
90class VariableClass;
91
92namespace Properties
93{
94
96// Properties
98
101
104template<class TypeTag>
105struct ModelTraits<TypeTag, TTag::SequentialModel>
106{
107private:
108 struct DummyTraits
109 {
110 using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
111 static constexpr int numEq() { return GET_PROP_VALUE(TypeTag, NumEq); }
112 };
113public:
114 using type = DummyTraits;
115};
116
118template<class TypeTag>
119struct GridView<TypeTag, TTag::SequentialModel>
120{
121private:
122 using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
123
124public:
125 using type = typename Grid::LeafGridView;
126};
127
129template<class TypeTag>
130struct MaxIntersections<TypeTag, TTag::SequentialModel>
131{
132private:
133 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
134 enum
135 {
136 dim = GridView::dimension
137 };
138public:
139 static const int value = 2*dim;
140};
141
142// Dumux 3.1 changes the property `FVGridGeometry` to `GridGeometry`.
143// For ensuring backward compatibility on the user side, it is necessary to
144// stick to the old name for the specializations, see the discussion in MR 1647.
145// Use diagnostic pragmas to prevent the emission of a warning message.
146// TODO after 3.1: Rename to GridGeometry, remove the pragmas and this comment.
147#pragma GCC diagnostic push
148#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
150template<class TypeTag>
151struct FVGridGeometry<TypeTag, TTag::SequentialModel>
152{
153 struct MockFVGridGeometry
154 : public DefaultMapperTraits<typename GET_PROP_TYPE(TypeTag, GridView)>
155 {
157 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
158 };
159
160public:
161 using type = MockFVGridGeometry;
162};
163#pragma GCC diagnostic pop
164
166template<class TypeTag>
167struct SolutionVector<TypeTag, TTag::SequentialModel>
168{
169public:
170 using type = typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution;
171};
172
178template<class TypeTag>
179struct SolutionTypes<TypeTag, TTag::SequentialModel>
180{
181 using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
182 using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
183 using Grid = typename GridView::Grid;
184 using Variables = typename GET_PROP_TYPE(TypeTag, Variables);
185
186 enum
187 {
188 dim = GridView::dimension,
189 numEq = GET_PROP_VALUE(TypeTag, NumEq),
190 numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
191 numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
192 maxIntersections = GET_PROP_VALUE(TypeTag, MaxIntersections)
193 };
194
195public:
199 using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
200
204 using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
205
211 using PrimaryVariables = Dune::FieldVector<Scalar, numEq>;
213 using ScalarSolution = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >;
215 using ComponentProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numComponents>;
217 using PhaseProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
219 using FluidProperty = Dune::FieldVector<Dune::BlockVector<Dune::FieldVector<Scalar,1> >, numPhases>;
221 using PhasePropertyElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, numPhases>, maxIntersections> >;
223 using DimVecElemFace = Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, dim>, maxIntersections> >;
224};
225
227
228SET_TYPE_PROP(SequentialModel, PrimaryVariables, typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables);
229
232
236template<class TypeTag>
237struct BoundaryTypes<TypeTag, TTag::SequentialModel>
238{ private:
239 enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
240public:
242};
243
245template<class TypeTag>
246struct ModelDefaultParameters<TypeTag, TTag::SequentialModel>
247{
248 static void defaultParams(Dune::ParameterTree& params, const std::string& group = "")
249 {
250 params["GridAdapt.CoarsenTolerance"] = "0.001";
251 params["GridAdapt.EnableInitializationIndicator"] = "false";
252 params["GridAdapt.EnableMultiPointFluxApproximation"] = "true";
253 params["GridAdapt.MaxLevel"] = "1";
254 params["GridAdapt.MaxInteractionVolumes"] = "4";
255 params["GridAdapt.MinLevel"] = "0";
256 params["GridAdapt.RefineAtDirichletBC"] = "false";
257 params["GridAdapt.RefineAtFluxBC"] = "false";
258 params["GridAdapt.RefineAtSource"] = "false";
259 params["GridAdapt.RefineTolerance"] = "0.05";
260
261 params["Impet.CFLFactor"] = "1.0";
262 params["Impet.EnableVolumeIntegral"] = "true";
263 params["Impet.ErrorTermFactor"] = "0.5";
264 params["Impet.ErrorTermLowerBound"] = "0.1";
265 params["Impet.ErrorTermUpperBound"] = "0.9";
266 params["Impet.PorosityThreshold"] = "1e-6";
267 params["Impet.SubCFLFactor"] = "1.0";
268 params["Impet.SwitchNormals"] = "false";
269
270 params["MPFA.CalcVelocityInTransport"] = "false";
271
272 params["TimeManager.SubTimestepVerbosity"] = "0";
273
274 params["Vtk.OutputLevel"] = "0";
275 }
276};
277
278}
279}
280
281#endif
Defines the default element and vertex mapper types.
Defines a type tags and some fundamental grid-related properties.
#define GET_PROP_VALUE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:282
#define GET_PROP(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:281
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
#define NEW_TYPE_TAG(...)
Definition: propertysystemmacros.hh:130
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
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystemmacros.hh:159
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag Variables
The type of the container of global variables.
Definition: porousmediumflow/sequential/properties.hh:71
Property tag Model
The type of the mode.
Definition: porousmediumflow/sequential/properties.hh:62
Property tag CellData
Defines data object to be stored.
Definition: porousmediumflow/sequential/properties.hh:72
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
Property tag Velocity
The type velocity reconstruction.
Definition: porousmediumflow/sequential/properties.hh:67
Property tag TransportModel
The type of the discretization of a transport model.
Definition: porousmediumflow/sequential/properties.hh:66
Type tag FVPressureOneP INHERITS_FROM(PressureOneP))
The type tag for the one-phase problems using a standard finite volume model.
Property tag NumComponents
Number of components in the system.
Definition: porousmediumflow/sequential/properties.hh:70
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
Property tag NumEq
Number of equations in the system of PDEs.
Definition: porousmediumflow/sequential/properties.hh:68
Property tag NumPhases
Number of phases in the system.
Definition: porousmediumflow/sequential/properties.hh:69
Property tag PressureCoefficientMatrix
Gives maximum number of intersections of an element and neighboring elements.
Definition: porousmediumflow/sequential/properties.hh:74
Property tag MaxIntersections
Gives maximum number of intersections of an element and neighboring elements.
Definition: porousmediumflow/sequential/properties.hh:73
Property tag SolutionTypes
Definition: porousmediumflow/sequential/properties.hh:58
Property tag PressureModel
The type of the discretization of a pressure model.
Definition: porousmediumflow/sequential/properties.hh:65
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:55
A vector of primary variables.
Definition: common/properties.hh:59
The type of the grid view according to the grid type.
Definition: common/properties.hh:63
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
Type of the global jacobian matrix.
Definition: common/properties.hh:82
Vector containing all primary variable vector of the grid.
Definition: common/properties.hh:84
Stores the boundary types of a single degree of freedom.
Definition: common/properties.hh:86
The type of the global finite volume geometry.
Definition: common/properties.hh:125
Definition: common/properties.hh:358
Manages the handling of time dependent problems.
Definition: timemanager.hh:63
Base class holding the variables and discretized data for sequential models.
Definition: variableclass.hh:49
Standard Module for h-adaptive simulations.
Definition: gridadapt.hh:47
DummyTraits type
Definition: porousmediumflow/sequential/properties.hh:114
typename Grid::LeafGridView type
Definition: porousmediumflow/sequential/properties.hh:125
MockFVGridGeometry type
Definition: porousmediumflow/sequential/properties.hh:161
typename GET_PROP_TYPE(TypeTag, GridView) GridView
Definition: porousmediumflow/sequential/properties.hh:157
typename GET_PROP(TypeTag, SolutionTypes)::ScalarSolution type
Definition: porousmediumflow/sequential/properties.hh:170
typename GET_PROP_TYPE(TypeTag, Variables) Variables
Definition: porousmediumflow/sequential/properties.hh:184
Dune::BlockVector< Dune::FieldVector< Scalar, 1 > > ScalarSolution
type for vector of scalars
Definition: porousmediumflow/sequential/properties.hh:213
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:223
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > PhaseProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:217
typename GET_PROP_TYPE(TypeTag, GridView) GridView
Definition: porousmediumflow/sequential/properties.hh:182
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:221
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > VertexMapper
Mapper for the grid view's vertices.
Definition: porousmediumflow/sequential/properties.hh:199
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Mapper for the grid view's elements.
Definition: porousmediumflow/sequential/properties.hh:204
typename GET_PROP_TYPE(TypeTag, Scalar) Scalar
Definition: porousmediumflow/sequential/properties.hh:181
typename GridView::Grid Grid
Definition: porousmediumflow/sequential/properties.hh:183
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numComponents > ComponentProperty
type for vector of phase properties
Definition: porousmediumflow/sequential/properties.hh:215
Dune::FieldVector< Dune::BlockVector< Dune::FieldVector< Scalar, 1 > >, numPhases > FluidProperty
type for vector of fluid properties: Vector[element][phase]
Definition: porousmediumflow/sequential/properties.hh:219
Dune::FieldVector< Scalar, numEq > PrimaryVariables
The type of a solution at a fixed time.
Definition: porousmediumflow/sequential/properties.hh:211
static void defaultParams(Dune::ParameterTree &params, const std::string &group="")
Definition: porousmediumflow/sequential/properties.hh:248
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.