3.6-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 *****************************************************************************/
52#ifndef DUMUX_FREEFLOW_NC_MODEL_HH
53#define DUMUX_FREEFLOW_NC_MODEL_HH
54
56
63
64#include "volumevariables.hh"
65#include "localresidual.hh"
66#include "fluxvariables.hh"
67#include "iofields.hh"
68
72
74
75namespace Dumux {
76
86template<int dimension, int nComp, bool useM, int repCompEqIdx = nComp>
88{
91 static constexpr int numEq() { return dimension+nComp; }
92
94 static constexpr int numFluidComponents() { return nComp; }
95
97 static constexpr bool useMoles() { return useM; }
98
100 static constexpr bool enableMolecularDiffusion() { return true; }
101
103 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
104
106 static constexpr bool usesTurbulenceModel() { return false; }
107
109 static constexpr auto turbulenceModel()
110 { return TurbulenceModel::none; }
111
114};
115
117// properties for the single-phase, multi-component free-flow model
119namespace Properties {
120
122// Type tags
124
125// Create new type tags
126namespace TTag {
128struct NavierStokesNC { using InheritsFrom = std::tuple<FreeFlow>; };
129
131struct NavierStokesNCNI { using InheritsFrom = std::tuple<NavierStokesNC>; };
132} // end namespace TTag
133
135// default property values
137
139template<class TypeTag>
140struct ModelTraits<TypeTag, TTag::NavierStokesNC>
141{
142private:
144 static constexpr int dim = GridView::dimension;
146 static constexpr int numComponents = FluidSystem::numComponents;
147 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
148 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
149
150public:
152};
153
154template<class TypeTag>
155struct UseMoles<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = false; };
156template<class TypeTag>
157struct ReplaceCompEqIdx<TypeTag, TTag::NavierStokesNC> { static constexpr int value = 0; }; //<! Set the ReplaceCompEqIdx to 0 by default
158template<class TypeTag>
159struct NormalizePressure<TypeTag, TTag::NavierStokesNC> { static constexpr bool value = true; };
160
162template<class TypeTag>
163struct LocalResidual<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCResidual<TypeTag>; };
164
166template<class TypeTag>
167struct MolecularDiffusionType<TypeTag, TTag::NavierStokesNC> { using type = FicksLaw<TypeTag>; };
168
170template<class TypeTag>
171struct VolumeVariables<TypeTag, TTag::NavierStokesNC>
172{
173private:
178 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
179 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
180 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
181 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
183
185 template<class BaseTraits, class DT>
186 struct NCTraits : public BaseTraits { using DiffusionType = DT; };
187public:
189};
190
192template<class TypeTag>
193struct FluxVariables<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCFluxVariables<TypeTag>; };
194
196template<class TypeTag>
197struct IOFields<TypeTag, TTag::NavierStokesNC> { using type = FreeflowNCIOFields<NavierStokesIOFields>; };
198
205template<class TypeTag>
206struct FluidState<TypeTag, TTag::NavierStokesNC>
207{
208private:
211public:
213};
214
216// Property values for non-isothermal multi-component free-flow model
218
220template<class TypeTag>
221struct ModelTraits<TypeTag, TTag::NavierStokesNCNI>
222{
223private:
225 static constexpr int dim = GridView::dimension;
227 static constexpr int numComponents = FluidSystem::numComponents;
228 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
229 static constexpr int replaceCompEqIdx = getPropValue<TypeTag, Properties::ReplaceCompEqIdx>();
231public:
233};
234
236template<class TypeTag>
237struct IOFields<TypeTag, TTag::NavierStokesNCNI>
238{
239private:
241public:
243};
244
246template<class TypeTag>
247struct HeatConductionType<TypeTag, TTag::NavierStokesNCNI> { using type = FouriersLaw<TypeTag>; };
248
249} // end namespace Properties
250} // end namespace Dumux
251
252#endif
Calculates the element-wise residual for the staggered FV scheme.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
A liquid phase consisting of a single component.
A gaseous phase consisting of a single component.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Traits class encapsulating model specifications.
Definition: common/properties.hh:51
A class helping models to define input and output fields.
Definition: common/properties.hh:61
Definition: common/properties.hh:72
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:83
The component balance index that should be replaced by the total mass/mole balance.
Definition: common/properties.hh:85
The secondary variables within a sub-control volume.
Definition: common/properties.hh:105
Container storing the different types of flux variables.
Definition: common/properties.hh:111
The type for the calculation of the molecular diffusion fluxes.
Definition: common/properties.hh:143
The type for the calculation of the heat conduction fluxes.
Definition: common/properties.hh:149
The type of the fluid state to use.
Definition: common/properties.hh:162
Returns whether to normalize the pressure term in the momentum balance or not.
Definition: common/properties.hh:283
forward declaration of the method-specific implementation
Definition: flux/box/fickslaw.hh:44
forward declaration of the method-specific implementation
Definition: flux/box/fourierslaw.hh:38
The flux variables class for the multi-component free-flow model using the staggered grid discretizat...
Definition: freeflow/compositional/fluxvariables.hh:34
Adds I/O fields specific to the FreeflowNC model.
Definition: freeflow/compositional/iofields.hh:38
Element-wise calculation of the multi-component free-flow residual for models using the staggered dis...
Definition: freeflow/compositional/localresidual.hh:36
Traits for the multi-component free-flow model.
Definition: navierstokesncmodel.hh:88
static constexpr int replaceCompEqIdx()
Index of of a component balance eq. to be replaced by a total mass/mole balance.
Definition: navierstokesncmodel.hh:103
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: navierstokesncmodel.hh:109
static constexpr bool useMoles()
Use moles or not.
Definition: navierstokesncmodel.hh:97
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: navierstokesncmodel.hh:100
static constexpr int numFluidComponents()
The number of components.
Definition: navierstokesncmodel.hh:94
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: navierstokesncmodel.hh:106
static constexpr int numEq()
Definition: navierstokesncmodel.hh:91
The type tag for the single-phase, multi-component isothermal free-flow model.
Definition: navierstokesncmodel.hh:128
std::tuple< FreeFlow > InheritsFrom
Definition: navierstokesncmodel.hh:128
The type tag for the single-phase, multi-component non-isothermal free-flow model.
Definition: navierstokesncmodel.hh:131
std::tuple< NavierStokesNC > InheritsFrom
Definition: navierstokesncmodel.hh:131
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:75
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
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.
Diffusive mass flux according to Fick's law.
Diffusive heat flux according to Fourier's law.
Adds I/O fields specific to the tracer 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.
Python wrapper for volume variables (finite volume schemes)