3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 *****************************************************************************/
77#ifndef DUMUX_ONEEQ_MODEL_HH
78#define DUMUX_ONEEQ_MODEL_HH
79
85
86#include "fluxvariables.hh"
87#include "indices.hh"
88#include "localresidual.hh"
89#include "problem.hh"
90#include "volumevariables.hh"
91#include "iofields.hh"
92
93namespace Dumux::Properties {
94
101template<int dimension>
103{
105 static constexpr int dim() { return dimension; }
106
109 static constexpr int numEq() { return dim()+1+1; }
110
112 static constexpr int numFluidComponents() { return 1; }
113
116
118 static constexpr auto turbulenceModel()
119 { return TurbulenceModel::oneeq; }
120};
121
123// default property values for the isothermal Spalart-Allmaras model
125
126// Create new type tags
127namespace TTag {
129struct OneEq { using InheritsFrom = std::tuple<RANS>; };
130} // end namespace TTag
131
133template<class TypeTag>
134struct ModelTraits<TypeTag, TTag::OneEq>
135{
136private:
138 static constexpr int dim = GridView::dimension;
139public:
141};
142
144template<class TypeTag>
145struct FluxVariables<TypeTag, TTag::OneEq>
146{
147private:
149public:
151};
152
154template<class TypeTag>
155struct LocalResidual<TypeTag, TTag::OneEq>
156{
157private:
159public:
161};
162
164template<class TypeTag>
165struct VolumeVariables<TypeTag, TTag::OneEq>
166{
167private:
172
173 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
174 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
175 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
176
179public:
181};
182
184template<class TypeTag>
185struct IOFields<TypeTag, TTag::OneEq> { using type = OneEqIOFields; };
186
188// default property values for the non-isothermal Spalart-Allmaras model
190
191// Create new type tags
192namespace TTag {
194struct OneEqNI { using InheritsFrom = std::tuple<OneEq, RANSNI>; };
195} // end namespace TTag
196
198template<class TypeTag>
199struct ModelTraits<TypeTag, TTag::OneEqNI>
200{
201private:
203 static constexpr int dim = GridView::dimension;
205public:
207};
208
210template<class TypeTag>
211struct VolumeVariables<TypeTag, TTag::OneEqNI>
212{
213private:
218
219 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
220 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
221 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
222
225public:
227};
228
230template<class TypeTag>
231struct IOFields<TypeTag, TTag::OneEqNI> { using type = FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
232
233} // end namespace Dumux::Properties
234
235#endif // DUMUX_ONEEQ_MODEL_HH
The available free flow turbulence models in Dumux.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Definition: common/properties.hh:48
Traits class encapsulating model specifications.
Definition: common/properties.hh:66
A class helping models to define input and output fields.
Definition: common/properties.hh:76
Definition: common/properties.hh:89
The secondary variables within a sub-control volume.
Definition: common/properties.hh:118
Container storing the different types of flux variables.
Definition: common/properties.hh:124
Definition: freeflow/navierstokes/fluxvariables.hh:35
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:37
Definition: freeflow/navierstokes/localresidual.hh:35
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
Definition: freeflow/rans/oneeq/fluxvariables.hh:35
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
Definition: freeflow/rans/oneeq/localresidual.hh:36
Traits for the Spalart-Allmaras model.
Definition: freeflow/rans/oneeq/model.hh:103
static constexpr int numEq()
Definition: freeflow/rans/oneeq/model.hh:109
static constexpr int dim()
The dimension of the model.
Definition: freeflow/rans/oneeq/model.hh:105
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/rans/oneeq/model.hh:118
static constexpr int numFluidComponents()
The number of components.
Definition: freeflow/rans/oneeq/model.hh:112
The type tag for the single-phase, isothermal Spalart-Allmaras model.
Definition: freeflow/rans/oneeq/model.hh:129
std::tuple< RANS > InheritsFrom
Definition: freeflow/rans/oneeq/model.hh:129
The type tag for the single-phase, non-isothermal Spalart-Allmaras model.
Definition: freeflow/rans/oneeq/model.hh:194
std::tuple< OneEq, RANSNI > InheritsFrom
Definition: freeflow/rans/oneeq/model.hh:194
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/volumevariables.hh:41
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Declares all properties used in Dumux.
Defines a type tag and some properties for free flow models.
Base class for all porous media problems.
Defines the primary variable and equation indices used by the isothermal tracer model.
Adds I/O fields specific to the tracer model.
A single-phase, isothermal Reynolds-Averaged Navier-Stokes model.
Base class for the model specific class which provides access to all volume averaged quantities.
Base class for the flux variables in porous medium models.