version 3.10.0
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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
66
67#ifndef DUMUX_ONEEQ_MODEL_HH
68#define DUMUX_ONEEQ_MODEL_HH
69
75
76#include "fluxvariables.hh"
77#include "indices.hh"
78#include "localresidual.hh"
79#include "problem.hh"
80#include "volumevariables.hh"
81#include "iofields.hh"
82
83namespace Dumux::Properties {
84
91template<int dimension>
93{
95 static constexpr int dim() { return dimension; }
96
99 static constexpr int numEq() { return dim()+1+1; }
100
102 static constexpr int numFluidComponents() { return 1; }
103
106
108 static constexpr auto turbulenceModel()
109 { return TurbulenceModel::oneeq; }
110};
111
113// default property values for the isothermal Spalart-Allmaras model
115
116// Create new type tags
117namespace TTag {
119struct OneEq { using InheritsFrom = std::tuple<RANS>; };
120} // end namespace TTag
121
123template<class TypeTag>
124struct ModelTraits<TypeTag, TTag::OneEq>
125{
126private:
128 static constexpr int dim = GridView::dimension;
129public:
131};
132
134template<class TypeTag>
135struct FluxVariables<TypeTag, TTag::OneEq>
136{
137private:
138 using BaseFluxVariables = NavierStokesFluxVariables<TypeTag>;
139public:
141};
142
144template<class TypeTag>
145struct LocalResidual<TypeTag, TTag::OneEq>
146{
147private:
148 using BaseLocalResidual = NavierStokesResidual<TypeTag>;
149public:
151};
152
154template<class TypeTag>
155struct VolumeVariables<TypeTag, TTag::OneEq>
156{
157private:
162
163 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
164 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
165 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
166
168 using NSVolVars = NavierStokesVolumeVariables<Traits>;
169public:
171};
172
174template<class TypeTag>
175struct IOFields<TypeTag, TTag::OneEq> { using type = OneEqIOFields; };
176
178// default property values for the non-isothermal Spalart-Allmaras model
180
181// Create new type tags
182namespace TTag {
184struct OneEqNI { using InheritsFrom = std::tuple<OneEq, RANSNI>; };
185} // end namespace TTag
186
188template<class TypeTag>
189struct ModelTraits<TypeTag, TTag::OneEqNI>
190{
191private:
193 static constexpr int dim = GridView::dimension;
194 using IsothermalTraits = OneEqModelTraits<dim>;
195public:
197};
198
200template<class TypeTag>
201struct VolumeVariables<TypeTag, TTag::OneEqNI>
202{
203private:
208
209 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
210 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
211 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
212
214 using NSVolVars = NavierStokesVolumeVariables<Traits>;
215public:
217};
218
220template<class TypeTag>
221struct IOFields<TypeTag, TTag::OneEqNI> { using type = FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
222
223} // end namespace Dumux::Properties
224
225#endif
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/volumevariables.hh:26
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/volumevariables.hh:30
Defines all properties used in Dumux.
Adds I/O fields specific to non-isothermal free-flow models.
Defines a type tag and some properties for free flow models.
A single-phase, isothermal Reynolds-Averaged Navier-Stokes model.
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 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...
One-equation turbulence problem base class.
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
@ oneeq
Definition turbulencemodel.hh:27
NavierStokesResidualImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesResidual
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
Definition freeflow/navierstokes/localresidual.hh:33
NavierStokesFluxVariablesImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesFluxVariables
The flux variables class for the Navier-Stokes model. This is a convenience alias for that actual,...
Definition freeflow/navierstokes/fluxvariables.hh:33
OneEqResidualImpl< TypeTag, BaseLocalResidual, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > OneEqResidual
The local residual class for the one-equation turbulence model by Spalart-Allmaras This is a convenie...
Definition freeflow/rans/oneeq/localresidual.hh:34
OneEqFluxVariablesImpl< TypeTag, BaseFluxVariables, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > OneEqFluxVariables
The flux variables class for the one-equation turbulence model by Spalart-Allmaras....
Definition freeflow/rans/oneeq/fluxvariables.hh:33
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
Type tag for numeric models.
Definition grid.hh:24
The energy balance equation for a porous solid.
Definition common/properties.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 class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/model.hh:111
Adds I/O fields for the one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/iofields.hh:24
The common indices for the isothermal one-equation turbulence model by Spalart-Allmaras.
Definition freeflow/rans/oneeq/indices.hh:29
OneEqFluxVariables< TypeTag, BaseFluxVariables > type
Definition freeflow/rans/oneeq/model.hh:140
OneEqIOFields type
Definition freeflow/rans/oneeq/model.hh:175
FreeflowNonIsothermalIOFields< OneEqIOFields, true > type
Definition freeflow/rans/oneeq/model.hh:221
OneEqResidual< TypeTag, BaseLocalResidual > type
Definition freeflow/rans/oneeq/model.hh:150
OneEqModelTraits< dim > type
Definition freeflow/rans/oneeq/model.hh:130
FreeflowNIModelTraits< IsothermalTraits > type
Definition freeflow/rans/oneeq/model.hh:196
Traits for the Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:93
OneEqIndices< dim(), numFluidComponents()> Indices
the indices
Definition freeflow/rans/oneeq/model.hh:105
static constexpr int numEq()
Definition freeflow/rans/oneeq/model.hh:99
static constexpr int dim()
The dimension of the model.
Definition freeflow/rans/oneeq/model.hh:95
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/rans/oneeq/model.hh:108
static constexpr int numFluidComponents()
The number of components.
Definition freeflow/rans/oneeq/model.hh:102
Traits for the Reynolds-averaged Navier-Stokes model.
Definition freeflow/rans/model.hh:61
The type tag for the single-phase, isothermal Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:119
std::tuple< RANS > InheritsFrom
Definition freeflow/rans/oneeq/model.hh:119
The type tag for the single-phase, non-isothermal Spalart-Allmaras model.
Definition freeflow/rans/oneeq/model.hh:184
std::tuple< OneEq, RANSNI > InheritsFrom
Definition freeflow/rans/oneeq/model.hh:184
OneEqVolumeVariables< Traits, NSVolVars > type
Definition freeflow/rans/oneeq/model.hh:170
OneEqVolumeVariables< Traits, NSVolVars > type
Definition freeflow/rans/oneeq/model.hh:216
The available free flow turbulence models in Dumux.