version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
16#ifndef DUMUX_ONEEQ_NC_MODEL_HH
17#define DUMUX_ONEEQ_NC_MODEL_HH
18
23
24#include "iofields.hh"
25
26namespace Dumux {
27
29// properties for the single-phase, multi-component one-equation model
31namespace Properties {
32
34// Type tags
36
37// Create new type tags
38namespace TTag {
40struct OneEqNC { using InheritsFrom = std::tuple<NavierStokesNC>; };
41} // end namespace TTag
42
44// default property values
46
56template<int dimension, int nComp, bool useMoles, int replaceCompEqIdx>
57struct OneEqNCModelTraits : NavierStokesNCModelTraits<dimension, nComp, useMoles, replaceCompEqIdx>
58{
61 static constexpr int numEq() { return dimension+nComp+1; }
62
64 static constexpr bool usesTurbulenceModel() { return true; }
65
67 static constexpr auto turbulenceModel()
68 { return TurbulenceModel::oneeq; }
69
72};
73
75template<class TypeTag>
76struct ModelTraits<TypeTag, TTag::OneEqNC>
77{
78private:
80 static constexpr int dimension = 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::OneEqNC>
92{
93private:
98 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
99 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
100 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
101 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
103
105 template<class BaseTraits, class DT>
106 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
107
109public:
111};
112
114template<class TypeTag>
115struct LocalResidual<TypeTag, TTag::OneEqNC>
116{
117private:
119public:
121};
122
124template<class TypeTag>
125struct FluxVariables<TypeTag, TTag::OneEqNC>
126{
127private:
129public:
131};
132
134template<class TypeTag>
135struct IOFields<TypeTag, TTag::OneEqNC> { using type = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>; };
136
138// Property values for non-isothermal multi-component one-equation model
140
141// Create new type tags
142namespace TTag {
144struct OneEqNCNI { using InheritsFrom = std::tuple<OneEqNC, NavierStokesNCNI>; };
145} // end namespace TTag
146
148template<class TypeTag>
149struct ModelTraits<TypeTag, TTag::OneEqNCNI>
150{
151private:
153 static constexpr int dim = GridView::dimension;
155 static constexpr int numComponents = FluidSystem::numComponents;
156 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
157 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
159public:
161};
162
164template<class TypeTag>
165struct VolumeVariables<TypeTag, TTag::OneEqNCNI>
166{
167private:
172 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
173 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
174 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
175 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
177
179 template<class BaseTraits, class DT>
180 struct NCNITraits : public BaseTraits { using DiffusionType = DT; };
182public:
184};
185
187template<class TypeTag>
188struct LocalResidual<TypeTag, TTag::OneEqNCNI>
189{
190private:
192public:
194};
195
197template<class TypeTag>
198struct FluxVariables<TypeTag, TTag::OneEqNCNI>
199{
200private:
202public:
204};
205
207template<class TypeTag>
208struct IOFields<TypeTag, TTag::OneEqNCNI>
209{
210private:
211 using IsothermalIOFields = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>;
212public:
213 using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>;
214};
215
216} // end namespace Properties
217} // end namespace Dumux
218
219#endif
The flux variables class for the multi-component free-flow model using the staggered grid discretizat...
Definition: freeflow/compositional/fluxvariables.hh:22
Element-wise calculation of the multi-component free-flow residual for models using the staggered dis...
Definition: freeflow/compositional/localresidual.hh:24
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:28
The flux variables class for the one-equation model by Spalart-Allmaras using the staggered grid disc...
Definition: freeflow/rans/oneeq/fluxvariables.hh:23
Element-wise calculation of the residual for one-equation turbulence models using the staggered discr...
Definition: freeflow/rans/oneeq/localresidual.hh:24
Volume variables for the isothermal single-phase one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/volumevariables.hh:30
Defines all properties used in Dumux.
A single-phase, isothermal one-equation turbulence model by Spalart-Allmaras.
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.
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
Adds I/O fields for the one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/iofields.hh:24
The common indices for the isothermal one-equation turbulence model by Spalart-Allmaras.
Definition: freeflow/rans/oneeq/indices.hh:29
Traits for the one-equation multi-component modelstates some specifics of the isothermal multi-compon...
Definition: oneeqncmodel.hh:58
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: oneeqncmodel.hh:67
static constexpr int numEq()
Definition: oneeqncmodel.hh:61
static constexpr bool usesTurbulenceModel()
The model does include a turbulence model.
Definition: oneeqncmodel.hh:64
The type tags for the single-phase, multi-component isothermal one-equation model.
Definition: oneeqncmodel.hh:40
std::tuple< NavierStokesNC > InheritsFrom
Definition: oneeqncmodel.hh:40
The type tags for the single-phase, multi-component non-isothermal one-equation models.
Definition: oneeqncmodel.hh:144
std::tuple< OneEqNC, NavierStokesNCNI > InheritsFrom
Definition: oneeqncmodel.hh:144