3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
freeflow/navierstokes/momentum/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 *****************************************************************************/
46#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_MODEL_HH
47#define DUMUX_NAVIERSTOKES_MOMENTUM_MODEL_HH
48
54
55#include "localresidual.hh"
56#include "volumevariables.hh"
57#include "fluxvariables.hh"
58#include "indices.hh"
59// #include "iofields.hh"
60
65
66namespace Dumux {
67
74template<int dimension>
76{
78 static constexpr int dim() { return dimension; }
79
82 static constexpr int numEq() { return 1; }
83
85 static constexpr int numFluidPhases() { return 1; }
86
88 static constexpr int numFluidComponents() { return 1; }
89
91 static constexpr bool enableAdvection() { return true; }
92
94 static constexpr bool enableMolecularDiffusion() { return false; }
95
97 static constexpr bool enableEnergyBalance() { return false; }
98
100 static constexpr bool usesTurbulenceModel() { return false; }
101
103 static constexpr auto turbulenceModel()
104 { return TurbulenceModel::none; }
105
108};
109
119template<class PV,
120 class FSY,
121 class FST,
122 class MT>
124{
126 using FluidSystem = FSY;
127 using FluidState = FST;
128 using ModelTraits = MT;
129};
130
131// \{
133// properties for the single-phase Navier-Stokes model
135namespace Properties {
136
138// Type tags
140
141// Create new type tags
142namespace TTag {
144struct NavierStokesMomentum { using InheritsFrom = std::tuple<FreeFlow>; };
145
146}
147
149// default property values for the isothermal single phase model
151template<class TypeTag>
152struct NormalizePressure<TypeTag, TTag::NavierStokesMomentum> { static constexpr bool value = true; };
153
155template<class TypeTag>
156struct ModelTraits<TypeTag, TTag::NavierStokesMomentum>
157{
158private:
160 static constexpr auto dim = GridView::dimension;
161public:
163};
164
171template<class TypeTag>
172struct FluidState<TypeTag, TTag::NavierStokesMomentum>{
173private:
176public:
178};
179
181template<class TypeTag>
182struct LocalResidual<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumResidual<TypeTag>; };
183
185template<class TypeTag>
186struct VolumeVariables<TypeTag, TTag::NavierStokesMomentum>
187{
188private:
193
194 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
195 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
196 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
197
199public:
201};
202
204template<class TypeTag>
205struct FluxVariables<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumFluxVariables<TypeTag>; };
206
207template<class TypeTag>
209
210template<class TypeTag>
211struct FluxVariablesCacheFiller<TypeTag, TTag::NavierStokesMomentum> { using type = FluxVariablesCaching::EmptyCacheFiller; };
212
213template<class TypeTag>
214struct CouplingManager<TypeTag, TTag::NavierStokesMomentum>
215{
216private:
217 struct EmptyCouplingManager {};
218public:
219 using type = EmptyCouplingManager;
220};
221
223// template<class TypeTag>
224// struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
225
226}
227// }
228
229} // end namespace
230
231#endif // DUMUX_NAVIERSTOKES_MODEL_HH
The available discretization methods in Dumux.
Classes related to flux variables caching.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
Definition: common/properties.hh:74
The secondary variables within a sub-control volume.
Definition: common/properties.hh:107
Container storing the different types of flux variables.
Definition: common/properties.hh:113
Stores data associated with flux vars.
Definition: common/properties.hh:115
The engine behind the global flux cache (how to fill caches for the stencil)
Definition: common/properties.hh:117
The type of the fluid state to use.
Definition: common/properties.hh:164
Returns whether to normalize the pressure term in the momentum balance or not.
Definition: common/properties.hh:285
Definition: common/properties.hh:293
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:32
An empty flux variables cache.
Definition: fluxvariablescaching.hh:47
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
Definition: freeflow/navierstokes/momentum/fluxvariables.hh:49
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/indices.hh:37
Element-wise calculation of the Navier-Stokes residual for models using the staggered discretization.
Definition: freeflow/navierstokes/momentum/localresidual.hh:51
Traits for the Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/model.hh:76
static constexpr int numFluidPhases()
The number of phases is 1.
Definition: freeflow/navierstokes/momentum/model.hh:85
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition: freeflow/navierstokes/momentum/model.hh:97
static constexpr int numEq()
Definition: freeflow/navierstokes/momentum/model.hh:82
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: freeflow/navierstokes/momentum/model.hh:94
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/navierstokes/momentum/model.hh:103
static constexpr bool enableAdvection()
Enable advection.
Definition: freeflow/navierstokes/momentum/model.hh:91
static constexpr int dim()
The dimension of the model.
Definition: freeflow/navierstokes/momentum/model.hh:78
static constexpr int numFluidComponents()
The number of components is 1.
Definition: freeflow/navierstokes/momentum/model.hh:88
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: freeflow/navierstokes/momentum/model.hh:100
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/model.hh:124
FST FluidState
Definition: freeflow/navierstokes/momentum/model.hh:127
MT ModelTraits
Definition: freeflow/navierstokes/momentum/model.hh:128
PV PrimaryVariables
Definition: freeflow/navierstokes/momentum/model.hh:125
FSY FluidSystem
Definition: freeflow/navierstokes/momentum/model.hh:126
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/model.hh:144
std::tuple< FreeFlow > InheritsFrom
Definition: freeflow/navierstokes/momentum/model.hh:144
EmptyCouplingManager type
Definition: freeflow/navierstokes/momentum/model.hh:219
Volume variables for the single-phase Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/volumevariables.hh:38
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.
Fourier's law specialized for different discretization schemes This file contains the data which is r...
Defines the primary variable and equation indices used by the isothermal tracer 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.