3.1-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
63template<int dimension, int nComp, bool useM, int replaceCompEqIdx>
64struct ZeroEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useM, replaceCompEqIdx>
65{
67 static constexpr bool usesTurbulenceModel() { return true; }
68
70 static constexpr auto turbulenceModel()
71 { return TurbulenceModel::zeroeq; }
72};
73
75template<class TypeTag>
76struct ModelTraits<TypeTag, TTag::ZeroEqNC>
77{
78private:
80 static constexpr int dim = GridView::dimension;
82 static constexpr int numComponents = FluidSystem::numComponents;
83 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
84 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
85public:
87};
88
90template<class TypeTag>
91struct VolumeVariables<TypeTag, TTag::ZeroEqNC>
92{
93private:
98
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");
103
106public:
108};
109
111template<class TypeTag>
112struct IOFields<TypeTag, TTag::ZeroEqNC> { using type = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; };
113
115// Property values for non-isothermal multi-component ZeroEq model
117
118// Create new type tags
119namespace TTag {
121struct ZeroEqNCNI { using InheritsFrom = std::tuple<ZeroEqNC, NavierStokesNCNI>; };
122} // end namespace TTag
123
125template<class TypeTag>
126struct ModelTraits<TypeTag, TTag::ZeroEqNCNI>
127{
128private:
130 static constexpr int dim = GridView::dimension;
132 static constexpr int numComponents = FluidSystem::numComponents;
133 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
134 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
136public:
138};
139
141template<class TypeTag>
142struct VolumeVariables<TypeTag, TTag::ZeroEqNCNI>
143{
144private:
149
150 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
151 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
152 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
153 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
154
157public:
159};
160
162template<class TypeTag>
163struct IOFields<TypeTag, TTag::ZeroEqNCNI>
164{
165private:
166 using IsothermalIOFields = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>;
167public:
168 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
169};
170
171// \}
172} // end namespace Properties
173} // end namespace Dumux
174
175#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
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
Adds I/O fields specific to the FreeflowNC model.
Definition: dumux/freeflow/compositional/iofields.hh:38
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:86
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:65
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: zeroeqncmodel.hh:67
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: zeroeqncmodel.hh:70
The type tags for the single-phase, multi-component non-isothermal ZeroEq models.
Definition: zeroeqncmodel.hh:121
std::tuple< ZeroEqNC, NavierStokesNCNI > InheritsFrom
Definition: zeroeqncmodel.hh:121
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
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: dumux/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 twop model.
Base class for the model specific class which provides access to all volume averaged quantities.