3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
freeflow/rans/oneeq/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 *****************************************************************************/
78
79#ifndef DUMUX_ONEEQ_MODEL_HH
80#define DUMUX_ONEEQ_MODEL_HH
81
87
88#include "fluxvariables.hh"
89#include "indices.hh"
90#include "localresidual.hh"
91#include "problem.hh"
92#include "volumevariables.hh"
93#include "iofields.hh"
94
95namespace Dumux::Properties {
96
103template<int dimension>
105{
107 static constexpr int dim() { return dimension; }
108
111 static constexpr int numEq() { return dim()+1+1; }
112
114 static constexpr int numFluidComponents() { return 1; }
115
118
120 static constexpr auto turbulenceModel()
121 { return TurbulenceModel::oneeq; }
122};
123
125// default property values for the isothermal Spalart-Allmaras model
127
128// Create new type tags
129namespace TTag {
131struct OneEq { using InheritsFrom = std::tuple<RANS>; };
132} // end namespace TTag
133
135template<class TypeTag>
136struct ModelTraits<TypeTag, TTag::OneEq>
137{
138private:
140 static constexpr int dim = GridView::dimension;
141public:
143};
144
146template<class TypeTag>
147struct FluxVariables<TypeTag, TTag::OneEq>
148{
149private:
150 using BaseFluxVariables = NavierStokesFluxVariables<TypeTag>;
151public:
153};
154
156template<class TypeTag>
157struct LocalResidual<TypeTag, TTag::OneEq>
158{
159private:
160 using BaseLocalResidual = NavierStokesResidual<TypeTag>;
161public:
163};
164
166template<class TypeTag>
167struct VolumeVariables<TypeTag, TTag::OneEq>
168{
169private:
174
175 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
176 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
177 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
178
180 using NSVolVars = NavierStokesVolumeVariables<Traits>;
181public:
183};
184
186template<class TypeTag>
187struct IOFields<TypeTag, TTag::OneEq> { using type = OneEqIOFields; };
188
190// default property values for the non-isothermal Spalart-Allmaras model
192
193// Create new type tags
194namespace TTag {
196struct OneEqNI { using InheritsFrom = std::tuple<OneEq, RANSNI>; };
197} // end namespace TTag
198
200template<class TypeTag>
201struct ModelTraits<TypeTag, TTag::OneEqNI>
202{
203private:
205 static constexpr int dim = GridView::dimension;
206 using IsothermalTraits = OneEqModelTraits<dim>;
207public:
209};
210
212template<class TypeTag>
213struct VolumeVariables<TypeTag, TTag::OneEqNI>
214{
215private:
220
221 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
222 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
223 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
224
226 using NSVolVars = NavierStokesVolumeVariables<Traits>;
227public:
229};
230
232template<class TypeTag>
233struct IOFields<TypeTag, TTag::OneEqNI> { using type = FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
234
235} // end namespace Dumux::Properties
236
237#endif
The available free flow turbulence models in Dumux.
@ oneeq
Definition turbulencemodel.hh:38
NavierStokesResidualImpl< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod > NavierStokesResidual
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
Definition freeflow/navierstokes/localresidual.hh:45
NavierStokesFluxVariablesImpl< TypeTag, GetPropType< TypeTag, Properties::GridGeometry >::discMethod > NavierStokesFluxVariables
The flux variables class for the Navier-Stokes model. This is a convenience alias for that actual,...
Definition freeflow/navierstokes/fluxvariables.hh:45
OneEqFluxVariablesImpl< TypeTag, BaseFluxVariables, GetPropType< TypeTag, Properties::GridGeometry >::discMethod > OneEqFluxVariables
The flux variables class for the one-equation turbulence model by Spalart-Allmaras....
Definition freeflow/rans/oneeq/fluxvariables.hh:45
OneEqResidualImpl< TypeTag, BaseLocalResidual, GetPropType< TypeTag, Properties::GridGeometry >::discMethod > OneEqResidual
The local residual class for the one-equation turbulence model by Spalart-Allmaras This is a convenie...
Definition freeflow/rans/oneeq/localresidual.hh:46
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:150
Definition common/properties.hh:37
Type tag for numeric models.
Definition grid.hh:36
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:103
Container storing the different types of flux variables.
Definition common/properties.hh:109
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 the isothermal one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/indices.hh:41
Adds I/O fields for the one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/iofields.hh:36
Traits for the Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:105
OneEqIndices< dim(), numFluidComponents()> Indices
the indices
Definition freeflow/rans/oneeq/model.hh:117
static constexpr int numEq()
Definition freeflow/rans/oneeq/model.hh:111
static constexpr int dim()
The dimension of the model.
Definition freeflow/rans/oneeq/model.hh:107
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/rans/oneeq/model.hh:120
static constexpr int numFluidComponents()
The number of components.
Definition freeflow/rans/oneeq/model.hh:114
The type tag for the single-phase, isothermal Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:131
std::tuple< RANS > InheritsFrom
Definition freeflow/rans/oneeq/model.hh:131
OneEqModelTraits< dim > type
Definition freeflow/rans/oneeq/model.hh:142
OneEqFluxVariables< TypeTag, BaseFluxVariables > type
Definition freeflow/rans/oneeq/model.hh:152
OneEqResidual< TypeTag, BaseLocalResidual > type
Definition freeflow/rans/oneeq/model.hh:162
OneEqVolumeVariables< Traits, NSVolVars > type
Definition freeflow/rans/oneeq/model.hh:182
OneEqIOFields type
Definition freeflow/rans/oneeq/model.hh:187
The type tag for the single-phase, non-isothermal Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:196
std::tuple< OneEq, RANSNI > InheritsFrom
Definition freeflow/rans/oneeq/model.hh:196
FreeflowNIModelTraits< IsothermalTraits > type
Definition freeflow/rans/oneeq/model.hh:208
OneEqVolumeVariables< Traits, NSVolVars > type
Definition freeflow/rans/oneeq/model.hh:228
FreeflowNonIsothermalIOFields< OneEqIOFields, true > type
Definition freeflow/rans/oneeq/model.hh:233
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/volumevariables.hh:42
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.
One-equation turbulence problem base class.
The flux variables class for the one-equation turbulence model by Spalart-Allmaras....
The common indices for the isothermal one-equation turbulence model by Spalart-Allmaras.
Adds I/O fields specific to non-isothermal free-flow models.
Adds I/O fields for the one-equation turbulence model by Spalart-Allmaras.
The local residual class for the one-equation turbulence model by Spalart-Allmaras This is a convenie...
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.