3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
kepsilonncmodel.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 *****************************************************************************/
28#ifndef DUMUX_KEPSILON_NC_MODEL_HH
29#define DUMUX_KEPSILON_NC_MODEL_HH
30
35
36#include "iofields.hh"
37
38namespace Dumux {
39
41// properties for the single-phase, multi-component k-epsilon model
43namespace Properties {
44
46// Type tags
48
49// Create new type tags
50namespace TTag {
52struct KEpsilonNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
53} // end namespace TTag
54
56// default property values
58
63template<int dimension, int nComp, bool useMoles, int replaceCompEqIdx>
64struct KEpsilonNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useMoles, replaceCompEqIdx>
65{
68 static constexpr int numEq() { return dimension+nComp+2; }
69
71 static constexpr bool usesTurbulenceModel() { return true; }
72
75
77 static constexpr auto turbulenceModel()
79};
80
82template<class TypeTag>
83struct ModelTraits<TypeTag, TTag::KEpsilonNC>
84{
85private:
87 static constexpr int dimension = GridView::dimension;
89 static constexpr int numComponents = FluidSystem::numComponents;
90 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
91 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
92public:
94};
95
97template<class TypeTag>
98struct VolumeVariables<TypeTag, TTag::KEpsilonNC>
99{
100private:
105
106 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
107 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
108 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
109 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
110
113public:
115};
116
118template<class TypeTag>
119struct LocalResidual<TypeTag, TTag::KEpsilonNC>
120{
121private:
123public:
125};
126
128template<class TypeTag>
129struct FluxVariables<TypeTag, TTag::KEpsilonNC>
130{
131private:
133public:
135};
136
138template<class TypeTag>
139struct IOFields<TypeTag, TTag::KEpsilonNC> { using type = FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>; };
140
142// Property values for non-isothermal multi-component k-epsilon model
144
145// Create new type tags
146namespace TTag {
148struct KEpsilonNCNI { using InheritsFrom = std::tuple<KEpsilonNC, NavierStokesNCNI>; };
149} // end namespace TTag
150
152template<class TypeTag>
153struct ModelTraits<TypeTag, TTag::KEpsilonNCNI>
154{
155private:
157 static constexpr int dim = GridView::dimension;
159 static constexpr int numComponents = FluidSystem::numComponents;
160 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
161 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
163public:
165};
166
168template<class TypeTag>
169struct VolumeVariables<TypeTag, TTag::KEpsilonNCNI>
170{
171private:
176
177 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
178 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
179 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
180 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
181
184public:
186};
187
189template<class TypeTag>
190struct LocalResidual<TypeTag, TTag::KEpsilonNCNI>
191{
192private:
194public:
196};
197
199template<class TypeTag>
200struct FluxVariables<TypeTag, TTag::KEpsilonNCNI>
201{
202private:
204public:
206};
207
209template<class TypeTag>
210struct IOFields<TypeTag, TTag::KEpsilonNCNI>
211{
212private:
213 using IsothermalIOFields = FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>;
214public:
215 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
216};
217
218// \}
219} // end namespace Properties
220} // end namespace Dumux
221
222#endif
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
Definition: freeflow/compositional/fluxvariables.hh:34
Adds I/O fields specific to the FreeflowNC model.
Definition: dumux/freeflow/compositional/iofields.hh:38
The type tags for the single-phase, multi-component isothermal k-epsilon model.
Definition: kepsilonncmodel.hh:52
std::tuple< NavierStokesNC > InheritsFrom
Definition: kepsilonncmodel.hh:52
Traits for the low-Reynolds k-epsilon multi-component model states some specifics of the isothermal m...
Definition: kepsilonncmodel.hh:65
static constexpr int numEq()
Definition: kepsilonncmodel.hh:68
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: kepsilonncmodel.hh:71
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: kepsilonncmodel.hh:77
The type tags for the single-phase, multi-component non-isothermal k-epsilon models.
Definition: kepsilonncmodel.hh:148
std::tuple< KEpsilonNC, NavierStokesNCNI > InheritsFrom
Definition: kepsilonncmodel.hh:148
Definition: freeflow/compositional/localresidual.hh:36
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:86
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:40
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:125
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
The common indices for isothermal two-equation RANS models.
Definition: freeflow/rans/twoeq/indices.hh:41
Definition: freeflow/rans/twoeq/kepsilon/fluxvariables.hh:34
Adds I/O fields for the k-epsilon turbulence model.
Definition: dumux/freeflow/rans/twoeq/kepsilon/iofields.hh:36
Definition: freeflow/rans/twoeq/kepsilon/localresidual.hh:36
Volume variables for the isothermal single-phase k-epsilon model.
Definition: freeflow/rans/twoeq/kepsilon/volumevariables.hh:39
Declares all properties used in Dumux.
A single-phase, isothermal k-epsilon model.
Adds I/O fields specific to the twop model.