version 3.10-dev
navierstokesncmodel.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//
40#ifndef DUMUX_FREEFLOW_NC_MODEL_HH
41#define DUMUX_FREEFLOW_NC_MODEL_HH
42
44
51
52#include "volumevariables.hh"
53#include "localresidual.hh"
54#include "fluxvariables.hh"
55#include "iofields.hh"
56
60
62
63namespace Dumux {
64
74template<int dimension, int nComp, bool useM, int repCompEqIdx = nComp>
76{
79 static constexpr int numEq() { return dimension+nComp; }
80
82 static constexpr int numFluidComponents() { return nComp; }
83
85 static constexpr bool useMoles() { return useM; }
86
88 static constexpr bool enableMolecularDiffusion() { return true; }
89
91 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
92
94 static constexpr bool usesTurbulenceModel() { return false; }
95
97 static constexpr auto turbulenceModel()
98 { return TurbulenceModel::none; }
99
102};
103
105// properties for the single-phase, multi-component free-flow model
107namespace Properties {
108
110// Type tags
112
113// Create new type tags
114namespace TTag {
116struct NavierStokesNC { using InheritsFrom = std::tuple<FreeFlow>; };
117
119struct NavierStokesNCNI { using InheritsFrom = std::tuple<NavierStokesNC>; };
120} // end namespace TTag
121
123// default property values
125
127template<class TypeTag>
128struct ModelTraits<TypeTag, TTag::NavierStokesNC>
129{
130private:
132 static constexpr int dim = GridView::dimension;
134 static constexpr int numComponents = FluidSystem::numComponents;
135 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
136 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
137
138public:
140};
141
142template<class TypeTag>
143struct UseMoles<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = false; };
144template<class TypeTag>
145struct ReplaceCompEqIdx<TypeTag, TTag::NavierStokesNC> { static constexpr int value = 0; }; //<! Set the ReplaceCompEqIdx to 0 by default
146template<class TypeTag>
147struct NormalizePressure<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = true; };
148
150template<class TypeTag>
151struct LocalResidual<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCResidual<TypeTag>; };
152
154template<class TypeTag>
155struct MolecularDiffusionType<TypeTag, TTag::NavierStokesNC> { using type = FicksLaw<TypeTag>; };
156
158template<class TypeTag>
159struct VolumeVariables<TypeTag, TTag::NavierStokesNC>
160{
161private:
166 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
167 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
168 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
169 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
171
173 template<class BaseTraits, class DT>
174 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
175public:
177};
178
180template<class TypeTag>
181struct FluxVariables<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCFluxVariables<TypeTag>; };
182
184template<class TypeTag>
185struct IOFields<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCIOFields<NavierStokesIOFields>; };
186
193template<class TypeTag>
194struct FluidState<TypeTag, TTag::NavierStokesNC>
195{
196private:
199public:
201};
202
204// Property values for non-isothermal multi-component free-flow model
206
208template<class TypeTag>
209struct ModelTraits<TypeTag, TTag::NavierStokesNCNI>
210{
211private:
213 static constexpr int dim = GridView::dimension;
215 static constexpr int numComponents = FluidSystem::numComponents;
216 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
217 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
219public:
221};
222
224template<class TypeTag>
225struct IOFields<TypeTag, TTag::NavierStokesNCNI>
226{
227private:
229public:
231};
232
234template<class TypeTag>
235struct HeatConductionType<TypeTag, TTag::NavierStokesNCNI> { using type = FouriersLaw<TypeTag>; };
236
237} // end namespace Properties
238} // end namespace Dumux
239
240#endif
A gaseous phase consisting of a single component.
A liquid phase consisting of a single component.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:35
forward declaration of the method-specific implementation
Definition: flux/box/fickslaw.hh:32
forward declaration of the method-specific implementation
Definition: flux/box/fourierslaw.hh:26
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
Defines all properties used in Dumux.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Diffusive mass flux according to Fick's law.
Diffusive heat flux according to Fourier's law.
A single-phase, isothermal Navier-Stokes model.
A single-phase, non-isothermal free-flow model.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
Base class for the flux variables in porous medium models.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Python wrapper for volume variables (finite volume schemes)
Calculates the element-wise residual for the staggered FV scheme.
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
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:25
Traits for the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:63
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:76
static constexpr int replaceCompEqIdx()
Index of of a component balance eq. to be replaced by a total mass/mole balance.
Definition: navierstokesncmodel.hh:91
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: navierstokesncmodel.hh:97
static constexpr bool useMoles()
Use moles or not.
Definition: navierstokesncmodel.hh:85
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: navierstokesncmodel.hh:88
static constexpr int numFluidComponents()
The number of components.
Definition: navierstokesncmodel.hh:82
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: navierstokesncmodel.hh:94
static constexpr int numEq()
Definition: navierstokesncmodel.hh:79
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:111
The type tag for the single-phase, multi-component isothermal free-flow model.
Definition: navierstokesncmodel.hh:116
std::tuple< FreeFlow > InheritsFrom
Definition: navierstokesncmodel.hh:116
The type tag for the single-phase, multi-component non-isothermal free-flow model.
Definition: navierstokesncmodel.hh:119
std::tuple< NavierStokesNC > InheritsFrom
Definition: navierstokesncmodel.hh:119