version 3.10-dev
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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
34#ifndef DUMUX_NAVIERSTOKES_MOMENTUM_MODEL_HH
35#define DUMUX_NAVIERSTOKES_MOMENTUM_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 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 NavierStokesMomentum { using InheritsFrom = std::tuple<FreeFlow>; };
132
133}
134
136// default property values for the isothermal single phase model
138template<class TypeTag>
139struct NormalizePressure<TypeTag, TTag::NavierStokesMomentum> { static constexpr bool value = true; };
140
142template<class TypeTag>
143struct ModelTraits<TypeTag, TTag::NavierStokesMomentum>
144{
145private:
147 static constexpr auto dim = GridView::dimension;
148public:
150};
151
158template<class TypeTag>
159struct FluidState<TypeTag, TTag::NavierStokesMomentum>{
160private:
163public:
165};
166
168template<class TypeTag>
169struct LocalResidual<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumResidual<TypeTag>; };
170
172template<class TypeTag>
173struct VolumeVariables<TypeTag, TTag::NavierStokesMomentum>
174{
175private:
180
181 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
182 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
183 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
184
186public:
188};
189
191template<class TypeTag>
192struct FluxVariables<TypeTag, TTag::NavierStokesMomentum> { using type = NavierStokesMomentumFluxVariables<TypeTag>; };
193
194template<class TypeTag>
195struct CouplingManager<TypeTag, TTag::NavierStokesMomentum>
196{
197private:
198 struct EmptyCouplingManager {};
199public:
200 using type = EmptyCouplingManager;
201};
202
204// template<class TypeTag>
205// struct IOFields<TypeTag, TTag::NavierStokes> { using type = NavierStokesIOFields; };
206
207}
208// }
209
210} // end namespace
211
212#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
Defines all properties used in Dumux.
Diffusive heat flux according to Fourier's law.
A single-phase, non-isothermal free-flow model.
Defines a type tag and some properties for free flow models.
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: adapt.hh:17
Base class for the flux variables in porous medium models.
Defines the primary variable and equation indices used by the isothermal tracer model.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Python wrapper for volume variables (finite volume schemes)
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:63
static constexpr int numFluidPhases()
The number of phases is 1.
Definition: freeflow/navierstokes/momentum/model.hh:72
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition: freeflow/navierstokes/momentum/model.hh:84
static constexpr int numEq()
Definition: freeflow/navierstokes/momentum/model.hh:69
static constexpr bool enableMolecularDiffusion()
The one-phase model has no molecular diffusion.
Definition: freeflow/navierstokes/momentum/model.hh:81
static constexpr auto turbulenceModel()
return the type of turbulence model used
Definition: freeflow/navierstokes/momentum/model.hh:90
static constexpr bool enableAdvection()
Enable advection.
Definition: freeflow/navierstokes/momentum/model.hh:78
static constexpr int dim()
The dimension of the model.
Definition: freeflow/navierstokes/momentum/model.hh:65
static constexpr int numFluidComponents()
The number of components is 1.
Definition: freeflow/navierstokes/momentum/model.hh:75
static constexpr bool usesTurbulenceModel()
The model does not include a turbulence model.
Definition: freeflow/navierstokes/momentum/model.hh:87
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/model.hh:111
FST FluidState
Definition: freeflow/navierstokes/momentum/model.hh:114
MT ModelTraits
Definition: freeflow/navierstokes/momentum/model.hh:115
PV PrimaryVariables
Definition: freeflow/navierstokes/momentum/model.hh:112
FSY FluidSystem
Definition: freeflow/navierstokes/momentum/model.hh:113
EmptyCouplingManager type
Definition: freeflow/navierstokes/momentum/model.hh:200
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/momentum/model.hh:131
std::tuple< FreeFlow > InheritsFrom
Definition: freeflow/navierstokes/momentum/model.hh:131