version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
17#ifndef DUMUX_ZEROEQ_NC_MODEL_HH
18#define DUMUX_ZEROEQ_NC_MODEL_HH
19
24#include "volumevariables.hh"
25#include "iofields.hh"
26
27namespace Dumux {
28
30// properties for the single-phase, multi-component ZeroEq model
32namespace Properties {
33
35// Type tags
37
38// Create new type tags
39namespace TTag {
41struct ZeroEqNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
42} // end namespace TTag
43
45// default property values
47
53template<int dimension, int nComp, bool useM, int replaceCompEqIdx>
54struct ZeroEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useM, replaceCompEqIdx>
55{
57 static constexpr bool usesTurbulenceModel() { return true; }
58
60 static constexpr auto turbulenceModel()
61 { return TurbulenceModel::zeroeq; }
62};
63
65template<class TypeTag>
66struct ModelTraits<TypeTag, TTag::ZeroEqNC>
67{
68private:
70 static constexpr int dim = GridView::dimension;
72 static constexpr int numComponents = FluidSystem::numComponents;
73 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
74 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
75public:
77};
78
80template<class TypeTag>
81struct VolumeVariables<TypeTag, TTag::ZeroEqNC>
82{
83private:
88 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
89 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
90 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
91 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
93
95 template<class BaseTraits, class DT>
96 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
97
99public:
101};
102
104template<class TypeTag>
105struct IOFields<TypeTag, TTag::ZeroEqNC> { using type = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; };
106
108// Property values for non-isothermal multi-component ZeroEq model
110
111// Create new type tags
112namespace TTag {
114struct ZeroEqNCNI { using InheritsFrom = std::tuple<ZeroEqNC, NavierStokesNCNI>; };
115} // end namespace TTag
116
118template<class TypeTag>
119struct ModelTraits<TypeTag, TTag::ZeroEqNCNI>
120{
121private:
123 static constexpr int dim = GridView::dimension;
125 static constexpr int numComponents = FluidSystem::numComponents;
126 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
127 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
129public:
131};
132
134template<class TypeTag>
135struct VolumeVariables<TypeTag, TTag::ZeroEqNCNI>
136{
137private:
142 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
143 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
144 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
145 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
147
149 template<class BaseTraits, class DT>
150 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
152public:
154};
155
157template<class TypeTag>
158struct IOFields<TypeTag, TTag::ZeroEqNCNI>
159{
160private:
161 using IsothermalIOFields = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>;
162public:
163 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
164};
165
166} // end namespace Properties
167} // end namespace Dumux
168
169#endif
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:28
Volume variables for the single-phase 0-Eq. model.
Definition: freeflow/rans/zeroeq/volumevariables.hh:29
Defines all properties used in Dumux.
A single-phase, isothermal Reynolds-Averaged Navier-Stokes 0-Eq. model.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
A single-phase, multi-component free-flow model.
Adds I/O fields specific to the tracer model.
Python wrapper for volume variables (finite volume schemes)
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:26
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/nonisothermal/model.hh:47
Adds I/O fields specific to non-isothermal free-flow models.
Definition: freeflow/nonisothermal/iofields.hh:26
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:76
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:111
The type tags for the single-phase, multi-component isothermal ZeroEq model.
Definition: zeroeqncmodel.hh:41
std::tuple< NavierStokesNC > InheritsFrom
Definition: zeroeqncmodel.hh:41
The type tags for the single-phase, multi-component non-isothermal ZeroEq models.
Definition: zeroeqncmodel.hh:114
std::tuple< ZeroEqNC, NavierStokesNCNI > InheritsFrom
Definition: zeroeqncmodel.hh:114
Traits for the Reynolds-averaged Navier-Stokes 0-Eq. model.
Definition: zeroeqncmodel.hh:55
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: zeroeqncmodel.hh:57
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: zeroeqncmodel.hh:60
Adds I/O fields for the Reynolds-Averaged Navier-Stokes model.
Definition: freeflow/rans/iofields.hh:24