3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * 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 *****************************************************************************/
50#ifndef DUMUX_FREEFLOW_NC_MODEL_HH
51#define DUMUX_FREEFLOW_NC_MODEL_HH
52
54
61
62#include "volumevariables.hh"
63#include "localresidual.hh"
64#include "fluxvariables.hh"
65#include "iofields.hh"
66
70
72
73namespace Dumux {
74
84template<int dimension, int nComp, bool useM, int repCompEqIdx = nComp>
86{
89 static constexpr int numEq() { return dimension+nComp; }
90
92 static constexpr int numFluidComponents() { return nComp; }
93
95 static constexpr bool useMoles() { return useM; }
96
98 static constexpr bool enableMolecularDiffusion() { return true; }
99
101 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
102
104 static constexpr bool usesTurbulenceModel() { return false; }
105
107 static constexpr auto turbulenceModel()
108 { return TurbulenceModel::none; }
109
112};
113
115// properties for the single-phase, multi-component free-flow model
117namespace Properties {
118
120// Type tags
122
123// Create new type tags
124namespace TTag {
126struct NavierStokesNC { using InheritsFrom = std::tuple<FreeFlow>; };
127
129struct NavierStokesNCNI { using InheritsFrom = std::tuple<NavierStokesNC>; };
130} // end namespace TTag
131
133// default property values
135
137template<class TypeTag>
138struct ModelTraits<TypeTag, TTag::NavierStokesNC>
139{
140private:
142 static constexpr int dim = GridView::dimension;
144 static constexpr int numComponents = FluidSystem::numComponents;
145 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
146 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
147
148public:
150};
151
152template<class TypeTag>
153struct UseMoles<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = false; };
154template<class TypeTag>
155struct ReplaceCompEqIdx<TypeTag, TTag::NavierStokesNC> { static constexpr int value = 0; }; //<! Set the ReplaceCompEqIdx to 0 by default
156template<class TypeTag>
157struct NormalizePressure<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = true; };
158
160template<class TypeTag>
161struct LocalResidual<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCResidual<TypeTag>; };
162
164template<class TypeTag>
165struct VolumeVariables<TypeTag, TTag::NavierStokesNC>
166{
167private:
172
173 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
174 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
175 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
176 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
177
179public:
181};
182
184template<class TypeTag>
185struct FluxVariables<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCFluxVariables<TypeTag>; };
186
188template<class TypeTag>
189struct IOFields<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCIOFields<NavierStokesIOFields>; };
190
197template<class TypeTag>
198struct FluidState<TypeTag, TTag::NavierStokesNC>
199{
200private:
203public:
205};
206
208template<class TypeTag>
209struct MolecularDiffusionType<TypeTag, TTag::NavierStokesNC> { using type = FicksLaw<TypeTag>; };
210
212// Property values for non-isothermal multi-component free-flow model
214
216template<class TypeTag>
217struct ModelTraits<TypeTag, TTag::NavierStokesNCNI>
218{
219private:
221 static constexpr int dim = GridView::dimension;
223 static constexpr int numComponents = FluidSystem::numComponents;
224 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
225 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
227public:
229};
230
232template<class TypeTag>
233struct IOFields<TypeTag, TTag::NavierStokesNCNI>
234{
235private:
237public:
239};
240
242template<class TypeTag>
243struct HeatConductionType<TypeTag, TTag::NavierStokesNCNI> { using type = FouriersLaw<TypeTag>; };
244
245// \}
246} // end namespace Properties
247} // end namespace Dumux
248
249
250#endif
Calculates the element-wise residual for the staggered FV scheme.
Fick's law specilized for different discretization schemes. This file contains the data which is requ...
Fourier's law specialized for different discretization schemes This file contains the data which is r...
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
A gaseous phase consisting of a single component.
A liquid phase consisting of a single component.
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
Definition: common/properties.hh:91
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:102
The component balance index that should be replaced by the total mass/mole balance.
Definition: common/properties.hh:104
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
Container storing the different types of flux variables.
Definition: common/properties.hh:180
The type for the calculation of the molecular diffusion fluxes.
Definition: common/properties.hh:212
The type for the calculation of the heat conduction fluxes.
Definition: common/properties.hh:216
The type of the fluid state to use.
Definition: common/properties.hh:225
Returns whether to normalize the pressure term in the momentum balance or not.
Definition: common/properties.hh:346
forward declaration of the method-specific implemetation
Definition: box/fickslaw.hh:38
forward declaration of the method-specific implementation
Definition: fourierslaw.hh:37
Definition: freeflow/compositional/fluxvariables.hh:34
Adds I/O fields specific to the FreeflowNC model.
Definition: dumux/freeflow/compositional/iofields.hh:38
Definition: freeflow/compositional/localresidual.hh:36
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:86
static constexpr int replaceCompEqIdx()
Index of of a component balance eq. to be replaced by a total mass/mole balance.
Definition: navierstokesncmodel.hh:101
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: navierstokesncmodel.hh:107
static constexpr bool useMoles()
Use moles or not.
Definition: navierstokesncmodel.hh:95
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: navierstokesncmodel.hh:98
static constexpr int numFluidComponents()
The number of components.
Definition: navierstokesncmodel.hh:92
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: navierstokesncmodel.hh:104
static constexpr int numEq()
Definition: navierstokesncmodel.hh:89
The type tag for the single-phase, multi-component isothermal free-flow model.
Definition: navierstokesncmodel.hh:126
std::tuple< FreeFlow > InheritsFrom
Definition: navierstokesncmodel.hh:126
The type tag for the single-phase, multi-component non-isothermal free-flow model.
Definition: navierstokesncmodel.hh:129
std::tuple< NavierStokesNC > InheritsFrom
Definition: navierstokesncmodel.hh:129
Volume variables for the single-phase, multi-component free-flow model.
Definition: freeflow/compositional/volumevariables.hh:40
The common indices for the isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/indices.hh:37
Traits for the Navier-Stokes model.
Definition: freeflow/navierstokes/model.hh:77
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
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:47
Declares all properties used in Dumux.
A single-phase, isothermal Navier-Stokes model.
A single-phase, non-isothermal free-flow model.
Adds I/O fields specific to the twop model.
Base class for the flux variables in porous medium models.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Base class for the model specific class which provides access to all volume averaged quantities.