3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
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 *****************************************************************************/
45
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
64
65namespace Dumux {
66
73template<int dimension>
75{
77 static constexpr int dim() { return dimension; }
78
81 static constexpr int numEq() { return 1; }
82
84 static constexpr int numFluidPhases() { return 1; }
85
87 static constexpr int numFluidComponents() { return 1; }
88
90 static constexpr bool enableAdvection() { return true; }
91
93 static constexpr bool enableMolecularDiffusion() { return false; }
94
96 static constexpr bool enableEnergyBalance() { return false; }
97
99 static constexpr bool usesTurbulenceModel() { return false; }
100
102 static constexpr auto turbulenceModel()
103 { return TurbulenceModel::none; }
104
107};
108
118template<class PV,
119 class FSY,
120 class FST,
121 class MT>
123{
125 using FluidSystem = FSY;
126 using FluidState = FST;
127 using ModelTraits = MT;
128};
129
130// \{
132// properties for the single-phase Navier-Stokes model
134namespace Properties {
135
137// Type tags
139
140// Create new type tags
141namespace TTag {
143struct NavierStokesMomentum { using InheritsFrom = std::tuple<FreeFlow>; };
144
145}
146
148// default property values for the isothermal single phase model
150template<class TypeTag>
151struct NormalizePressure<TypeTag, TTag::NavierStokesMomentum> { static constexpr bool value = true; };
152
154template<class TypeTag>
155struct ModelTraits<TypeTag, TTag::NavierStokesMomentum>
156{
157private:
159 static constexpr auto dim = GridView::dimension;
160public:
162};
163
170template<class TypeTag>
171struct FluidState<TypeTag, TTag::NavierStokesMomentum>{
172private:
175public:
177};
178
180template<class TypeTag>
181struct LocalResidual<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumResidual<TypeTag>; };
182
184template<class TypeTag>
185struct VolumeVariables<TypeTag, TTag::NavierStokesMomentum>
186{
187private:
192
193 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
194 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
195 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
196
198public:
200};
201
203template<class TypeTag>
204struct FluxVariables<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumFluxVariables<TypeTag>; };
205
206template<class TypeTag>
207struct CouplingManager<TypeTag, TTag::NavierStokesMomentum>
208{
209private:
210 struct EmptyCouplingManager {};
211public:
212 using type = EmptyCouplingManager;
213};
214
216// template<class TypeTag>
217// struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
218
219}
220// }
221
222} // end namespace
223
224#endif // DUMUX_NAVIERSTOKES_MODEL_HH
The available discretization methods in Dumux.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
@ none
Definition turbulencemodel.hh:39
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:180
Definition common/properties.hh:37
Type tag for numeric models.
Definition grid.hh:36
Traits class encapsulating model specifications.
Definition common/properties.hh:51
Definition common/properties.hh:72
The secondary variables within a sub-control volume.
Definition common/properties.hh:105
Container storing the different types of flux variables.
Definition common/properties.hh:111
The type of the fluid state to use.
Definition common/properties.hh:162
Returns whether to normalize the pressure term in the momentum balance or not.
Definition common/properties.hh:283
Definition common/properties.hh:291
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:43
Traits for the Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:75
static constexpr int numFluidPhases()
The number of phases is 1.
Definition freeflow/navierstokes/momentum/model.hh:84
NavierStokesMomentumIndices< dim()> Indices
the indices
Definition freeflow/navierstokes/momentum/model.hh:106
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition freeflow/navierstokes/momentum/model.hh:96
static constexpr int numEq()
Definition freeflow/navierstokes/momentum/model.hh:81
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition freeflow/navierstokes/momentum/model.hh:93
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/navierstokes/momentum/model.hh:102
static constexpr bool enableAdvection()
Enable advection.
Definition freeflow/navierstokes/momentum/model.hh:90
static constexpr int dim()
The dimension of the model.
Definition freeflow/navierstokes/momentum/model.hh:77
static constexpr int numFluidComponents()
The number of components is 1.
Definition freeflow/navierstokes/momentum/model.hh:87
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition freeflow/navierstokes/momentum/model.hh:99
Traits class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:123
FST FluidState
Definition freeflow/navierstokes/momentum/model.hh:126
MT ModelTraits
Definition freeflow/navierstokes/momentum/model.hh:127
PV PrimaryVariables
Definition freeflow/navierstokes/momentum/model.hh:124
FSY FluidSystem
Definition freeflow/navierstokes/momentum/model.hh:125
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:143
std::tuple< FreeFlow > InheritsFrom
Definition freeflow/navierstokes/momentum/model.hh:143
static constexpr bool value
Definition freeflow/navierstokes/momentum/model.hh:151
NavierStokesMomentumModelTraits< dim > type
Definition freeflow/navierstokes/momentum/model.hh:161
Dumux::ImmiscibleFluidState< Scalar, FluidSystem > type
Definition freeflow/navierstokes/momentum/model.hh:176
NavierStokesMomentumResidual< TypeTag > type
Definition freeflow/navierstokes/momentum/model.hh:181
NavierStokesMomentumVolumeVariables< Traits > type
Definition freeflow/navierstokes/momentum/model.hh:199
NavierStokesMomentumFluxVariables< TypeTag > type
Definition freeflow/navierstokes/momentum/model.hh:204
EmptyCouplingManager type
Definition freeflow/navierstokes/momentum/model.hh:212
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/momentum/volumevariables.hh:37
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.
Diffusive heat flux according to Fourier's law.
Adds I/O fields specific to non-isothermal free-flow models.
The common indices for the isothermal Navier-Stokes model.
Indices for the non-isothermal Navier-Stokes model.
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
Element-wise calculation of the Navier-Stokes residual for models using the staggered discretization.
Volume variables for the single-phase Navier-Stokes model.