3.6-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 enableCompositionalDispersion() { return false; }
66 static constexpr bool enableThermalDispersion() { return false; }
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
76 using Indices = NonEquilbriumIndices<typename ET::Indices, numEnergyEqFluid(), numEnergyEqSolid(), numEq()>;
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
Diffusive heat flux according to non-equilibrium Fourier's law.
Collection of functions, calculating dimensionless numbers.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system witho...
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
NusseltFormulation
A container for possible values of the property for selecting which Nusselt parametrization to choose...
Definition: dimensionlessnumbers.hh:43
SherwoodFormulation
A container for possible values of the property for selecting which Sherwood parametrization to choos...
Definition: dimensionlessnumbers.hh:52
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Traits class encapsulating model specifications.
Definition: common/properties.hh:51
A class helping models to define input and output fields.
Definition: common/properties.hh:61
Definition: common/properties.hh:72
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:121
The local residual of the energy equation.
Definition: common/properties.hh:137
The type for the calculation of the heat conduction fluxes.
Definition: common/properties.hh:149
The type of the fluid state to use.
Definition: common/properties.hh:162
Definition: common/properties.hh:265
Definition: common/properties.hh:267
Definition: common/properties.hh:269
Definition: common/properties.hh:271
Definition: common/properties.hh:274
Definition: common/properties.hh:276
Definition: box/fourierslawnonequilibrium.hh:42
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:38
Specifies a number properties of porous-medium flow non-equilibrium models.
Definition: porousmediumflow/nonequilibrium/model.hh:57
static constexpr bool enableCompositionalDispersion()
Definition: porousmediumflow/nonequilibrium/model.hh:65
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 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:69
static constexpr bool enableThermalDispersion()
Definition: porousmediumflow/nonequilibrium/model.hh:66
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: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:45
Declares all properties used in Dumux.
TODO: docme!
Defines the primary variable and equation indices used by the isothermal 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.
Adds I/O fields specific to the tracer model.