3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
oneeqncmodel.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 *****************************************************************************/
28#ifndef DUMUX_ONEEQ_NC_MODEL_HH
29#define DUMUX_ONEEQ_NC_MODEL_HH
30
35
36#include "iofields.hh"
37
38namespace Dumux {
39
41// properties for the single-phase, multi-component one-equation model
43namespace Properties {
44
46// Type tags
48
49// Create new type tags
50namespace TTag {
52struct OneEqNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
53} // end namespace TTag
54
56// default property values
58
68template<int dimension, int nComp, bool useMoles, int replaceCompEqIdx>
69struct OneEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useMoles, replaceCompEqIdx>
70{
73 static constexpr int numEq() { return dimension+nComp+1; }
74
76 static constexpr bool usesTurbulenceModel() { return true; }
77
79 static constexpr auto turbulenceModel()
80 { return TurbulenceModel::oneeq; }
81
84};
85
87template<class TypeTag>
88struct ModelTraits<TypeTag, TTag::OneEqNC>
89{
90private:
92 static constexpr int dimension = GridView::dimension;
94 static constexpr int numComponents = FluidSystem::numComponents;
95 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
96 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
97public:
99};
100
102template<class TypeTag>
103struct VolumeVariables<TypeTag, TTag::OneEqNC>
104{
105private:
110
111 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
112 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
113 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
114 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
115
118public:
120};
121
123template<class TypeTag>
124struct LocalResidual<TypeTag, TTag::OneEqNC>
125{
126private:
128public:
130};
131
133template<class TypeTag>
134struct FluxVariables<TypeTag, TTag::OneEqNC>
135{
136private:
138public:
140};
141
143template<class TypeTag>
144struct IOFields<TypeTag, TTag::OneEqNC> { using type = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
145
147// Property values for non-isothermal multi-component one-equation model
149
150// Create new type tags
151namespace TTag {
153struct OneEqNCNI { using InheritsFrom = std::tuple<OneEqNC, NavierStokesNCNI>; };
154} // end namespace TTag
155
157template<class TypeTag>
158struct ModelTraits<TypeTag, TTag::OneEqNCNI>
159{
160private:
162 static constexpr int dim = GridView::dimension;
164 static constexpr int numComponents = FluidSystem::numComponents;
165 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
166 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
168public:
170};
171
173template<class TypeTag>
174struct VolumeVariables<TypeTag, TTag::OneEqNCNI>
175{
176private:
181
182 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
183 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
184 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
185 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
186
189public:
191};
192
194template<class TypeTag>
195struct LocalResidual<TypeTag, TTag::OneEqNCNI>
196{
197private:
199public:
201};
202
204template<class TypeTag>
205struct FluxVariables<TypeTag, TTag::OneEqNCNI>
206{
207private:
209public:
211};
212
214template<class TypeTag>
215struct IOFields<TypeTag, TTag::OneEqNCNI>
216{
217private:
218 using IsothermalIOFields = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>;
219public:
220 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
221};
222
223// \}
224} // end namespace Properties
225} // end namespace Dumux
226
227#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
A class helping models to define input and output fields.
Definition: common/properties.hh:78
Definition: common/properties.hh:91
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
Container storing the different types of flux variables.
Definition: common/properties.hh:180
Definition: freeflow/compositional/fluxvariables.hh:34
Adds I/O fields specific to the FreeflowNC model.
Definition: dumux/freeflow/compositional/iofields.hh:38
Definition: freeflow/compositional/localresidual.hh:36
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:86
The type tags for the single-phase, multi-component isothermal one-equation model.
Definition: oneeqncmodel.hh:52
std::tuple< NavierStokesNC > InheritsFrom
Definition: oneeqncmodel.hh:52
Traits for the one-equation multi-component modelstates some specifics of the isothermal multi-compon...
Definition: oneeqncmodel.hh:70
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: oneeqncmodel.hh:79
static constexpr int numEq()
Definition: oneeqncmodel.hh:73
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: oneeqncmodel.hh:76
The type tags for the single-phase, multi-component non-isothermal one-equation models.
Definition: oneeqncmodel.hh:153
std::tuple< OneEqNC, NavierStokesNCNI > InheritsFrom
Definition: oneeqncmodel.hh:153
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:40
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:125
Adds I/O fields specific to non-isothermal free-flow models.
Definition: dumux/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
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: dumux/freeflow/rans/oneeq/iofields.hh:36
Definition: freeflow/rans/oneeq/localresidual.hh:36
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/volumevariables.hh:41
Declares all properties used in Dumux.
A single-phase, isothermal one-equation turbulence model by Spalart-Allmaras.
Adds I/O fields specific to the twop model.