3.4
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
71
72#include "formulation.hh"
73#include "indices.hh"
74#include "volumevariables.hh"
75#include "iofields.hh"
77
78namespace Dumux
79{
84template<TwoPFormulation formulation>
86{
88
90 { return formulation; }
91
92 static constexpr int numEq() { return 2; }
93 static constexpr int numFluidPhases() { return 2; }
94 static constexpr int numFluidComponents() { return 2; }
95
96 static constexpr bool enableAdvection() { return true; }
97 static constexpr bool enableMolecularDiffusion() { return false; }
98 static constexpr bool enableEnergyBalance() { return false; }
99};
100
115template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
117{
119 using FluidSystem = FSY;
120 using FluidState = FST;
121 using SolidSystem = SSY;
122 using SolidState = SST;
124 using ModelTraits = MT;
126};
127
128// necessary for models derived from 2p
129class TwoPIOFields;
130
132// properties
134namespace Properties {
135
137// Type tags
139
140// Create new type tags
141namespace TTag {
143struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
144
146struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
147} // end namespace TTag
148
150// properties for the isothermal two-phase model
153template<class TypeTag>
154struct Formulation<TypeTag, TTag::TwoP>
155{ static constexpr auto value = TwoPFormulation::p0s1; };
156
157template<class TypeTag>
158struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
159
161template<class TypeTag>
163template<class TypeTag>
165
167template<class TypeTag>
168struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
169
171template<class TypeTag>
172struct VolumeVariables<TypeTag, TTag::TwoP>
173{
174private:
182
184 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
185 // class used for scv-wise reconstruction of nonwetting phase saturations
187
189public:
191};
192
194template<class TypeTag>
195struct FluidState<TypeTag, TTag::TwoP>
196{
197private:
200public:
202};
203
205// properties for the non-isothermal two-phase model
207
209template<class TypeTag>
211
213template<class TypeTag>
214struct VolumeVariables<TypeTag, TTag::TwoPNI>
215{
216private:
225 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
226 // class used for scv-wise reconstruction of nonwetting phase saturations
229
231
232 template<class BaseTraits, class ETCM>
233 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
234
235public:
237};
238
240template<class TypeTag>
241struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
242
244template<class TypeTag>
245struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
246{
247private:
249public:
251};
252
253} // end namespace Properties
254} // end namespace Dumux
255
256#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
Definition: propertysystem.hh:150
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
Model traits to be used as a base for nonisothermal, mineralization ... models.
Definition: common/properties.hh:55
A class helping models to define input and output fields.
Definition: common/properties.hh:63
Definition: common/properties.hh:74
The secondary variables within a sub-control volume.
Definition: common/properties.hh:103
The type of the fluid state to use.
Definition: common/properties.hh:154
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:162
The formulation of the model.
Definition: common/properties.hh:166
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.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:86
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:89
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:97
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:98
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:92
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:94
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:96
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:93
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:117
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:125
FST FluidState
Definition: porousmediumflow/2p/model.hh:120
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:119
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:121
SST SolidState
Definition: porousmediumflow/2p/model.hh:122
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:124
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:118
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:123
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:143
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:143
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:146
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:146
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:164
Class that computes the nonwetting saturation in an scv from the saturation at the global degree of f...
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:40
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.
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.