3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
freeflow/rans/twoeq/komega/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 *****************************************************************************/
70#ifndef DUMUX_KOMEGA_MODEL_HH
71#define DUMUX_KOMEGA_MODEL_HH
72
78
79#include "problem.hh"
80#include "fluxvariables.hh"
81#include "localresidual.hh"
82#include "volumevariables.hh"
83#include "iofields.hh"
84
85namespace Dumux {
86namespace Properties {
87
94template<int dimension>
96{
98 static constexpr int dim() { return dimension; }
99
102 static constexpr int numEq() { return dim()+1+2; }
103
105 static constexpr int numFluidComponents() { return 1; }
106
109
111 static constexpr auto turbulenceModel()
112 { return TurbulenceModel::komega; }
113};
114
116// default property values for the isothermal k-omega single phase model
118
119// Create new type tags
120namespace TTag {
122struct KOmega { using InheritsFrom = std::tuple<RANS>; };
123} // end namespace TTag
124
126template<class TypeTag>
127struct ModelTraits<TypeTag, TTag::KOmega>
128{
129private:
131 static constexpr int dim = GridView::dimension;
132public:
134};
135
137template<class TypeTag>
138struct FluxVariables<TypeTag, TTag::KOmega>
139{
140private:
142public:
144};
145
147template<class TypeTag>
148struct LocalResidual<TypeTag, TTag::KOmega>
149{
150private:
152public:
154};
155
157template<class TypeTag>
158struct VolumeVariables<TypeTag, TTag::KOmega>
159{
160private:
165
166 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
167 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
168 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
169
172public:
174};
175
177template<class TypeTag>
178struct IOFields<TypeTag, TTag::KOmega> { using type = KOmegaIOFields; };
179
181// default property values for the non-isothermal k-omega single phase model
183
184
185// Create new type tags
186namespace TTag {
188struct KOmegaNI { using InheritsFrom = std::tuple<KOmega, RANSNI>; };
189} // end namespace TTag
190
192template<class TypeTag>
193struct ModelTraits<TypeTag, TTag::KOmegaNI>
194{
195private:
197 static constexpr int dim = GridView::dimension;
199public:
201};
202
204template<class TypeTag>
205struct VolumeVariables<TypeTag, TTag::KOmegaNI>
206{
207private:
212
213 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
214 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
215 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
216
219public:
221};
222
224template<class TypeTag>
225struct IOFields<TypeTag, TTag::KOmegaNI> { using type = FreeflowNonIsothermalIOFields<KOmegaIOFields, true/*turbulenceModel*/>; };
226
227} // end properties
228} // end namespace
229
230#endif // DUMUX_KOMEGA_MODEL_HH
The available free flow turbulence models in Dumux.
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:66
A class helping models to define input and output fields.
Definition: common/properties.hh:76
Definition: common/properties.hh:89
The secondary variables within a sub-control volume.
Definition: common/properties.hh:118
Container storing the different types of flux variables.
Definition: common/properties.hh:124
Definition: freeflow/navierstokes/fluxvariables.hh:35
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:37
Definition: freeflow/navierstokes/localresidual.hh:35
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:125
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: 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
Traits for the Reynolds-averaged Navier-Stokes model.
Definition: freeflow/rans/model.hh:73
The common indices for isothermal two-equation RANS models.
Definition: freeflow/rans/twoeq/indices.hh:41
Definition: freeflow/rans/twoeq/komega/fluxvariables.hh:34
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: freeflow/rans/twoeq/komega/iofields.hh:36
Definition: freeflow/rans/twoeq/komega/localresidual.hh:36
Traits for the k-omega model.
Definition: freeflow/rans/twoeq/komega/model.hh:96
static constexpr int numEq()
Definition: freeflow/rans/twoeq/komega/model.hh:102
static constexpr int numFluidComponents()
The number of components.
Definition: freeflow/rans/twoeq/komega/model.hh:105
static constexpr int dim()
The dimension of the model.
Definition: freeflow/rans/twoeq/komega/model.hh:98
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/rans/twoeq/komega/model.hh:111
The type tag for the single-phase, isothermal k-omega model.
Definition: freeflow/rans/twoeq/komega/model.hh:122
std::tuple< RANS > InheritsFrom
Definition: freeflow/rans/twoeq/komega/model.hh:122
The type tag for the single-phase, non-isothermal k-omega 2-Eq. model.
Definition: freeflow/rans/twoeq/komega/model.hh:188
std::tuple< KOmega, RANSNI > InheritsFrom
Definition: freeflow/rans/twoeq/komega/model.hh:188
Volume variables for the isothermal single-phase k-omega 2-Eq model.
Definition: freeflow/rans/twoeq/komega/volumevariables.hh:41
Declares all properties used in Dumux.
Defines a type tag and some properties for free flow models.
A single-phase, isothermal Reynolds-Averaged Navier-Stokes model.
Base class for the flux variables in porous medium models.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Base class for all porous media problems.
Base class for the model specific class which provides access to all volume averaged quantities.