3.6-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 *****************************************************************************/
50#ifndef DUMUX_TWOP_MODEL_HH
51#define DUMUX_TWOP_MODEL_HH
52
54
57
63
64#include "formulation.hh"
65#include "indices.hh"
66#include "volumevariables.hh"
67#include "iofields.hh"
69
70namespace Dumux
71{
76template<TwoPFormulation formulation>
78{
80
82 { return formulation; }
83
84 static constexpr int numEq() { return 2; }
85 static constexpr int numFluidPhases() { return 2; }
86 static constexpr int numFluidComponents() { return 2; }
87
88 static constexpr bool enableAdvection() { return true; }
89 static constexpr bool enableMolecularDiffusion() { return false; }
90 static constexpr bool enableEnergyBalance() { return false; }
91};
92
107template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
109{
111 using FluidSystem = FSY;
112 using FluidState = FST;
113 using SolidSystem = SSY;
116 using ModelTraits = MT;
118};
119
120// necessary for models derived from 2p
121class TwoPIOFields;
122
124// properties
126namespace Properties {
127
129// Type tags
131
132// Create new type tags
133namespace TTag {
135struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
136
138struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
139} // end namespace TTag
140
142// properties for the isothermal two-phase model
145template<class TypeTag>
146struct Formulation<TypeTag, TTag::TwoP>
147{ static constexpr auto value = TwoPFormulation::p0s1; };
148
149template<class TypeTag>
150struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
151
153template<class TypeTag>
155template<class TypeTag>
157
159template<class TypeTag>
160struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
161
163template<class TypeTag>
164struct VolumeVariables<TypeTag, TTag::TwoP>
165{
166private:
175 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
176 // class used for scv-wise reconstruction of nonwetting phase saturations
178
180public:
182};
183
185template<class TypeTag>
186struct FluidState<TypeTag, TTag::TwoP>
187{
188private:
191public:
193};
194
196// properties for the non-isothermal two-phase model
198
200template<class TypeTag>
202
204template<class TypeTag>
205struct VolumeVariables<TypeTag, TTag::TwoPNI>
206{
207private:
216 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
217 // class used for scv-wise reconstruction of nonwetting phase saturations
220
222
223 template<class BaseTraits, class ETCM>
224 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
225
226public:
228};
229
231template<class TypeTag>
232struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
233
235template<class TypeTag>
236struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
237{
238private:
240public:
242};
243
244} // end namespace Properties
245} // end namespace Dumux
246
247#endif
Relation for the saturation-dependent effective thermal conductivity.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
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
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
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
Model traits to be used as a base for nonisothermal, mineralization ... models.
Definition: common/properties.hh:53
A class helping models to define input and output fields.
Definition: common/properties.hh:61
Definition: common/properties.hh:72
The secondary variables within a sub-control volume.
Definition: common/properties.hh:105
The type of the fluid state to use.
Definition: common/properties.hh:162
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:170
The formulation of the model.
Definition: common/properties.hh:174
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:78
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:81
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:89
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:90
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:84
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:86
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:88
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:85
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:109
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:117
FST FluidState
Definition: porousmediumflow/2p/model.hh:112
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:111
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:113
SST SolidState
Definition: porousmediumflow/2p/model.hh:114
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:116
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:110
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:115
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:135
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:135
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:138
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:138
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:156
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...
Python wrapper for volume variables (finite volume schemes)
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.