version 3.10-dev
freeflow/rans/twoeq/kepsilon/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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
53#ifndef DUMUX_KEPSILON_MODEL_HH
54#define DUMUX_KEPSILON_MODEL_HH
55
61
62#include "problem.hh"
63#include "fluxvariables.hh"
64#include "localresidual.hh"
65#include "volumevariables.hh"
66#include "iofields.hh"
67
68namespace Dumux {
69namespace Properties {
70
77template<int dimension>
79{
81 static constexpr int dim() { return dimension; }
82
85 static constexpr int numEq() { return dim()+1+2; }
86
88 static constexpr int numFluidComponents() { return 1; }
89
92
94 static constexpr auto turbulenceModel()
96};
97
99// default property values for the isothermal k-epsilon model
101
102// Create new type tags
103namespace TTag {
105struct KEpsilon { using InheritsFrom = std::tuple<RANS>; };
106} // end namespace TTag
107
109template<class TypeTag>
110struct ModelTraits<TypeTag, TTag::KEpsilon>
111{
112private:
114 static constexpr int dim = GridView::dimension;
115public:
117};
118
120template<class TypeTag>
121struct FluxVariables<TypeTag, TTag::KEpsilon>
122{
123private:
125public:
127};
128
130template<class TypeTag>
131struct LocalResidual<TypeTag, TTag::KEpsilon>
132{
133private:
135public:
137};
138
140template<class TypeTag>
141struct VolumeVariables<TypeTag, TTag::KEpsilon>
142{
143private:
148
149 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
150 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
151 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
152
155public:
157};
158
160template<class TypeTag>
161struct IOFields<TypeTag, TTag::KEpsilon> { using type = KEpsilonIOFields; };
162
164// default property values for the non-isothermal k-epsilon model
166
167// Create new type tags
168namespace TTag {
170struct KEpsilonNI { using InheritsFrom = std::tuple<KEpsilon, RANSNI>; };
171} // end namespace TTag
172
174template<class TypeTag>
175struct ModelTraits<TypeTag, TTag::KEpsilonNI>
176{
177private:
179 static constexpr int dim = GridView::dimension;
181public:
183};
184
186template<class TypeTag>
187struct VolumeVariables<TypeTag, TTag::KEpsilonNI>
188{
189private:
194
195 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
196 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
197 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
198
201public:
203};
204
206template<class TypeTag>
207struct IOFields<TypeTag, TTag::KEpsilonNI> { using type = FreeflowNonIsothermalIOFields<KEpsilonIOFields, true/*turbulenceModel*/>; };
208
209} // end properties
210} // end namespace
211
212#endif
The flux variables class for the k-epsilon model using the staggered grid discretization.
Definition: freeflow/rans/twoeq/kepsilon/fluxvariables.hh:22
Element-wise calculation of the residual for k-epsilon models using the staggered discretization.
Definition: freeflow/rans/twoeq/kepsilon/localresidual.hh:24
Volume variables for the isothermal single-phase k-epsilon model.
Definition: freeflow/rans/twoeq/kepsilon/volumevariables.hh:27
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
Definition: freeflow/navierstokes/fluxvariables.hh:23
Element-wise calculation of the Navier-Stokes residual for models using the staggered discretization.
Definition: freeflow/navierstokes/localresidual.hh:23
Volume variables for the single-phase Navier-Stokes model.
Definition: freeflow/navierstokes/volumevariables.hh:26
Defines 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.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
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.
Python wrapper for volume variables (finite volume schemes)
TODO: docme!
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
Adds I/O fields for the k-epsilon turbulence model.
Definition: freeflow/rans/twoeq/kepsilon/iofields.hh:24
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:25
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:111
Traits for the k-epsilon model.
Definition: freeflow/rans/twoeq/kepsilon/model.hh:79
static constexpr int numEq()
Definition: freeflow/rans/twoeq/kepsilon/model.hh:85
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/rans/twoeq/kepsilon/model.hh:94
static constexpr int numFluidComponents()
The number of components.
Definition: freeflow/rans/twoeq/kepsilon/model.hh:88
static constexpr int dim()
The dimension of the model.
Definition: freeflow/rans/twoeq/kepsilon/model.hh:81
Traits for the Reynolds-averaged Navier-Stokes model.
Definition: freeflow/rans/model.hh:61
The type tag for the single-phase, isothermal k-epsilon model.
Definition: freeflow/rans/twoeq/kepsilon/model.hh:105
std::tuple< RANS > InheritsFrom
Definition: freeflow/rans/twoeq/kepsilon/model.hh:105
The type tag for the single-phase, non-isothermal k-epsilon model.
Definition: freeflow/rans/twoeq/kepsilon/model.hh:170
std::tuple< KEpsilon, RANSNI > InheritsFrom
Definition: freeflow/rans/twoeq/kepsilon/model.hh:170
The common indices for isothermal two-equation RANS models.
Definition: freeflow/rans/twoeq/indices.hh:29
The available free flow turbulence models in Dumux.