3.2-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
35
36#include "localresidual.hh"
37#include "indices.hh"
38#include "gridvariables.hh"
39#include "iofields.hh"
40
41namespace Dumux {
42
55template<class ET, bool chem, bool therm, int numEF, int numES, NusseltFormulation nf, SherwoodFormulation sf>
56struct NonEquilibriumModelTraits : public ET
57{
58 static constexpr int numEq() { return numEnergyEqFluid()+numEnergyEqSolid()+numTransportEq()+ET::numConstraintEq(); }
59 static constexpr int numTransportEq() { return chem ? ET::numFluidPhases()*ET::numFluidComponents() : ET::numFluidComponents(); }
60
61 static constexpr int numEnergyEqFluid() { return therm ? numEF : 0; }
62 static constexpr int numEnergyEqSolid() { return therm ? numES : 0; }
63 static constexpr int numEnergyEq() { return numEnergyEqFluid()+numEnergyEqSolid(); }
64
65 static constexpr bool enableEnergyBalance() { return ET::enableEnergyBalance() || therm; }
66 static constexpr bool enableThermalNonEquilibrium() { return therm; }
67 static constexpr bool enableChemicalNonEquilibrium() { return chem; }
68
69 static constexpr NusseltFormulation nusseltFormulation() { return nf; }
70 static constexpr SherwoodFormulation sherwoodFormulation() { return sf; }
71
72 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");
73
74 using Indices = NonEquilbriumIndices<typename ET::Indices, numEnergyEqFluid(), numEnergyEqSolid(), numEq()>;
75};
76
77namespace Properties
78{
79
81// Type tags
83namespace TTag {
85}
86
88// Properties for the non-equilibrium mpnc model
90
92template<class TypeTag>
93struct ModelTraits<TypeTag, TTag::NonEquilibrium>
94{
95private:
97 static constexpr bool enableTNE = getPropValue<TypeTag, Properties::EnableThermalNonEquilibrium>();
98 static constexpr bool enableCNE = getPropValue<TypeTag, Properties::EnableChemicalNonEquilibrium>();
99 static constexpr int numEF = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
100 static constexpr int numES = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
101 static constexpr auto nf = getPropValue<TypeTag, Properties::NusseltFormulation>();
102 static constexpr auto ns = getPropValue<TypeTag, Properties::SherwoodFormulation>();
103public:
105};
106
108template<class TypeTag>
109struct EnableThermalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
110template<class TypeTag>
111struct EnableChemicalNonEquilibrium<TypeTag, TTag::NonEquilibrium> { static constexpr bool value = true; };
112
114template<class TypeTag>
115struct NumEnergyEqSolid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = 1; };
116template<class TypeTag>
117struct NumEnergyEqFluid<TypeTag, TTag::NonEquilibrium> { static constexpr int value = GetPropType<TypeTag, Properties::EquilibriumModelTraits>::numFluidPhases(); };
118
119template<class TypeTag>
121template<class TypeTag>
122struct LocalResidual<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumLocalResidual<TypeTag>; };
123template<class TypeTag>
124struct HeatConductionType<TypeTag, TTag::NonEquilibrium> { using type = FouriersLawNonEquilibrium<TypeTag>; };
125
126template<class TypeTag>
127struct FluidState<TypeTag, TTag::NonEquilibrium>
128{
129private:
132public:
134};
135
137template<class TypeTag>
138struct GridVariables<TypeTag, TTag::NonEquilibrium> { using type = NonEquilibriumGridVariables<TypeTag>; };
139
141template<class TypeTag>
142struct IOFields<TypeTag, TTag::NonEquilibrium>
143{
144private:
147public:
149};
150
151template<class TypeTag>
152struct NusseltFormulation<TypeTag, TTag::NonEquilibrium>
153{
154public:
156};
157
162template<class TypeTag>
163struct SherwoodFormulation<TypeTag, TTag::NonEquilibrium>
164{
165public:
167};
168
169} //end namespace Properties
170} //end namespace Dumux
171
172#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...
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
Traits class encapsulating model specifications.
Definition: common/properties.hh:66
A class helping models to define input and output fields.
Definition: common/properties.hh:76
Definition: common/properties.hh:89
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:134
The local residual of the energy equation.
Definition: common/properties.hh:150
The type for the calculation of the heat conduction fluxes.
Definition: common/properties.hh:160
The type of the fluid state to use.
Definition: common/properties.hh:169
Definition: common/properties.hh:272
Definition: common/properties.hh:274
Definition: common/properties.hh:276
Definition: common/properties.hh:278
Definition: common/properties.hh:281
Definition: common/properties.hh:283
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: porousmediumflow/nonequilibrium/iofields.hh:33
Definition: porousmediumflow/nonequilibrium/localresidual.hh:37
Specifies a number properties of porous-medium flow non-equilibrium models.
Definition: porousmediumflow/nonequilibrium/model.hh:57
static constexpr NusseltFormulation nusseltFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:69
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/nonequilibrium/model.hh:65
static constexpr SherwoodFormulation sherwoodFormulation()
Definition: porousmediumflow/nonequilibrium/model.hh:70
static constexpr int numTransportEq()
Definition: porousmediumflow/nonequilibrium/model.hh:59
static constexpr int numEq()
Definition: porousmediumflow/nonequilibrium/model.hh:58
static constexpr bool enableChemicalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:67
static constexpr int numEnergyEqFluid()
Definition: porousmediumflow/nonequilibrium/model.hh:61
static constexpr int numEnergyEq()
Definition: porousmediumflow/nonequilibrium/model.hh:63
static constexpr int numEnergyEqSolid()
Definition: porousmediumflow/nonequilibrium/model.hh:62
static constexpr bool enableThermalNonEquilibrium()
Definition: porousmediumflow/nonequilibrium/model.hh:66
Definition: porousmediumflow/nonequilibrium/model.hh:84
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 tracer 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.