3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef DUMUX_NONEQUILIBRIUM_MODEL_HH
26#define DUMUX_NONEQUILIBRIUM_MODEL_HH
27
31
36
37#include "localresidual.hh"
38#include "indices.hh"
39#include "gridvariables.hh"
40#include "iofields.hh"
41
42namespace Dumux {
43
56template<class ET, bool chem, bool therm, int numEF, int numES, NusseltFormulation nf, SherwoodFormulation sf>
57struct NonEquilibriumModelTraits : public ET
58{
59 static constexpr int numEq() { return numEnergyEqFluid()+numEnergyEqSolid()+numTransportEq()+ET::numConstraintEq(); }
60 static constexpr int numTransportEq() { return chem ? ET::numFluidPhases()*ET::numFluidComponents() : ET::numFluidComponents(); }
61
62 static constexpr int numEnergyEqFluid() { return therm ? numEF : 0; }
63 static constexpr int numEnergyEqSolid() { return therm ? numES : 0; }
64 static constexpr int numEnergyEq() { return numEnergyEqFluid()+numEnergyEqSolid(); }
65 static constexpr int numSolidComps() {return ET::SolidSystem::numComponents(); }
66
67 static constexpr bool enableEnergyBalance() { return ET::enableEnergyBalance() || therm; }
68 static constexpr bool enableThermalNonEquilibrium() { return therm; }
69 static constexpr bool enableChemicalNonEquilibrium() { return chem; }
70
71 static constexpr NusseltFormulation nusseltFormulation() { return nf; }
72 static constexpr SherwoodFormulation sherwoodFormulation() { return sf; }
73
74 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");
75
77};
78
79namespace Properties
80{
81
83// Type tags
85namespace TTag {
87}
88
90// Properties for the non-equilibrium mpnc model
92
94template<class TypeTag>
95struct ModelTraits<TypeTag, TTag::NonEquilibrium>
96{
97private:
99 static constexpr bool enableTNE = getPropValue<TypeTag, Properties::EnableThermalNonEquilibrium>();
100 static constexpr bool enableCNE = getPropValue<TypeTag, Properties::EnableChemicalNonEquilibrium>();
101 static constexpr int numEF = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
102 static constexpr int numES = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
103 static constexpr auto nf = getPropValue<TypeTag, Properties::NusseltFormulation>();
104 static constexpr auto ns = getPropValue<TypeTag, Properties::SherwoodFormulation>();
105public:
107};
108
110template<class TypeTag>
111struct EnableThermalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
112template<class TypeTag>
113struct EnableChemicalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
114
116template<class TypeTag>
117struct NumEnergyEqSolid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = 1; };
118template<class TypeTag>
119struct NumEnergyEqFluid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = GetPropType<TypeTag, Properties::EquilibriumModelTraits>::numFluidPhases(); };
120
121template<class TypeTag>
123template<class TypeTag>
124struct LocalResidual<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumLocalResidual<TypeTag>; };
125template<class TypeTag>
126struct HeatConductionType<TypeTag, TTag::NonEquilibrium> { using type = FouriersLawNonEquilibrium<TypeTag>; };
127
128template<class TypeTag>
129struct FluidState<TypeTag, TTag::NonEquilibrium>
130{
131private:
134public:
136};
137
139template<class TypeTag>
140struct GridVariables<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumGridVariables<TypeTag>; };
141
143template<class TypeTag>
144struct IOFields<TypeTag, TTag::NonEquilibrium>
145{
146private:
149public:
151};
152
153template<class TypeTag>
154struct NusseltFormulation<TypeTag, TTag::NonEquilibrium>
155{
156public:
158};
159
164template<class TypeTag>
165struct SherwoodFormulation<TypeTag, TTag::NonEquilibrium>
166{
167public:
169};
170
171} //end namespace Properties
172} //end namespace Dumux
173
174#endif
Collection of functions, calculating dimensionless numbers.
This file contains the data which is required to calculate diffusive mass fluxes due to molecular dif...
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system witho...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
NusseltFormulation
A container for possible values of the property for selecting which nusselt parametrization to choose...
Definition: dimensionlessnumbers.hh:42
SherwoodFormulation
A container for possible values of the property for selecting which sherwood parametrization to choos...
Definition: dimensionlessnumbers.hh:51
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Property tag Indices
Definition: porousmediumflow/sequential/properties.hh:59
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
A class helping models to define input and output fields.
Definition: common/properties.hh:78
Definition: common/properties.hh:91
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:190
The local residual of the energy equation.
Definition: common/properties.hh:206
The type for the calculation of the heat conduction fluxes.
Definition: common/properties.hh:216
The type of the fluid state to use.
Definition: common/properties.hh:225
Definition: common/properties.hh:328
Definition: common/properties.hh:330
Definition: common/properties.hh:332
Definition: common/properties.hh:334
Definition: common/properties.hh:337
Definition: common/properties.hh:339
Definition: fourierslawnonequilibrium.hh:36
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system witho...
Definition: nonequilibrium.hh:43
This class stores the velocities which are used to compute Reynolds numbers for the source terms of n...
Definition: porousmediumflow/nonequilibrium/gridvariables.hh:50
The primary variable and equation indices for the MpNc model.
Definition: porousmediumflow/nonequilibrium/indices.hh:36
Definition: dumux/porousmediumflow/nonequilibrium/iofields.hh:33
Definition: porousmediumflow/nonequilibrium/localresidual.hh:36
Specifies a number properties of porous-medium flow non-equilibrium models.
Definition: porousmediumflow/nonequilibrium/model.hh:58
static constexpr NusseltFormulation nusseltFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:71
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/nonequilibrium/model.hh:67
static constexpr SherwoodFormulation sherwoodFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:72
static constexpr int numSolidComps()
Definition: porousmediumflow/nonequilibrium/model.hh:65
static constexpr int numTransportEq()
Definition: porousmediumflow/nonequilibrium/model.hh:60
static constexpr int numEq()
Definition: porousmediumflow/nonequilibrium/model.hh:59
static constexpr bool enableChemicalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:69
static constexpr int numEnergyEqFluid()
Definition: porousmediumflow/nonequilibrium/model.hh:62
static constexpr int numEnergyEq()
Definition: porousmediumflow/nonequilibrium/model.hh:64
static constexpr int numEnergyEqSolid()
Definition: porousmediumflow/nonequilibrium/model.hh:63
static constexpr bool enableThermalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:68
Definition: porousmediumflow/nonequilibrium/model.hh:86
This file contains the parts of the local residual to calculate the heat conservation in the thermal ...
Definition: porousmediumflow/nonequilibrium/thermal/localresidual.hh:43
Declares all properties used in Dumux.
Class storing scv and scvf variables.
Adds I/O fields specific to the twop model.
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 ...
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Defines the primary variable and equation indices used by the isothermal tracer model.