version 3.10-dev
porousmediumflow/nonequilibrium/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//
13#ifndef DUMUX_NONEQUILIBRIUM_MODEL_HH
14#define DUMUX_NONEQUILIBRIUM_MODEL_HH
15
19
23
24#include "localresidual.hh"
25#include "indices.hh"
26#include "gridvariables.hh"
27#include "iofields.hh"
28
29namespace Dumux {
30
43template<class ET, bool chem, bool therm, int numEF, int numES, NusseltFormulation nf, SherwoodFormulation sf>
44struct NonEquilibriumModelTraits : public ET
45{
46 static constexpr int numEq() { return numEnergyEqFluid()+numEnergyEqSolid()+numTransportEq()+ET::numConstraintEq(); }
47 static constexpr int numTransportEq() { return chem ? ET::numFluidPhases()*ET::numFluidComponents() : ET::numFluidComponents(); }
48
49 static constexpr int numEnergyEqFluid() { return therm ? numEF : 0; }
50 static constexpr int numEnergyEqSolid() { return therm ? numES : 0; }
51 static constexpr int numEnergyEq() { return numEnergyEqFluid()+numEnergyEqSolid(); }
52
53 static constexpr bool enableCompositionalDispersion() { return false; }
54 static constexpr bool enableThermalDispersion() { return false; }
55 static constexpr bool enableEnergyBalance() { return ET::enableEnergyBalance() || therm; }
56 static constexpr bool enableThermalNonEquilibrium() { return therm; }
57 static constexpr bool enableChemicalNonEquilibrium() { return chem; }
58
59 static constexpr NusseltFormulation nusseltFormulation() { return nf; }
60 static constexpr SherwoodFormulation sherwoodFormulation() { return sf; }
61
62 static_assert(!(ET::enableEnergyBalance() && therm), "It is not possible to use a nonisothermal model assuming local thermal equilibrium in combination with a model using thermal non-equilibrium");
63
64 using Indices = NonEquilbriumIndices<typename ET::Indices, numEnergyEqFluid(), numEnergyEqSolid(), numEq()>;
65};
66
67namespace Properties
68{
69
71// Type tags
73namespace TTag {
75}
76
78// Properties for the non-equilibrium mpnc model
80
82template<class TypeTag>
83struct ModelTraits<TypeTag, TTag::NonEquilibrium>
84{
85private:
87 static constexpr bool enableTNE = getPropValue<TypeTag, Properties::EnableThermalNonEquilibrium>();
88 static constexpr bool enableCNE = getPropValue<TypeTag, Properties::EnableChemicalNonEquilibrium>();
89 static constexpr int numEF = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
90 static constexpr int numES = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
91 static constexpr auto nf = getPropValue<TypeTag, Properties::NusseltFormulation>();
92 static constexpr auto ns = getPropValue<TypeTag, Properties::SherwoodFormulation>();
93public:
95};
96
98template<class TypeTag>
99struct EnableThermalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
100template<class TypeTag>
101struct EnableChemicalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
102
104template<class TypeTag>
105struct NumEnergyEqSolid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = 1; };
106template<class TypeTag>
107struct NumEnergyEqFluid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = GetPropType<TypeTag, Properties::EquilibriumModelTraits>::numFluidPhases(); };
108
109template<class TypeTag>
111template<class TypeTag>
112struct LocalResidual<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumLocalResidual<TypeTag>; };
113template<class TypeTag>
114struct HeatConductionType<TypeTag, TTag::NonEquilibrium> { using type = FouriersLawNonEquilibrium<TypeTag>; };
115
116template<class TypeTag>
117struct FluidState<TypeTag, TTag::NonEquilibrium>
118{
119private:
122public:
124};
125
127template<class TypeTag>
128struct GridVariables<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumGridVariables<TypeTag>; };
129
131template<class TypeTag>
132struct IOFields<TypeTag, TTag::NonEquilibrium>
133{
134private:
137public:
139};
140
141template<class TypeTag>
142struct NusseltFormulation<TypeTag, TTag::NonEquilibrium>
143{
144public:
146};
147
152template<class TypeTag>
153struct SherwoodFormulation<TypeTag, TTag::NonEquilibrium>
154{
155public:
157};
158
159} //end namespace Properties
160} //end namespace Dumux
161
162#endif
Definition: porousmediumflow/nonisothermal/localresidual.hh:24
This file contains the parts of the local residual to calculate the heat conservation in the thermal ...
Definition: porousmediumflow/nonequilibrium/thermal/localresidual.hh:33
Definition: box/fourierslawnonequilibrium.hh:30
The primary variable and equation indices for the MpNc model.
Definition: porousmediumflow/nonequilibrium/indices.hh:24
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system witho...
Definition: nonequilibrium.hh:31
This class stores the velocities which are used to compute Reynolds numbers for the source terms of n...
Definition: porousmediumflow/nonequilibrium/gridvariables.hh:38
Definition: porousmediumflow/nonequilibrium/iofields.hh:21
Definition: porousmediumflow/nonequilibrium/localresidual.hh:26
Defines all properties used in Dumux.
Collection of functions, calculating dimensionless numbers.
Diffusive heat flux according to non-equilibrium Fourier's law.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
NusseltFormulation
A container for possible values of the property for selecting which Nusselt parametrization to choose...
Definition: dimensionlessnumbers.hh:31
SherwoodFormulation
A container for possible values of the property for selecting which Sherwood parametrization to choos...
Definition: dimensionlessnumbers.hh:40
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system witho...
The local residual for the kinetic mass transfer module of the compositional multi-phase model.
This file contains the parts of the local residual to calculate the heat conservation in the thermal ...
Defines the primary variable and equation indices used by the isothermal tracer model.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
TODO: docme!
Specifies a number properties of porous-medium flow non-equilibrium models.
Definition: porousmediumflow/nonequilibrium/model.hh:45
static constexpr bool enableCompositionalDispersion()
Definition: porousmediumflow/nonequilibrium/model.hh:53
static constexpr NusseltFormulation nusseltFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:59
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/nonequilibrium/model.hh:55
static constexpr SherwoodFormulation sherwoodFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:60
static constexpr int numTransportEq()
Definition: porousmediumflow/nonequilibrium/model.hh:47
static constexpr int numEq()
Definition: porousmediumflow/nonequilibrium/model.hh:46
static constexpr bool enableChemicalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:57
static constexpr bool enableThermalDispersion()
Definition: porousmediumflow/nonequilibrium/model.hh:54
static constexpr int numEnergyEqFluid()
Definition: porousmediumflow/nonequilibrium/model.hh:49
static constexpr int numEnergyEq()
Definition: porousmediumflow/nonequilibrium/model.hh:51
static constexpr int numEnergyEqSolid()
Definition: porousmediumflow/nonequilibrium/model.hh:50
static constexpr bool enableThermalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:56
Definition: porousmediumflow/nonequilibrium/model.hh:74