3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p/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 *****************************************************************************/
57#ifndef DUMUX_TWOP_MODEL_HH
58#define DUMUX_TWOP_MODEL_HH
59
61
65
72
73#include "formulation.hh"
74#include "indices.hh"
75#include "volumevariables.hh"
76#include "iofields.hh"
78
79namespace Dumux
80{
85template<TwoPFormulation formulation>
87{
89
91 { return formulation; }
92
93 static constexpr int numEq() { return 2; }
94 static constexpr int numFluidPhases() { return 2; }
95 static constexpr int numFluidComponents() { return 2; }
96
97 static constexpr bool enableAdvection() { return true; }
98 static constexpr bool enableMolecularDiffusion() { return false; }
99 static constexpr bool enableEnergyBalance() { return false; }
100};
101
116template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
118{
120 using FluidSystem = FSY;
121 using FluidState = FST;
122 using SolidSystem = SSY;
123 using SolidState = SST;
125 using ModelTraits = MT;
127};
128
129// necessary for models derived from 2p
130class TwoPIOFields;
131
133// properties
135namespace Properties {
136
138// Type tags
140
141// Create new type tags
142namespace TTag {
144struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
145
147struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
148} // end namespace TTag
149
151// properties for the isothermal two-phase model
154template<class TypeTag>
155struct Formulation<TypeTag, TTag::TwoP>
156{ static constexpr auto value = TwoPFormulation::p0s1; };
157
158template<class TypeTag>
159struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
160
162template<class TypeTag>
164template<class TypeTag>
166
168template<class TypeTag>
169struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
170
172template<class TypeTag>
173struct VolumeVariables<TypeTag, TTag::TwoP>
174{
175private:
183
185 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
186 // class used for scv-wise reconstruction of non-wetting phase saturations
188
190public:
192};
193
195template<class TypeTag>
196struct FluidState<TypeTag, TTag::TwoP>
197{
198private:
201public:
203};
204
206// properties for the non-isothermal two-phase model
208
210template<class TypeTag>
212
214template<class TypeTag>
215struct VolumeVariables<TypeTag, TTag::TwoPNI>
216{
217private:
226 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
227 // class used for scv-wise reconstruction of non-wetting phase saturations
230
232
233 template<class BaseTraits, class ETCM>
234 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
235
236public:
238};
239
241template<class TypeTag>
242struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
243
245template<class TypeTag>
246struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
247{
248private:
250public:
252};
253
254} // end namespace Properties
255} // end namespace Dumux
256
257#endif
Relation for the saturation-dependent effective thermal conductivity.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Defines an enumeration for the formulations accepted by the two-phase model.
TwoPFormulation
Enumerates the formulations which the two-phase model accepts.
Definition: formulation.hh:35
@ p0s1
first phase pressure and second phase saturation as primary variables
Definition: adapt.hh:29
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
Model traits to be used as a base for nonisothermal, mineralization ... models.
Definition: common/properties.hh:68
A class helping models to define input and output fields.
Definition: common/properties.hh:76
Definition: common/properties.hh:89
The secondary variables within a sub-control volume.
Definition: common/properties.hh:118
The type of the fluid state to use.
Definition: common/properties.hh:169
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:177
The formulation of the model.
Definition: common/properties.hh:181
Relation for the saturation-dependent effective thermal conductivity.
Definition: thermalconductivitysomerton.hh:60
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:42
Defines the indices required for the two-phase fully implicit model.
Definition: porousmediumflow/2p/indices.hh:37
Adds I/O fields specific to the two-phase model.
Definition: porousmediumflow/2p/iofields.hh:39
Specifies a number properties of two-phase models.
Definition: porousmediumflow/2p/model.hh:87
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:90
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:98
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:99
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:93
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:95
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:97
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:94
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:118
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:126
FST FluidState
Definition: porousmediumflow/2p/model.hh:121
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:120
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:122
SST SolidState
Definition: porousmediumflow/2p/model.hh:123
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:125
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:119
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:124
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:144
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:144
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:147
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:147
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:165
Class that computes the non-wetting saturation in an scv from the saturation at the global degree of ...
Definition: saturationreconstruction.hh:43
Contains the quantities which are are constant within a finite volume in the two-phase model.
Definition: porousmediumflow/2p/volumevariables.hh:45
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
Definition: porousmediumflow/immiscible/localresidual.hh:39
Adds I/O fields specific to non-isothermal models.
Definition: porousmediumflow/nonisothermal/iofields.hh:39
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition: porousmediumflow/nonisothermal/model.hh:70
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
A single-phase, isothermal flow model using the fully implicit scheme.
The implicit non-isothermal model.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
Base class for the model specific class which provides access to all volume averaged quantities.
Defines the indices used by the non-isothermal two-phase two-component model.
Defines the primary variable and equation indices used by the isothermal tracer model.