3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
freeflow/navierstokes/mass/1p/model.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 *****************************************************************************/
45
46#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
47#define DUMUX_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
48
51
53
59
61
62#include "localresidual.hh"
63#include "volumevariables.hh"
64#include "fluxvariables.hh"
65#include "indices.hh"
66
67namespace Dumux {
68
74{
77 static constexpr int numEq() { return 1; }
78
80 static constexpr int numFluidPhases() { return 1; }
81
83 static constexpr int numFluidComponents() { return 1; }
84
86 static constexpr bool enableAdvection() { return true; }
87
89 static constexpr bool enableMolecularDiffusion() { return false; }
90
92 static constexpr bool enableEnergyBalance() { return false; }
93
95 static constexpr bool usesTurbulenceModel() { return false; }
96
98 static constexpr auto turbulenceModel()
99 { return TurbulenceModel::none; }
100
103};
104
114template<class PV,
115 class FSY,
116 class FST,
117 class MT>
119{
121 using FluidSystem = FSY;
122 using FluidState = FST;
123 using ModelTraits = MT;
124};
125
126// \{
128// properties for the single-phase Navier-Stokes model
130namespace Properties {
131
133// Type tags
135
136// Create new type tags
137namespace TTag {
139struct NavierStokesMassOneP{ using InheritsFrom = std::tuple<ModelProperties>; };
140struct NavierStokesMassOnePNI{ using InheritsFrom = std::tuple<NavierStokesMassOneP>; };
141} // end namespace TTag
142
143
144template<class TypeTag>
145struct ModelTraits<TypeTag, TTag::NavierStokesMassOneP>
147
154template<class TypeTag>
155struct FluidState<TypeTag, TTag::NavierStokesMassOneP>
156{
157private:
160public:
162};
163
165template<class TypeTag>
166struct LocalResidual<TypeTag, TTag::NavierStokesMassOneP>
168
170template<class TypeTag>
171struct VolumeVariables<TypeTag, TTag::NavierStokesMassOneP>
172{
173private:
178
179 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
180 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
181 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
182
184public:
186};
187
189template<class TypeTag>
190struct FluxVariables<TypeTag, TTag::NavierStokesMassOneP>
191{
192private:
195 struct DiffusiveFluxTypes {}; // no diffusion
196 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
197 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
198public:
200 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
201 >;
202};
203
204// ! The specific I/O fields
205template<class TypeTag>
206struct IOFields<TypeTag, TTag::NavierStokesMassOneP> { using type = NavierStokesIOFields; };
207
208template<class TypeTag>
209struct CouplingManager<TypeTag, TTag::NavierStokesMassOneP>
210{
211public:
212 using type = struct EmptyCouplingManager {};
213};
214
215// Set the default spatial parameters
216template<class TypeTag>
223
224// Properties for the non-isothermal single phase model
226
228template<class TypeTag>
229struct IOFields<TypeTag, TTag::NavierStokesMassOnePNI>
231
233template<class TypeTag>
236
238template<class TypeTag>
239struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePNI>
240{
241private:
246
247 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
248 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
249 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
250
254 struct NITraits : public BaseTraits
255 {
256 using EffectiveThermalConductivityModel = ETCM;
257 using HeatConductionType = HCT;
258 };
259public:
261};
262
264template<class TypeTag>
265struct ThermalConductivityModel<TypeTag, TTag::NavierStokesMassOnePNI>
266{
267 struct type
268 {
269 template<class VolVars>
270 static auto effectiveThermalConductivity(const VolVars& volVars)
271 {
272 return volVars.fluidThermalConductivity();
273 }
274 };
275};
276
277template<class TypeTag>
278struct HeatConductionType<TypeTag, TTag::NavierStokesMassOnePNI>
280
282template<class TypeTag>
283struct FluxVariables<TypeTag, TTag::NavierStokesMassOnePNI>
284{
285private:
288
289 struct DiffusiveFluxTypes
290 {
292 };
293
294 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
295 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
296
297public:
299 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
300 >;
301};
302
303template<class TypeTag>
304struct FluxVariablesCache<TypeTag, TTag::NavierStokesMassOnePNI>
305{
306 struct type : public GetPropType<TypeTag, Properties::HeatConductionType>::Cache
307 {};
308};
309
310template<class TypeTag>
323
324template<class TypeTag>
325struct SolutionDependentHeatConduction<TypeTag, TTag::NavierStokesMassOnePNI>
326{ static constexpr bool value = true; };
327
328} // end namespace Properties
329} // end namespace Dumux
330
331#endif
A helper class to fill the flux variables cache.
The available free flow turbulence models in Dumux.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
@ none
Definition turbulencemodel.hh:39
FreeFlowScalarFluxVariablesCacheFillerImplementation< Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent, typename ProblemTraits< Problem >::GridGeometry::DiscretizationMethod > FreeFlowScalarFluxVariablesCacheFiller
The flux variables cache filler class for free flow.
Definition scalarfluxvariablescachefiller.hh:48
FouriersLawImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > FouriersLaw
Evaluates the heat conduction flux according to Fouriers's law.
Definition fourierslaw_fwd.hh:43
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition adapt.hh:29
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:188
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:180
Definition common/properties.hh:37
Type tag for numeric models.
Definition grid.hh:36
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
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
Stores data associated with flux vars.
Definition common/properties.hh:113
The engine behind the global flux cache (how to fill caches for the stencil).
Definition common/properties.hh:115
The type for the calculation of the heat conduction fluxes.
Definition common/properties.hh:149
specifies if the parameters for the heat conduction fluxes depend on the solution
Definition common/properties.hh:155
The type of the spatial parameters object.
Definition common/properties.hh:158
The type of the fluid state to use.
Definition common/properties.hh:162
Model to be used for the calculation of the effective conductivity.
Definition common/properties.hh:170
Definition common/properties.hh:291
Adds I/O fields specific to non-isothermal free-flow models.
Definition freeflow/navierstokes/energy/iofields.hh:37
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition freeflow/navierstokes/energy/model.hh:59
Adds I/O fields for the Navier-Stokes model.
Definition freeflow/navierstokes/iofields.hh:79
The flux variables class for the single-phase flow Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/fluxvariables.hh:51
The common indices for the isothermal Navier-Stokes mass conservation model.
Definition freeflow/navierstokes/mass/1p/indices.hh:34
Element-wise calculation of the Navier-Stokes residual for single-phase flow.
Definition freeflow/navierstokes/mass/1p/localresidual.hh:38
Traits for the single-phase flow Navier-Stokes mass model.
Definition freeflow/navierstokes/mass/1p/model.hh:74
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition freeflow/navierstokes/mass/1p/model.hh:89
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/navierstokes/mass/1p/model.hh:98
static constexpr bool enableAdvection()
Enable advection.
Definition freeflow/navierstokes/mass/1p/model.hh:86
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition freeflow/navierstokes/mass/1p/model.hh:95
static constexpr int numFluidComponents()
The number of components is 1.
Definition freeflow/navierstokes/mass/1p/model.hh:83
NavierStokesMassOnePIndices Indices
the indices
Definition freeflow/navierstokes/mass/1p/model.hh:102
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition freeflow/navierstokes/mass/1p/model.hh:92
static constexpr int numEq()
Definition freeflow/navierstokes/mass/1p/model.hh:77
static constexpr int numFluidPhases()
The number of phases is 1.
Definition freeflow/navierstokes/mass/1p/model.hh:80
Traits class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/model.hh:119
FST FluidState
Definition freeflow/navierstokes/mass/1p/model.hh:122
PV PrimaryVariables
Definition freeflow/navierstokes/mass/1p/model.hh:120
FSY FluidSystem
Definition freeflow/navierstokes/mass/1p/model.hh:121
MT ModelTraits
Definition freeflow/navierstokes/mass/1p/model.hh:123
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/model.hh:139
std::tuple< ModelProperties > InheritsFrom
Definition freeflow/navierstokes/mass/1p/model.hh:139
Definition freeflow/navierstokes/mass/1p/model.hh:140
std::tuple< NavierStokesMassOneP > InheritsFrom
Definition freeflow/navierstokes/mass/1p/model.hh:140
NavierStokesMassOnePModelTraits type
Definition freeflow/navierstokes/mass/1p/model.hh:146
Dumux::ImmiscibleFluidState< Scalar, FluidSystem > type
Definition freeflow/navierstokes/mass/1p/model.hh:161
NavierStokesMassOnePLocalResidual< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:167
NavierStokesMassOnePVolumeVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:185
NavierStokesMassOnePFluxVariables< Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache > type
Definition freeflow/navierstokes/mass/1p/model.hh:199
NavierStokesIOFields type
Definition freeflow/navierstokes/mass/1p/model.hh:206
struct EmptyCouplingManager {} type
Definition freeflow/navierstokes/mass/1p/model.hh:212
FreeFlowDefaultSpatialParams< GridGeometry, Scalar > type
Definition freeflow/navierstokes/mass/1p/model.hh:221
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition freeflow/navierstokes/mass/1p/model.hh:219
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition freeflow/navierstokes/mass/1p/model.hh:220
NavierStokesEnergyIOFields< NavierStokesIOFields > type
Definition freeflow/navierstokes/mass/1p/model.hh:230
NavierStokesEnergyModelTraits< NavierStokesMassOnePModelTraits > type
Definition freeflow/navierstokes/mass/1p/model.hh:235
NavierStokesMassOnePVolumeVariables< NITraits > type
Definition freeflow/navierstokes/mass/1p/model.hh:260
static auto effectiveThermalConductivity(const VolVars &volVars)
Definition freeflow/navierstokes/mass/1p/model.hh:270
FouriersLaw< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:279
NavierStokesMassOnePFluxVariables< Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache > type
Definition freeflow/navierstokes/mass/1p/model.hh:298
FreeFlowScalarFluxVariablesCacheFiller< Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent > type
Definition freeflow/navierstokes/mass/1p/model.hh:319
GetPropType< TypeTag, Properties::Problem > Problem
Definition freeflow/navierstokes/mass/1p/model.hh:313
GetPropType< TypeTag, Properties::ModelTraits > ModelTraits
Definition freeflow/navierstokes/mass/1p/model.hh:314
static constexpr bool diffusionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:315
static constexpr bool heatConductionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:317
static constexpr bool value
Definition freeflow/navierstokes/mass/1p/model.hh:326
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/volumevariables.hh:41
Definition of the spatial parameters for the freeflow problems.
Definition freeflow/spatialparams.hh:54
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition immiscible.hh:42
Declares all properties used in Dumux.
Defines a type tags and some fundamental properties for all models.
A single-phase, non-isothermal free-flow model.
Diffusive heat flux according to Fourier's law.
Adds I/O fields for the Navier-Stokes model.
The common indices for the isothermal Navier-Stokes model.
The flux variables class for the single-phase flow Navier-Stokes model.
Element-wise calculation of the Navier-Stokes residual for models using the staggered discretization.
Volume variables for the single-phase Navier-Stokes model.
Definition of the spatial parameters for the freeflow problems.