version 3.11-dev
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// 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_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
35#define DUMUX_FREEFLOW_NAVIERSTOKES_1P_MODEL_HH
36
39
41
45
47
49
50#include "localresidual.hh"
51#include "felocalresidual.hh"
52#include "variables.hh"
53#include "volumevariables.hh"
54#include "fluxvariables.hh"
55#include "indices.hh"
56#include "iofields.hh"
57
58namespace Dumux {
59
65{
68 static constexpr int numEq() { return 1; }
69
71 static constexpr int numFluidPhases() { return 1; }
72
74 static constexpr int numFluidComponents() { return 1; }
75
77 static constexpr bool enableAdvection() { return true; }
78
80 static constexpr bool enableMolecularDiffusion() { return false; }
81
83 static constexpr bool enableEnergyBalance() { return false; }
84
87};
88
98template<class PV,
99 class FSY,
100 class FST,
101 class MT>
103{
105 using FluidSystem = FSY;
106 using FluidState = FST;
107 using ModelTraits = MT;
108};
109
110// \{
112// properties for the single-phase Navier-Stokes model
114namespace Properties {
115
117// Type tags
119
120// Create new type tags
121namespace TTag {
123struct NavierStokesMassOneP{ using InheritsFrom = std::tuple<ModelProperties>; };
124struct NavierStokesMassOnePNI{ using InheritsFrom = std::tuple<NavierStokesMassOneP>; };
126struct NavierStokesMassOnePFE{ using InheritsFrom = std::tuple<NavierStokesMassOneP>; };
127} // end namespace TTag
128
129
130template<class TypeTag>
131struct ModelTraits<TypeTag, TTag::NavierStokesMassOneP>
133
140template<class TypeTag>
141struct FluidState<TypeTag, TTag::NavierStokesMassOneP>
142{
143private:
146public:
148};
149
151template<class TypeTag>
152struct LocalResidual<TypeTag, TTag::NavierStokesMassOneP>
154
156template<class TypeTag>
157struct LocalResidual<TypeTag, TTag::NavierStokesMassOnePFE>
159
161template<class TypeTag>
162struct VolumeVariables<TypeTag, TTag::NavierStokesMassOneP>
163{
164private:
169
170 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
171 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
172 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
173
175public:
177};
178
179// Set the default spatial parameters for the finite element variant, which are
180// evaluated at interpolation points rather than at sub-control volumes
181template<class TypeTag>
182struct SpatialParams<TypeTag, TTag::NavierStokesMassOnePFE>
183{
184 template<class GG, class S>
186 : public Dumux::Experimental::SpatialParams<GG, S, DefaultSpatialParams<GG, S>>
187 {
188 private:
190 public:
191 using ParentType::ParentType;
192 };
193
197};
198
200template<class TypeTag>
201struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePFE>
202{
203private:
208
209 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
210 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
211 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
212
214public:
216};
217
219template<class TypeTag>
220struct FluxVariables<TypeTag, TTag::NavierStokesMassOneP>
221{
222private:
225 struct DiffusiveFluxTypes {}; // no diffusion
226 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
227 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
228public:
230 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
231 >;
232};
233
234// ! The specific I/O fields
235template<class TypeTag>
236struct IOFields<TypeTag, TTag::NavierStokesMassOneP> { using type = NavierStokesMassOnePIOFields; };
237
238template<class TypeTag>
239struct CouplingManager<TypeTag, TTag::NavierStokesMassOneP>
240{
241public:
242 using type = struct EmptyCouplingManager {};
243};
244
245// Set the default spatial parameters
246template<class TypeTag>
253
254// Properties for the non-isothermal single phase model
256
258template<class TypeTag>
259struct IOFields<TypeTag, TTag::NavierStokesMassOnePNI>
261
263template<class TypeTag>
264struct ModelTraits<TypeTag, TTag::NavierStokesMassOnePNI>
266
268template<class TypeTag>
269struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePNI>
270{
271private:
276
277 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
278 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
279 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
280
284 struct NITraits : public BaseTraits
285 {
286 using EffectiveThermalConductivityModel = ETCM;
287 using HeatConductionType = HCT;
288 };
289public:
291};
292
294template<class TypeTag>
295struct ThermalConductivityModel<TypeTag, TTag::NavierStokesMassOnePNI>
296{
297 struct type
298 {
299 template<class VolVars>
300 static auto effectiveThermalConductivity(const VolVars& volVars)
301 {
302 return volVars.fluidThermalConductivity();
303 }
304 };
305};
306
307template<class TypeTag>
308struct HeatConductionType<TypeTag, TTag::NavierStokesMassOnePNI>
310
312template<class TypeTag>
313struct FluxVariables<TypeTag, TTag::NavierStokesMassOnePNI>
314{
315private:
318
319 struct DiffusiveFluxTypes
320 {
322 };
323
324 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
325 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
326
327public:
329 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
330 >;
331};
332
333template<class TypeTag>
334struct FluxVariablesCache<TypeTag, TTag::NavierStokesMassOnePNI>
335{
336 struct type : public GetPropType<TypeTag, Properties::HeatConductionType>::Cache
337 {};
338};
339
340template<class TypeTag>
353
354template<class TypeTag>
355struct SolutionDependentHeatConduction<TypeTag, TTag::NavierStokesMassOnePNI>
356{ static constexpr bool value = true; };
357
358} // end namespace Properties
359} // end namespace Dumux
360
361#endif
The interface of the coupling manager for multi domain problems.
Definition multidomain/couplingmanager.hh:37
The base class for spatial parameters used with finite-volume or finite-element schemes.
Definition common/spatialparams.hh:34
Definition of the spatial parameters for the freeflow problems.
Definition freeflow/spatialparams.hh:117
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition immiscible.hh:30
Element-wise FE continuity residual for the one-phase mass subdomain.
Definition mass/1p/felocalresidual.hh:35
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:44
Variables for the single-phase Navier-Stokes mass model.
Definition freeflow/navierstokes/mass/1p/variables.hh:28
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.
Basic spatial parameters to be used with finite-volume or finite-element schemes.
Diffusive heat flux according to Fourier's law.
A single-phase, non-isothermal free-flow model.
The flux variables class for the single-phase flow Navier-Stokes model.
The common indices for the isothermal Navier-Stokes mass conservation model.
Adds I/O fields for the Navier-Stokes model.
Element-wise calculation of the Navier-Stokes residual for single-phase flow.
Variables for the single-phase Navier-Stokes mass model.
Volume variables for the single-phase Navier-Stokes model.
Definition of the spatial parameters for the freeflow problems.
FouriersLawImplementation< TypeTag, typename GetPropType< TypeTag, Properties::GridGeometry >::DiscretizationMethod > FouriersLaw
Evaluates the heat conduction flux according to Fouriers's law.
Definition fourierslaw_fwd.hh:31
FreeFlowScalarFluxVariablesCacheFillerImplementation< Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent, typename ProblemTraits< Problem >::GridGeometry::DiscretizationMethod > FreeFlowScalarFluxVariablesCacheFiller
The flux variables cache filler class for free flow.
Definition scalarfluxvariablescachefiller.hh:36
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:310
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...
Pure-FE (continuous Galerkin) continuity residual for the one-phase Navier-Stokes mass subdomain.
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 helper class to fill the flux variables cache.
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:65
static constexpr bool enableMolecularDiffusion()
The one-phase one-component model has no molecular diffusion.
Definition freeflow/navierstokes/mass/1p/model.hh:80
static constexpr bool enableAdvection()
Enable advection.
Definition freeflow/navierstokes/mass/1p/model.hh:77
static constexpr int numFluidComponents()
The number of components is 1.
Definition freeflow/navierstokes/mass/1p/model.hh:74
NavierStokesMassOnePIndices Indices
the indices
Definition freeflow/navierstokes/mass/1p/model.hh:86
static constexpr bool enableEnergyBalance()
The model is isothermal.
Definition freeflow/navierstokes/mass/1p/model.hh:83
static constexpr int numEq()
Definition freeflow/navierstokes/mass/1p/model.hh:68
static constexpr int numFluidPhases()
The number of phases is 1.
Definition freeflow/navierstokes/mass/1p/model.hh:71
Traits class for the volume variables of the Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/model.hh:103
FST FluidState
Definition freeflow/navierstokes/mass/1p/model.hh:106
PV PrimaryVariables
Definition freeflow/navierstokes/mass/1p/model.hh:104
FSY FluidSystem
Definition freeflow/navierstokes/mass/1p/model.hh:105
MT ModelTraits
Definition freeflow/navierstokes/mass/1p/model.hh:107
struct EmptyCouplingManager {} type
Definition freeflow/navierstokes/mass/1p/model.hh:242
Dumux::ImmiscibleFluidState< Scalar, FluidSystem > type
Definition freeflow/navierstokes/mass/1p/model.hh:147
NavierStokesMassOnePFluxVariables< Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache > type
Definition freeflow/navierstokes/mass/1p/model.hh:229
NavierStokesMassOnePFluxVariables< Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache > type
Definition freeflow/navierstokes/mass/1p/model.hh:328
FreeFlowScalarFluxVariablesCacheFiller< Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent > type
Definition freeflow/navierstokes/mass/1p/model.hh:349
GetPropType< TypeTag, Properties::Problem > Problem
Definition freeflow/navierstokes/mass/1p/model.hh:343
GetPropType< TypeTag, Properties::ModelTraits > ModelTraits
Definition freeflow/navierstokes/mass/1p/model.hh:344
static constexpr bool diffusionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:345
static constexpr bool heatConductionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:347
FouriersLaw< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:309
NavierStokesMassOnePIOFields type
Definition freeflow/navierstokes/mass/1p/model.hh:236
NavierStokesEnergyIOFields< NavierStokesMassOnePIOFields > type
Definition freeflow/navierstokes/mass/1p/model.hh:260
NavierStokesMassOnePLocalResidual< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:153
NavierStokesMassOnePFELocalResidual< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:158
NavierStokesMassOnePModelTraits type
Definition freeflow/navierstokes/mass/1p/model.hh:132
NavierStokesEnergyModelTraits< NavierStokesMassOnePModelTraits > type
Definition freeflow/navierstokes/mass/1p/model.hh:265
static constexpr bool value
Definition freeflow/navierstokes/mass/1p/model.hh:356
FreeFlowDefaultSpatialParams< GridGeometry, Scalar > type
Definition freeflow/navierstokes/mass/1p/model.hh:251
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition freeflow/navierstokes/mass/1p/model.hh:249
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition freeflow/navierstokes/mass/1p/model.hh:250
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition freeflow/navierstokes/mass/1p/model.hh:194
Dumux::Experimental::SpatialParams< GridGeometry, Scalar, DefaultSpatialParams< GridGeometry, Scalar > > type
Definition freeflow/navierstokes/mass/1p/model.hh:196
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition freeflow/navierstokes/mass/1p/model.hh:195
Assembles the continuity equation in weak form instead of as a control volume flux balance.
Definition freeflow/navierstokes/mass/1p/model.hh:126
std::tuple< NavierStokesMassOneP > InheritsFrom
Definition freeflow/navierstokes/mass/1p/model.hh:126
The type tag for the single-phase, isothermal Navier-Stokes model.
Definition freeflow/navierstokes/mass/1p/model.hh:123
std::tuple< ModelProperties > InheritsFrom
Definition freeflow/navierstokes/mass/1p/model.hh:123
Definition freeflow/navierstokes/mass/1p/model.hh:124
std::tuple< NavierStokesMassOneP > InheritsFrom
Definition freeflow/navierstokes/mass/1p/model.hh:124
static auto effectiveThermalConductivity(const VolVars &volVars)
Definition freeflow/navierstokes/mass/1p/model.hh:300
NavierStokesMassOnePVolumeVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:176
NavierStokesMassOnePVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:215
NavierStokesMassOnePVolumeVariables< NITraits > type
Definition freeflow/navierstokes/mass/1p/model.hh:290