version 3.11-dev
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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
34#ifndef DUMUX_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
35#define DUMUX_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
36
39
41
45
47
48#include "localresidual.hh"
49#include "volumevariables.hh"
50#include "fluxvariables.hh"
51#include "indices.hh"
52#include "iofields.hh"
53
54namespace Dumux {
55
61{
64 static constexpr int numEq() { return 1; }
65
67 static constexpr int numFluidPhases() { return 1; }
68
70 static constexpr int numFluidComponents() { return 1; }
71
73 static constexpr bool enableAdvection() { return true; }
74
76 static constexpr bool enableMolecularDiffusion() { return false; }
77
79 static constexpr bool enableEnergyBalance() { return false; }
80
83};
84
94template<class PV,
95 class FSY,
96 class FST,
97 class MT>
99{
101 using FluidSystem = FSY;
102 using FluidState = FST;
103 using ModelTraits = MT;
104};
105
106// \{
108// properties for the single-phase Navier-Stokes model
110namespace Properties {
111
113// Type tags
115
116// Create new type tags
117namespace TTag {
119struct NavierStokesMassOneP{ using InheritsFrom = std::tuple<ModelProperties>; };
120struct NavierStokesMassOnePNI{ using InheritsFrom = std::tuple<NavierStokesMassOneP>; };
121} // end namespace TTag
122
123
124template<class TypeTag>
125struct ModelTraits<TypeTag, TTag::NavierStokesMassOneP>
127
134template<class TypeTag>
135struct FluidState<TypeTag, TTag::NavierStokesMassOneP>
136{
137private:
140public:
142};
143
145template<class TypeTag>
146struct LocalResidual<TypeTag, TTag::NavierStokesMassOneP>
148
150template<class TypeTag>
151struct VolumeVariables<TypeTag, TTag::NavierStokesMassOneP>
152{
153private:
158
159 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
160 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
161 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
162
164public:
166};
167
169template<class TypeTag>
170struct FluxVariables<TypeTag, TTag::NavierStokesMassOneP>
171{
172private:
175 struct DiffusiveFluxTypes {}; // no diffusion
176 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
177 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
178public:
180 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
181 >;
182};
183
184// ! The specific I/O fields
185template<class TypeTag>
186struct IOFields<TypeTag, TTag::NavierStokesMassOneP> { using type = NavierStokesMassOnePIOFields; };
187
188template<class TypeTag>
189struct CouplingManager<TypeTag, TTag::NavierStokesMassOneP>
190{
191public:
192 using type = struct EmptyCouplingManager {};
193};
194
195// Set the default spatial parameters
196template<class TypeTag>
197struct SpatialParams<TypeTag, TTag::NavierStokesMassOneP>
198{
202};
204// Properties for the non-isothermal single phase model
206
208template<class TypeTag>
209struct IOFields<TypeTag, TTag::NavierStokesMassOnePNI>
211
213template<class TypeTag>
214struct ModelTraits<TypeTag, TTag::NavierStokesMassOnePNI>
216
218template<class TypeTag>
219struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePNI>
220{
221private:
226
227 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
228 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
229 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
230
234 struct NITraits : public BaseTraits
235 {
236 using EffectiveThermalConductivityModel = ETCM;
237 using HeatConductionType = HCT;
238 };
239public:
241};
242
244template<class TypeTag>
245struct ThermalConductivityModel<TypeTag, TTag::NavierStokesMassOnePNI>
246{
247 struct type
248 {
249 template<class VolVars>
250 static auto effectiveThermalConductivity(const VolVars& volVars)
251 {
252 return volVars.fluidThermalConductivity();
253 }
254 };
255};
256
257template<class TypeTag>
258struct HeatConductionType<TypeTag, TTag::NavierStokesMassOnePNI>
260
262template<class TypeTag>
263struct FluxVariables<TypeTag, TTag::NavierStokesMassOnePNI>
264{
265private:
268
269 struct DiffusiveFluxTypes
270 {
272 };
273
274 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
275 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
276
277public:
279 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
280 >;
281};
282
283template<class TypeTag>
284struct FluxVariablesCache<TypeTag, TTag::NavierStokesMassOnePNI>
285{
286 struct type : public GetPropType<TypeTag, Properties::HeatConductionType>::Cache
287 {};
288};
289
290template<class TypeTag>
291struct FluxVariablesCacheFiller<TypeTag, TTag::NavierStokesMassOnePNI>
292{
295 static constexpr bool diffusionIsSolDependent = false; // no diffusion;
296 static constexpr bool heatConductionIsSolDependent
297 = getPropValue<TypeTag, Properties::SolutionDependentHeatConduction>();
298
300 Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent
301 >;
302};
303
304template<class TypeTag>
305struct SolutionDependentHeatConduction<TypeTag, TTag::NavierStokesMassOnePNI>
306{ static constexpr bool value = true; };
307
308} // end namespace Properties
309} // end namespace Dumux
310
311#endif
The interface of the coupling manager for multi domain problems.
Definition: multidomain/couplingmanager.hh:37
forward declaration of the method-specific implementation
Definition: flux/box/fourierslaw.hh:26
Definition of the spatial parameters for the freeflow problems.
Definition: freeflow/spatialparams.hh:117
Definition: scalarfluxvariablescachefiller.hh:27
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:30
The flux variables class for the single-phase flow Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/fluxvariables.hh:39
Adds I/O fields for the Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/iofields.hh:25
Element-wise calculation of the Navier-Stokes residual for single-phase flow.
Definition: freeflow/navierstokes/mass/1p/localresidual.hh:40
Volume variables for the single-phase Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/volumevariables.hh:29
Defines a type tags and some fundamental properties for all models.
Defines all properties used in Dumux.
Diffusive heat flux according to Fourier's law.
A single-phase, non-isothermal free-flow model.
Definition of the spatial parameters for the freeflow problems.
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...
Definition: adapt.hh:17
Base class for the flux variables in porous medium models.
Adds I/O fields specific to the tracer model.
A helper class to fill the flux variables cache.
Defines the indices for the elastic model.
Local residual for the hyperelastic model.
Volume variables for the hyperelasticity model.
Adds I/O fields specific to non-isothermal free-flow models.
Definition: freeflow/navierstokes/energy/iofields.hh:25
Specifies a number properties of non-isothermal free-flow flow models based on the specifics of a giv...
Definition: freeflow/navierstokes/energy/model.hh:55
The common indices for the isothermal Navier-Stokes mass conservation model.
Definition: freeflow/navierstokes/mass/1p/indices.hh:22
Traits for the single-phase flow Navier-Stokes mass model.
Definition: freeflow/navierstokes/mass/1p/model.hh:61
static constexpr bool enableMolecularDiffusion()
The one-phase one-component model has no molecular diffusion.
Definition: freeflow/navierstokes/mass/1p/model.hh:76
static constexpr bool enableAdvection()
Enable advection.
Definition: freeflow/navierstokes/mass/1p/model.hh:73
static constexpr int numFluidComponents()
The number of components is 1.
Definition: freeflow/navierstokes/mass/1p/model.hh:70
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition: freeflow/navierstokes/mass/1p/model.hh:79
static constexpr int numEq()
Definition: freeflow/navierstokes/mass/1p/model.hh:64
static constexpr int numFluidPhases()
The number of phases is 1.
Definition: freeflow/navierstokes/mass/1p/model.hh:67
Traits class for the volume variables of the Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/model.hh:99
FST FluidState
Definition: freeflow/navierstokes/mass/1p/model.hh:102
PV PrimaryVariables
Definition: freeflow/navierstokes/mass/1p/model.hh:100
FSY FluidSystem
Definition: freeflow/navierstokes/mass/1p/model.hh:101
MT ModelTraits
Definition: freeflow/navierstokes/mass/1p/model.hh:103
EmptyCouplingManager {} type
Definition: freeflow/navierstokes/mass/1p/model.hh:192
GetPropType< TypeTag, Properties::Problem > Problem
Definition: freeflow/navierstokes/mass/1p/model.hh:293
GetPropType< TypeTag, Properties::ModelTraits > ModelTraits
Definition: freeflow/navierstokes/mass/1p/model.hh:294
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition: freeflow/navierstokes/mass/1p/model.hh:199
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: freeflow/navierstokes/mass/1p/model.hh:200
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition: freeflow/navierstokes/mass/1p/model.hh:119
std::tuple< ModelProperties > InheritsFrom
Definition: freeflow/navierstokes/mass/1p/model.hh:119
Definition: freeflow/navierstokes/mass/1p/model.hh:120
std::tuple< NavierStokesMassOneP > InheritsFrom
Definition: freeflow/navierstokes/mass/1p/model.hh:120
static auto effectiveThermalConductivity(const VolVars &volVars)
Definition: freeflow/navierstokes/mass/1p/model.hh:250