3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
sstncmodel.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_SST_NC_MODEL_HH
29#define DUMUX_SST_NC_MODEL_HH
30
36
37namespace Dumux {
38
40// properties for the single-phase, multi-component SST model
42namespace Properties {
43
44// Create new type tags
45namespace TTag {
47struct SSTNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
48} // end namespace TTag
49
51// default property values
53
63template<int dimension, int nComp, bool useMoles, int replaceCompEqIdx>
64struct SSTNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useMoles, replaceCompEqIdx>
65{
68 static constexpr int numEq() { return dimension+nComp+2; }
69
71 static constexpr bool usesTurbulenceModel() { return true; }
72
74 static constexpr auto turbulenceModel()
75 { return TurbulenceModel::sst; }
76
79};
80
82template<class TypeTag>
83struct ModelTraits<TypeTag, TTag::SSTNC>
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::SSTNC>
99{
100private:
105 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
106 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
107 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
108 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
110
112 template<class BaseTraits, class DT>
113 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
115public:
117};
118
120template<class TypeTag>
121struct LocalResidual<TypeTag, TTag::SSTNC>
122{
123private:
125public:
127};
128
130template<class TypeTag>
131struct FluxVariables<TypeTag, TTag::SSTNC>
132{
133private:
135public:
137};
138
140template<class TypeTag>
141struct IOFields<TypeTag, TTag::SSTNC> { using type = FreeflowNCIOFields<SSTIOFields, true/*turbulenceModel*/>; };
142
144// Property values for non-isothermal multi-component SST model
146
147// Create new type tags
148namespace TTag {
150struct SSTNCNI { using InheritsFrom = std::tuple<SSTNC, NavierStokesNCNI>; };
151} // end namespace TTag
152
154template<class TypeTag>
155struct ModelTraits<TypeTag, TTag::SSTNCNI>
156{
157private:
159 static constexpr int dim = GridView::dimension;
161 static constexpr int numComponents = FluidSystem::numComponents;
162 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
163 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
165
166public:
168};
169
171template<class TypeTag>
172struct VolumeVariables<TypeTag, TTag::SSTNCNI>
173{
174private:
179 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
180 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
181 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
182 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
184
186 template<class BaseTraits, class DT>
187 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
189public:
191};
192
194template<class TypeTag>
195struct LocalResidual<TypeTag, TTag::SSTNCNI>
196{
197private:
199public:
201};
202
204template<class TypeTag>
205struct FluxVariables<TypeTag, TTag::SSTNCNI>
206{
207private:
209public:
211};
212
214template<class TypeTag>
215struct IOFields<TypeTag, TTag::SSTNCNI>
216{
217private:
218 using IsothermalIOFields = FreeflowNCIOFields<SSTIOFields, true/*turbulenceModel*/>;
219public:
220 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
221};
222
223} // end namespace Properties
224} // end namespace Dumux
225
226#endif
A single-phase, multi-component free-flow model.
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
A class helping models to define input and output fields.
Definition: common/properties.hh:63
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
The flux variables class for the multi-component free-flow model using the staggered grid discretizat...
Definition: freeflow/compositional/fluxvariables.hh:34
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:38
Element-wise calculation of the multi-component free-flow residual for models using the staggered dis...
Definition: freeflow/compositional/localresidual.hh:36
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:88
The type tags for the single-phase, multi-component isothermal SST model.
Definition: sstncmodel.hh:47
std::tuple< NavierStokesNC > InheritsFrom
Definition: sstncmodel.hh:47
Traits for the SST multi-component modelstates some specifics of the isothermal multi-component sst m...
Definition: sstncmodel.hh:65
static constexpr int numEq()
Definition: sstncmodel.hh:68
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: sstncmodel.hh:74
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: sstncmodel.hh:71
The type tags for the single-phase, multi-component non-isothermal SST models.
Definition: sstncmodel.hh:150
std::tuple< SSTNC, NavierStokesNCNI > InheritsFrom
Definition: sstncmodel.hh:150
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:123
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
The common indices for isothermal two-equation RANS models.
Definition: freeflow/rans/twoeq/indices.hh:41
The flux variables class for the SST model using the staggered grid discretization.
Definition: freeflow/rans/twoeq/sst/fluxvariables.hh:34
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: freeflow/rans/twoeq/sst/iofields.hh:36
Element-wise calculation of the residual for SST models using the staggered discretization.
Definition: freeflow/rans/twoeq/sst/localresidual.hh:36
Volume variables for the isothermal single-phase SST 2-Eq model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:42
Declares all properties used in Dumux.
A single-phase, isothermal SST (Shear Stress Transport) -Eq. model.