version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
16#ifndef DUMUX_SST_NC_MODEL_HH
17#define DUMUX_SST_NC_MODEL_HH
18
24
25namespace Dumux {
26
28// properties for the single-phase, multi-component SST model
30namespace Properties {
31
32// Create new type tags
33namespace TTag {
35struct SSTNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
36} // end namespace TTag
37
39// default property values
41
51template<int dimension, int nComp, bool useMoles, int replaceCompEqIdx>
52struct SSTNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useMoles, replaceCompEqIdx>
53{
56 static constexpr int numEq() { return dimension+nComp+2; }
57
59 static constexpr bool usesTurbulenceModel() { return true; }
60
62 static constexpr auto turbulenceModel()
63 { return TurbulenceModel::sst; }
64
67};
68
70template<class TypeTag>
71struct ModelTraits<TypeTag, TTag::SSTNC>
72{
73private:
75 static constexpr int dimension = GridView::dimension;
77 static constexpr int numComponents = FluidSystem::numComponents;
78 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
79 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
80public:
82};
83
85template<class TypeTag>
86struct VolumeVariables<TypeTag, TTag::SSTNC>
87{
88private:
93 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
94 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
95 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
96 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
98
100 template<class BaseTraits, class DT>
101 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
103public:
105};
106
108template<class TypeTag>
109struct LocalResidual<TypeTag, TTag::SSTNC>
110{
111private:
113public:
115};
116
118template<class TypeTag>
119struct FluxVariables<TypeTag, TTag::SSTNC>
120{
121private:
123public:
125};
126
128template<class TypeTag>
129struct IOFields<TypeTag, TTag::SSTNC> { using type = FreeflowNCIOFields<SSTIOFields, true/*turbulenceModel*/>; };
130
132// Property values for non-isothermal multi-component SST model
134
135// Create new type tags
136namespace TTag {
138struct SSTNCNI { using InheritsFrom = std::tuple<SSTNC, NavierStokesNCNI>; };
139} // end namespace TTag
140
142template<class TypeTag>
143struct ModelTraits<TypeTag, TTag::SSTNCNI>
144{
145private:
147 static constexpr int dim = GridView::dimension;
149 static constexpr int numComponents = FluidSystem::numComponents;
150 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
151 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
153
154public:
156};
157
159template<class TypeTag>
160struct VolumeVariables<TypeTag, TTag::SSTNCNI>
161{
162private:
167 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
168 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
169 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
170 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
172
174 template<class BaseTraits, class DT>
175 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
177public:
179};
180
182template<class TypeTag>
183struct LocalResidual<TypeTag, TTag::SSTNCNI>
184{
185private:
187public:
189};
190
192template<class TypeTag>
193struct FluxVariables<TypeTag, TTag::SSTNCNI>
194{
195private:
197public:
199};
200
202template<class TypeTag>
203struct IOFields<TypeTag, TTag::SSTNCNI>
204{
205private:
206 using IsothermalIOFields = FreeflowNCIOFields<SSTIOFields, true/*turbulenceModel*/>;
207public:
208 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
209};
210
211} // end namespace Properties
212} // end namespace Dumux
213
214#endif
The flux variables class for the multi-component free-flow model using the staggered grid discretizat...
Definition: freeflow/compositional/fluxvariables.hh:22
Element-wise calculation of the multi-component free-flow residual for models using the staggered dis...
Definition: freeflow/compositional/localresidual.hh:24
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:28
The flux variables class for the SST model using the staggered grid discretization.
Definition: freeflow/rans/twoeq/sst/fluxvariables.hh:22
Element-wise calculation of the residual for SST models using the staggered discretization.
Definition: freeflow/rans/twoeq/sst/localresidual.hh:24
Volume variables for the isothermal single-phase SST 2-Eq model.
Definition: freeflow/rans/twoeq/sst/volumevariables.hh:30
Defines all properties used in Dumux.
A single-phase, isothermal SST (Shear Stress Transport) -Eq. model.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
A single-phase, multi-component free-flow model.
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:26
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/nonisothermal/model.hh:47
Adds I/O fields specific to non-isothermal free-flow models.
Definition: freeflow/nonisothermal/iofields.hh:26
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:76
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:111
Traits for the SST multi-component modelstates some specifics of the isothermal multi-component sst m...
Definition: sstncmodel.hh:53
static constexpr int numEq()
Definition: sstncmodel.hh:56
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: sstncmodel.hh:62
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: sstncmodel.hh:59
The type tags for the single-phase, multi-component isothermal SST model.
Definition: sstncmodel.hh:35
std::tuple< NavierStokesNC > InheritsFrom
Definition: sstncmodel.hh:35
The type tags for the single-phase, multi-component non-isothermal SST models.
Definition: sstncmodel.hh:138
std::tuple< SSTNC, NavierStokesNCNI > InheritsFrom
Definition: sstncmodel.hh:138
The common indices for isothermal two-equation RANS models.
Definition: freeflow/rans/twoeq/indices.hh:29
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: freeflow/rans/twoeq/sst/iofields.hh:24