version 3.10.0
Loading...
Searching...
No Matches
freeflow/navierstokes/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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
33
34#ifndef DUMUX_NAVIERSTOKES_MODEL_HH
35#define DUMUX_NAVIERSTOKES_MODEL_HH
36
42
43#include "localresidual.hh"
44#include "volumevariables.hh"
45#include "fluxvariables.hh"
46#include "indices.hh"
47#include "iofields.hh"
48
52
53namespace Dumux {
54
61template<int dimension>
63{
65 static constexpr int dim() { return dimension; }
66
69 static constexpr int numEq() { return dimension+1; }
70
72 static constexpr int numFluidPhases() { return 1; }
73
75 static constexpr int numFluidComponents() { return 1; }
76
78 static constexpr bool enableAdvection() { return true; }
79
81 static constexpr bool enableMolecularDiffusion() { return false; }
82
84 static constexpr bool enableEnergyBalance() { return false; }
85
87 static constexpr bool usesTurbulenceModel() { return false; }
88
90 static constexpr auto turbulenceModel()
91 { return TurbulenceModel::none; }
92
95};
96
106template<class PV,
107 class FSY,
108 class FST,
109 class MT>
111{
113 using FluidSystem = FSY;
114 using FluidState = FST;
115 using ModelTraits = MT;
116};
117
118// \{
120// properties for the single-phase Navier-Stokes model
122namespace Properties {
123
125// Type tags
127
128// Create new type tags
129namespace TTag {
131struct NavierStokes { using InheritsFrom = std::tuple<FreeFlow>; };
132
134struct NavierStokesNI { using InheritsFrom = std::tuple<NavierStokes>; };
135} // end namespace TTag
136
138// default property values for the isothermal single phase model
140template<class TypeTag>
141struct NormalizePressure<TypeTag, TTag::NavierStokes> { static constexpr bool value = true; };
142
144template<class TypeTag>
145struct ModelTraits<TypeTag, TTag::NavierStokes>
146{
147private:
149 static constexpr auto dim = GridView::dimension;
150public:
152};
153
160template<class TypeTag>
161struct FluidState<TypeTag, TTag::NavierStokes>{
162private:
165public:
167};
168
170template<class TypeTag>
171struct LocalResidual<TypeTag, TTag::NavierStokes> { using type = NavierStokesResidual<TypeTag>; };
172
174template<class TypeTag>
175struct VolumeVariables<TypeTag, TTag::NavierStokes>
176{
177private:
182
183 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
184 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
185 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
186
188public:
190};
191
193template<class TypeTag>
194struct FluxVariables<TypeTag, TTag::NavierStokes> { using type = NavierStokesFluxVariables<TypeTag>; };
195
197template<class TypeTag>
198struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
199
201// Property values for non-isothermal Navier-Stokes model
203
205template<class TypeTag>
206struct ModelTraits<TypeTag, TTag::NavierStokesNI>
207{
208private:
210 static constexpr auto dim = GridView::dimension;
211 using IsothermalTraits = NavierStokesModelTraits<dim>;
212public:
214};
215
217template<class TypeTag>
218struct IOFields<TypeTag, TTag::NavierStokesNI> { using type = FreeflowNonIsothermalIOFields<NavierStokesIOFields>; };
219
220 // \}
221}
222
223} // end namespace
224
225#endif
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition immiscible.hh:30
Adds I/O fields for the Navier-Stokes model.
Definition freeflow/navierstokes/iofields.hh:67
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/volumevariables.hh:26
Defines all properties used in Dumux.
Diffusive heat flux according to Fourier's law.
The flux variables class for the Navier-Stokes model. This is a convenience alias for that actual,...
The common indices for the isothermal Navier-Stokes model.
Adds I/O fields for the Navier-Stokes model.
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
Volume variables for the single-phase Navier-Stokes model.
Indices for the non-isothermal Navier-Stokes model.
Adds I/O fields specific to non-isothermal free-flow models.
A single-phase, non-isothermal free-flow model.
Defines a type tag and some properties for free flow models.
@ none
Definition turbulencemodel.hh:27
NavierStokesResidualImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesResidual
The local residual class for the Navier-Stokes model (balance equations). This is a convenience alias...
Definition freeflow/navierstokes/localresidual.hh:33
NavierStokesFluxVariablesImpl< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > NavierStokesFluxVariables
The flux variables class for the Navier-Stokes model. This is a convenience alias for that actual,...
Definition freeflow/navierstokes/fluxvariables.hh:33
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
The available discretization methods in Dumux.
Definition slipcondition.hh:20
Type tag for numeric models.
Definition grid.hh:24
The energy balance equation for a porous solid.
Definition common/properties.hh:26
Definition adapt.hh:17
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
static constexpr int numFluidComponents()
The number of components is 1.
Definition freeflow/navierstokes/model.hh:75
static constexpr bool enableAdvection()
Enable advection.
Definition freeflow/navierstokes/model.hh:78
static constexpr int dim()
The dimension of the model.
Definition freeflow/navierstokes/model.hh:65
static constexpr bool enableMolecularDiffusion()
The one-phase one-component model has no molecular diffusion.
Definition freeflow/navierstokes/model.hh:81
static constexpr int numEq()
Definition freeflow/navierstokes/model.hh:69
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/navierstokes/model.hh:90
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition freeflow/navierstokes/model.hh:87
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition freeflow/navierstokes/model.hh:84
NavierStokesIndices< dim()> Indices
the indices
Definition freeflow/navierstokes/model.hh:94
static constexpr int numFluidPhases()
The number of phases is 1.
Definition freeflow/navierstokes/model.hh:72
Traits class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/model.hh:111
PV PrimaryVariables
Definition freeflow/navierstokes/model.hh:112
MT ModelTraits
Definition freeflow/navierstokes/model.hh:115
FST FluidState
Definition freeflow/navierstokes/model.hh:114
FSY FluidSystem
Definition freeflow/navierstokes/model.hh:113
Dumux::ImmiscibleFluidState< Scalar, FluidSystem > type
Definition freeflow/navierstokes/model.hh:166
NavierStokesFluxVariables< TypeTag > type
Definition freeflow/navierstokes/model.hh:194
NavierStokesIOFields type
Definition freeflow/navierstokes/model.hh:198
FreeflowNonIsothermalIOFields< NavierStokesIOFields > type
Definition freeflow/navierstokes/model.hh:218
NavierStokesResidual< TypeTag > type
Definition freeflow/navierstokes/model.hh:171
NavierStokesModelTraits< dim > type
Definition freeflow/navierstokes/model.hh:151
FreeflowNIModelTraits< IsothermalTraits > type
Definition freeflow/navierstokes/model.hh:213
static constexpr bool value
Definition freeflow/navierstokes/model.hh:141
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition freeflow/navierstokes/model.hh:131
std::tuple< FreeFlow > InheritsFrom
Definition freeflow/navierstokes/model.hh:131
The type tag for the corresponding non-isothermal model.
Definition freeflow/navierstokes/model.hh:134
std::tuple< NavierStokes > InheritsFrom
Definition freeflow/navierstokes/model.hh:134
NavierStokesVolumeVariables< Traits > type
Definition freeflow/navierstokes/model.hh:189