version 3.10.0
Loading...
Searching...
No Matches
freeflow/navierstokes/momentum/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_MOMENTUM_MODEL_HH
35#define DUMUX_NAVIERSTOKES_MOMENTUM_MODEL_HH
36
37#include <dune/common/fvector.hh>
38
45
46#include "localresidual.hh"
47#include "volumevariables.hh"
48#include "fluxvariables.hh"
49#include "indices.hh"
50// #include "iofields.hh"
51
55
56namespace Dumux {
57
64template<int dimension>
66{
68 static constexpr int dim() { return dimension; }
69
72 static constexpr int numEq() { return 1; }
73
75 static constexpr int numFluidPhases() { return 1; }
76
78 static constexpr int numFluidComponents() { return 1; }
79
81 static constexpr bool enableAdvection() { return true; }
82
84 static constexpr bool enableMolecularDiffusion() { return false; }
85
87 static constexpr bool enableEnergyBalance() { return false; }
88
90 static constexpr bool usesTurbulenceModel() { return false; }
91
93 static constexpr auto turbulenceModel()
94 { return TurbulenceModel::none; }
95
98};
99
109template<class PV,
110 class FSY,
111 class FST,
112 class MT>
114{
116 using FluidSystem = FSY;
117 using FluidState = FST;
118 using ModelTraits = MT;
119};
120
121// \{
123// properties for the single-phase Navier-Stokes model
125namespace Properties {
126
128// Type tags
130
131// Create new type tags
132namespace TTag {
134struct NavierStokesMomentum { using InheritsFrom = std::tuple<FreeFlow>; };
135
136}
137
139// default property values for the isothermal single phase model
141template<class TypeTag>
142struct NormalizePressure<TypeTag, TTag::NavierStokesMomentum> { static constexpr bool value = true; };
143
145template<class TypeTag>
146struct ModelTraits<TypeTag, TTag::NavierStokesMomentum>
147{
148private:
150 static constexpr auto dim = GridView::dimension;
151public:
153};
154
161template<class TypeTag>
162struct FluidState<TypeTag, TTag::NavierStokesMomentum>{
163private:
166public:
168};
169
171template<class TypeTag>
172struct LocalResidual<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumResidual<TypeTag>; };
173
175template<class TypeTag>
176struct VolumeVariables<TypeTag, TTag::NavierStokesMomentum>
177{
178private:
183
184 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
185 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
186 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
187
189public:
191};
192
194template<class TypeTag>
195struct FluxVariables<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumFluxVariables<TypeTag>; };
196
198template<class TypeTag>
199struct PointSource<TypeTag, TTag::NavierStokesMomentum>
200{
201private:
204 using SourceValues = Dune::FieldVector<Scalar, GridView::dimensionworld>;
205 using GlobalPosition = typename Dune::FieldVector<typename GridView::ctype, GridView::dimensionworld>;
206public:
208};
209
210template<class TypeTag>
211struct CouplingManager<TypeTag, TTag::NavierStokesMomentum>
212{
213private:
214 struct EmptyCouplingManager {};
215public:
216 using type = EmptyCouplingManager;
217};
218
220// template<class TypeTag>
221// struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
222
223}
224// }
225
226} // end namespace
227
228#endif // DUMUX_NAVIERSTOKES_MODEL_HH
The interface of the coupling manager for multi domain problems.
Definition multidomain/couplingmanager.hh:37
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition immiscible.hh:30
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
Definition freeflow/navierstokes/momentum/fluxvariables.hh:37
Element-wise calculation of the Navier-Stokes residual for models using the staggered discretization.
Definition freeflow/navierstokes/momentum/localresidual.hh:31
Volume variables for the single-phase Navier-Stokes model.
Definition freeflow/navierstokes/momentum/volumevariables.hh:25
A point source base class.
Definition pointsource.hh:40
Defines all properties used in Dumux.
Diffusive heat flux according to Fourier's law.
The flux variables class for the Navier-Stokes model using the staggered grid discretization.
The common indices for the isothermal 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.
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
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.
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
A point source class, i.e. sources located at a single point in space.
The common indices for the isothermal Navier-Stokes model.
Definition freeflow/navierstokes/momentum/indices.hh:25
Traits for the Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:66
static constexpr int numFluidPhases()
The number of phases is 1.
Definition freeflow/navierstokes/momentum/model.hh:75
NavierStokesMomentumIndices< dim()> Indices
the indices
Definition freeflow/navierstokes/momentum/model.hh:97
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition freeflow/navierstokes/momentum/model.hh:87
static constexpr int numEq()
Definition freeflow/navierstokes/momentum/model.hh:72
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition freeflow/navierstokes/momentum/model.hh:84
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition freeflow/navierstokes/momentum/model.hh:93
static constexpr bool enableAdvection()
Enable advection.
Definition freeflow/navierstokes/momentum/model.hh:81
static constexpr int dim()
The dimension of the model.
Definition freeflow/navierstokes/momentum/model.hh:68
static constexpr int numFluidComponents()
The number of components is 1.
Definition freeflow/navierstokes/momentum/model.hh:78
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition freeflow/navierstokes/momentum/model.hh:90
Traits class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:114
FST FluidState
Definition freeflow/navierstokes/momentum/model.hh:117
MT ModelTraits
Definition freeflow/navierstokes/momentum/model.hh:118
PV PrimaryVariables
Definition freeflow/navierstokes/momentum/model.hh:115
FSY FluidSystem
Definition freeflow/navierstokes/momentum/model.hh:116
EmptyCouplingManager type
Definition freeflow/navierstokes/momentum/model.hh:216
Dumux::ImmiscibleFluidState< Scalar, FluidSystem > type
Definition freeflow/navierstokes/momentum/model.hh:167
NavierStokesMomentumFluxVariables< TypeTag > type
Definition freeflow/navierstokes/momentum/model.hh:195
NavierStokesMomentumResidual< TypeTag > type
Definition freeflow/navierstokes/momentum/model.hh:172
NavierStokesMomentumModelTraits< dim > type
Definition freeflow/navierstokes/momentum/model.hh:152
static constexpr bool value
Definition freeflow/navierstokes/momentum/model.hh:142
Dumux::PointSource< GlobalPosition, SourceValues > type
Definition freeflow/navierstokes/momentum/model.hh:207
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition freeflow/navierstokes/momentum/model.hh:134
std::tuple< FreeFlow > InheritsFrom
Definition freeflow/navierstokes/momentum/model.hh:134
NavierStokesMomentumVolumeVariables< Traits > type
Definition freeflow/navierstokes/momentum/model.hh:190