3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
zeroeqncmodel.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_ZEROEQ_NC_MODEL_HH
29#define DUMUX_ZEROEQ_NC_MODEL_HH
30
35#include "volumevariables.hh"
36#include "iofields.hh"
37
38namespace Dumux {
39
41// properties for the single-phase, multi-component ZeroEq model
43namespace Properties {
44
46// Type tags
48
49// Create new type tags
50namespace TTag {
52struct ZeroEqNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
53} // end namespace TTag
54
56// default property values
58
64template<int dimension, int nComp, bool useM, int replaceCompEqIdx>
65struct ZeroEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useM, replaceCompEqIdx>
66{
68 static constexpr bool usesTurbulenceModel() { return true; }
69
71 static constexpr auto turbulenceModel()
72 { return TurbulenceModel::zeroeq; }
73};
74
76template<class TypeTag>
77struct ModelTraits<TypeTag, TTag::ZeroEqNC>
78{
79private:
81 static constexpr int dim = GridView::dimension;
83 static constexpr int numComponents = FluidSystem::numComponents;
84 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
85 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
86public:
88};
89
91template<class TypeTag>
92struct VolumeVariables<TypeTag, TTag::ZeroEqNC>
93{
94private:
99 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
100 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
101 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
102 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
104
106 template<class BaseTraits, class DT>
107 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
108
110public:
112};
113
115template<class TypeTag>
116struct IOFields<TypeTag, TTag::ZeroEqNC> { using type = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; };
117
119// Property values for non-isothermal multi-component ZeroEq model
121
122// Create new type tags
123namespace TTag {
125struct ZeroEqNCNI { using InheritsFrom = std::tuple<ZeroEqNC, NavierStokesNCNI>; };
126} // end namespace TTag
127
129template<class TypeTag>
130struct ModelTraits<TypeTag, TTag::ZeroEqNCNI>
131{
132private:
134 static constexpr int dim = GridView::dimension;
136 static constexpr int numComponents = FluidSystem::numComponents;
137 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
138 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
140public:
142};
143
145template<class TypeTag>
146struct VolumeVariables<TypeTag, TTag::ZeroEqNCNI>
147{
148private:
153 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
154 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
155 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
156 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
158
160 template<class BaseTraits, class DT>
161 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
163public:
165};
166
168template<class TypeTag>
169struct IOFields<TypeTag, TTag::ZeroEqNCNI>
170{
171private:
172 using IsothermalIOFields = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>;
173public:
174 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
175};
176
177} // end namespace Properties
178} // end namespace Dumux
179
180#endif // DUMUX_ZEROEQ_NC_MODEL_HH
A single-phase, multi-component free-flow model.
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:66
A class helping models to define input and output fields.
Definition: common/properties.hh:76
The secondary variables within a sub-control volume.
Definition: common/properties.hh:118
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:39
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:88
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:40
The type tags for the single-phase, multi-component isothermal ZeroEq model.
Definition: zeroeqncmodel.hh:52
std::tuple< NavierStokesNC > InheritsFrom
Definition: zeroeqncmodel.hh:52
Traits for the Reynolds-averaged Navier-Stokes 0-Eq. model.
Definition: zeroeqncmodel.hh:66
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: zeroeqncmodel.hh:68
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: zeroeqncmodel.hh:71
The type tags for the single-phase, multi-component non-isothermal ZeroEq models.
Definition: zeroeqncmodel.hh:125
std::tuple< ZeroEqNC, NavierStokesNCNI > InheritsFrom
Definition: zeroeqncmodel.hh:125
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: 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
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: freeflow/rans/iofields.hh:36
Volume variables for the single-phase 0-Eq. model.
Definition: freeflow/rans/zeroeq/volumevariables.hh:41
Declares all properties used in Dumux.
A single-phase, isothermal Reynolds-Averaged Navier-Stokes 0-Eq. model.
Adds I/O fields specific to the tracer model.
Base class for the model specific class which provides access to all volume averaged quantities.