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
180template<class TypeTag>
192
193// Set the default spatial parameters for the finite element variant, which are
194// evaluated at interpolation points rather than at sub-control volumes
195template<class TypeTag>
196struct SpatialParams<TypeTag, TTag::NavierStokesMassOnePFE>
197{
198 template<class GG, class S>
200 : public Dumux::Experimental::SpatialParams<GG, S, DefaultSpatialParams<GG, S>>
201 {
202 private:
204 public:
205 using ParentType::ParentType;
206 };
207
211};
212
214template<class TypeTag>
215struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePFE>
216{
217private:
222
223 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
224 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
225 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
226
228public:
230};
231
233template<class TypeTag>
234struct FluxVariables<TypeTag, TTag::NavierStokesMassOneP>
235{
236private:
239 struct DiffusiveFluxTypes {}; // no diffusion
240 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
241 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
242public:
244 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
245 >;
246};
247
248// ! The specific I/O fields
249template<class TypeTag>
250struct IOFields<TypeTag, TTag::NavierStokesMassOneP> { using type = NavierStokesMassOnePIOFields; };
251
252template<class TypeTag>
253struct CouplingManager<TypeTag, TTag::NavierStokesMassOneP>
254{
255public:
256 using type = struct EmptyCouplingManager {};
257};
258
259// Set the default spatial parameters
260template<class TypeTag>
267
268// Properties for the non-isothermal single phase model
270
272template<class TypeTag>
273struct IOFields<TypeTag, TTag::NavierStokesMassOnePNI>
275
277template<class TypeTag>
278struct ModelTraits<TypeTag, TTag::NavierStokesMassOnePNI>
280
282template<class TypeTag>
283struct VolumeVariables<TypeTag, TTag::NavierStokesMassOnePNI>
284{
285private:
290
291 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
292 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
293 static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems.");
294
298 struct NITraits : public BaseTraits
299 {
300 using EffectiveThermalConductivityModel = ETCM;
301 using HeatConductionType = HCT;
302 };
303public:
305};
306
308template<class TypeTag>
309struct ThermalConductivityModel<TypeTag, TTag::NavierStokesMassOnePNI>
310{
311 struct type
312 {
313 template<class VolVars>
314 static auto effectiveThermalConductivity(const VolVars& volVars)
315 {
316 return volVars.fluidThermalConductivity();
317 }
318 };
319};
320
321template<class TypeTag>
322struct HeatConductionType<TypeTag, TTag::NavierStokesMassOnePNI>
324
326template<class TypeTag>
327struct FluxVariables<TypeTag, TTag::NavierStokesMassOnePNI>
328{
329private:
332
333 struct DiffusiveFluxTypes
334 {
336 };
337
338 using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
339 using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
340
341public:
343 Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache
344 >;
345};
346
347template<class TypeTag>
348struct FluxVariablesCache<TypeTag, TTag::NavierStokesMassOnePNI>
349{
350 struct type : public GetPropType<TypeTag, Properties::HeatConductionType>::Cache
351 {};
352};
353
354template<class TypeTag>
367
368template<class TypeTag>
369struct SolutionDependentHeatConduction<TypeTag, TTag::NavierStokesMassOnePNI>
370{ static constexpr bool value = true; };
371
372} // end namespace Properties
373} // end namespace Dumux
374
375#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 calculation of the Navier-Stokes mass residual for single-phase flow when using fe discr...
Definition mass/1p/felocalresidual.hh:149
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:45
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...
Element-wise calculation of the Navier-Stokes mass residual for single-phase flow when using fe discr...
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:256
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:243
NavierStokesMassOnePFluxVariables< Problem, ModelTraits, DiffusiveFluxTypes, ElementVolumeVariables, ElementFluxVariablesCache > type
Definition freeflow/navierstokes/mass/1p/model.hh:342
FreeFlowScalarFluxVariablesCacheFiller< Problem, ModelTraits, diffusionIsSolDependent, heatConductionIsSolDependent > type
Definition freeflow/navierstokes/mass/1p/model.hh:363
GetPropType< TypeTag, Properties::Problem > Problem
Definition freeflow/navierstokes/mass/1p/model.hh:357
GetPropType< TypeTag, Properties::ModelTraits > ModelTraits
Definition freeflow/navierstokes/mass/1p/model.hh:358
static constexpr bool diffusionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:359
static constexpr bool heatConductionIsSolDependent
Definition freeflow/navierstokes/mass/1p/model.hh:361
FouriersLaw< TypeTag > type
Definition freeflow/navierstokes/mass/1p/model.hh:323
NavierStokesMassOnePIOFields type
Definition freeflow/navierstokes/mass/1p/model.hh:250
NavierStokesEnergyIOFields< NavierStokesMassOnePIOFields > type
Definition freeflow/navierstokes/mass/1p/model.hh:274
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:279
static constexpr bool value
Definition freeflow/navierstokes/mass/1p/model.hh:370
FreeFlowDefaultSpatialParams< GridGeometry, Scalar > type
Definition freeflow/navierstokes/mass/1p/model.hh:265
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition freeflow/navierstokes/mass/1p/model.hh:263
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition freeflow/navierstokes/mass/1p/model.hh:264
GetPropType< TypeTag, Properties::GridGeometry > GridGeometry
Definition freeflow/navierstokes/mass/1p/model.hh:208
Dumux::Experimental::SpatialParams< GridGeometry, Scalar, DefaultSpatialParams< GridGeometry, Scalar > > type
Definition freeflow/navierstokes/mass/1p/model.hh:210
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition freeflow/navierstokes/mass/1p/model.hh:209
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:314
NavierStokesMassOnePVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:190
NavierStokesMassOnePVolumeVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:176
NavierStokesMassOnePVariables< Traits > type
Definition freeflow/navierstokes/mass/1p/model.hh:229
NavierStokesMassOnePVolumeVariables< NITraits > type
Definition freeflow/navierstokes/mass/1p/model.hh:304