3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
freeflow/navierstokes/model.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 *****************************************************************************/
48#ifndef DUMUX_NAVIERSTOKES_MODEL_HH
49#define DUMUX_NAVIERSTOKES_MODEL_HH
50
56
57#include "localresidual.hh"
58#include "volumevariables.hh"
59#include "fluxvariables.hh"
60#include "indices.hh"
61#include "iofields.hh"
62
66
67namespace Dumux {
68
75template<int dimension>
77{
79 static constexpr int dim() { return dimension; }
80
83 static constexpr int numEq() { return dimension+1; }
84
86 static constexpr int numFluidPhases() { return 1; }
87
89 static constexpr int numFluidComponents() { return 1; }
90
92 static constexpr bool enableAdvection() { return true; }
93
95 static constexpr bool enableMolecularDiffusion() { return false; }
96
98 static constexpr bool enableEnergyBalance() { return false; }
99
101 static constexpr bool usesTurbulenceModel() { return false; }
102
104 static constexpr auto turbulenceModel()
105 { return TurbulenceModel::none; }
106
109};
110
120template<class PV,
121 class FSY,
122 class FST,
123 class MT>
125{
127 using FluidSystem = FSY;
128 using FluidState = FST;
129 using ModelTraits = MT;
130};
131
132// \{
134// properties for the single-phase Navier-Stokes model
136namespace Properties {
137
139// Type tags
141
142// Create new type tags
143namespace TTag {
145struct NavierStokes { using InheritsFrom = std::tuple<FreeFlow>; };
146
148struct NavierStokesNI { using InheritsFrom = std::tuple<NavierStokes>; };
149} // end namespace TTag
150
152// default property values for the isothermal single phase model
154template<class TypeTag>
155struct NormalizePressure<TypeTag, TTag::NavierStokes> { static constexpr bool value = true; };
156
158template<class TypeTag>
159struct ModelTraits<TypeTag, TTag::NavierStokes>
160{
161private:
163 static constexpr auto dim = GridView::dimension;
164public:
166};
167
174template<class TypeTag>
175struct FluidState<TypeTag, TTag::NavierStokes>{
176private:
179public:
181};
182
184template<class TypeTag>
185struct LocalResidual<TypeTag, TTag::NavierStokes> { using type = NavierStokesResidual<TypeTag>; };
186
188template<class TypeTag>
189struct VolumeVariables<TypeTag, TTag::NavierStokes>
190{
191private:
196
197 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
198 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
199 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
200
202public:
204};
205
207template<class TypeTag>
208struct FluxVariables<TypeTag, TTag::NavierStokes> { using type = NavierStokesFluxVariables<TypeTag>; };
209
211template<class TypeTag>
212struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
213
215// Property values for non-isothermal Navier-Stokes model
217
219template<class TypeTag>
220struct ModelTraits<TypeTag, TTag::NavierStokesNI>
221{
222private:
224 static constexpr auto dim = GridView::dimension;
226public:
228};
229
231template<class TypeTag>
232struct IOFields<TypeTag, TTag::NavierStokesNI> { using type = FreeflowNonIsothermalIOFields<NavierStokesIOFields>; };
233
234 // \}
235}
236
237} // end namespace
238
239#endif // DUMUX_NAVIERSTOKES_MODEL_HH
The available discretization methods in Dumux.
Fourier's law specialized for different discretization schemes This file contains the data which is r...
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
A class helping models to define input and output fields.
Definition: common/properties.hh:78
Definition: common/properties.hh:91
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
Container storing the different types of flux variables.
Definition: common/properties.hh:180
The type of the fluid state to use.
Definition: common/properties.hh:225
Returns whether to normalize the pressure term in the momentum balance or not.
Definition: common/properties.hh:346
Definition: freeflow/navierstokes/fluxvariables.hh:35
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:37
Adds I/O fields for the Navier-Stokes model.
Definition: dumux/freeflow/navierstokes/iofields.hh:79
Definition: freeflow/navierstokes/localresidual.hh:35
Traits for the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:77
static constexpr int numFluidComponents()
The number of components is 1.
Definition: freeflow/navierstokes/model.hh:89
static constexpr bool enableAdvection()
Enable advection.
Definition: freeflow/navierstokes/model.hh:92
static constexpr int dim()
The dimension of the model.
Definition: freeflow/navierstokes/model.hh:79
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: freeflow/navierstokes/model.hh:95
static constexpr int numEq()
Definition: freeflow/navierstokes/model.hh:83
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/navierstokes/model.hh:104
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: freeflow/navierstokes/model.hh:101
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition: freeflow/navierstokes/model.hh:98
static constexpr int numFluidPhases()
The number of phases is 1.
Definition: freeflow/navierstokes/model.hh:86
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:125
PV PrimaryVariables
Definition: freeflow/navierstokes/model.hh:126
MT ModelTraits
Definition: freeflow/navierstokes/model.hh:129
FST FluidState
Definition: freeflow/navierstokes/model.hh:128
FSY FluidSystem
Definition: freeflow/navierstokes/model.hh:127
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:145
std::tuple< FreeFlow > InheritsFrom
Definition: freeflow/navierstokes/model.hh:145
The type tag for the corresponding non-isothermal model.
Definition: freeflow/navierstokes/model.hh:148
std::tuple< NavierStokes > InheritsFrom
Definition: freeflow/navierstokes/model.hh:148
Volume variables for the single-phase Navier-Stokes model.
Definition: freeflow/navierstokes/volumevariables.hh:38
Adds I/O fields specific to non-isothermal free-flow models.
Definition: dumux/freeflow/nonisothermal/iofields.hh:38
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/nonisothermal/model.hh:59
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:42
Declares all properties used in Dumux.
Defines a type tag and some properties for free flow models.
A single-phase, non-isothermal free-flow model.
Adds I/O fields specific to the twop model.
Base class for the flux variables in porous medium models.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Base class for the model specific class which provides access to all volume averaged quantities.
Defines the primary variable and equation indices used by the isothermal tracer model.