3.5-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 *****************************************************************************/
29#ifndef DUMUX_ZEROEQ_NC_MODEL_HH
30#define DUMUX_ZEROEQ_NC_MODEL_HH
31
36#include "volumevariables.hh"
37#include "iofields.hh"
38
39namespace Dumux {
40
42// properties for the single-phase, multi-component ZeroEq model
44namespace Properties {
45
47// Type tags
49
50// Create new type tags
51namespace TTag {
53struct ZeroEqNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
54} // end namespace TTag
55
57// default property values
59
65template<int dimension, int nComp, bool useM, int replaceCompEqIdx>
66struct ZeroEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useM, replaceCompEqIdx>
67{
69 static constexpr bool usesTurbulenceModel() { return true; }
70
72 static constexpr auto turbulenceModel()
73 { return TurbulenceModel::zeroeq; }
74};
75
77template<class TypeTag>
78struct ModelTraits<TypeTag, TTag::ZeroEqNC>
79{
80private:
82 static constexpr int dim = GridView::dimension;
84 static constexpr int numComponents = FluidSystem::numComponents;
85 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
86 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
87public:
89};
90
92template<class TypeTag>
93struct VolumeVariables<TypeTag, TTag::ZeroEqNC>
94{
95private:
100 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
101 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
102 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
103 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
105
107 template<class BaseTraits, class DT>
108 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
109
111public:
113};
114
116template<class TypeTag>
117struct IOFields<TypeTag, TTag::ZeroEqNC> { using type = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; };
118
120// Property values for non-isothermal multi-component ZeroEq model
122
123// Create new type tags
124namespace TTag {
126struct ZeroEqNCNI { using InheritsFrom = std::tuple<ZeroEqNC, NavierStokesNCNI>; };
127} // end namespace TTag
128
130template<class TypeTag>
131struct ModelTraits<TypeTag, TTag::ZeroEqNCNI>
132{
133private:
135 static constexpr int dim = GridView::dimension;
137 static constexpr int numComponents = FluidSystem::numComponents;
138 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
139 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
141public:
143};
144
146template<class TypeTag>
147struct VolumeVariables<TypeTag, TTag::ZeroEqNCNI>
148{
149private:
154 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
155 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
156 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
157 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
159
161 template<class BaseTraits, class DT>
162 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
164public:
166};
167
169template<class TypeTag>
170struct IOFields<TypeTag, TTag::ZeroEqNCNI>
171{
172private:
173 using IsothermalIOFields = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>;
174public:
175 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
176};
177
178} // end namespace Properties
179} // end namespace Dumux
180
181#endif
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
Definition: propertysystem.hh:150
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
A class helping models to define input and output fields.
Definition: common/properties.hh:63
The secondary variables within a sub-control volume.
Definition: common/properties.hh:107
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:38
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:53
std::tuple< NavierStokesNC > InheritsFrom
Definition: zeroeqncmodel.hh:53
Traits for the Reynolds-averaged Navier-Stokes 0-Eq. model.
Definition: zeroeqncmodel.hh:67
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: zeroeqncmodel.hh:69
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: zeroeqncmodel.hh:72
The type tags for the single-phase, multi-component non-isothermal ZeroEq models.
Definition: zeroeqncmodel.hh:126
std::tuple< ZeroEqNC, NavierStokesNCNI > InheritsFrom
Definition: zeroeqncmodel.hh:126
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:123
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.