3.5-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 *****************************************************************************/
53#ifndef DUMUX_TWOP_MODEL_HH
54#define DUMUX_TWOP_MODEL_HH
55
57
60
66
67#include "formulation.hh"
68#include "indices.hh"
69#include "volumevariables.hh"
70#include "iofields.hh"
72
73namespace Dumux
74{
79template<TwoPFormulation formulation>
81{
83
85 { return formulation; }
86
87 static constexpr int numEq() { return 2; }
88 static constexpr int numFluidPhases() { return 2; }
89 static constexpr int numFluidComponents() { return 2; }
90
91 static constexpr bool enableAdvection() { return true; }
92 static constexpr bool enableMolecularDiffusion() { return false; }
93 static constexpr bool enableEnergyBalance() { return false; }
94};
95
110template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
112{
114 using FluidSystem = FSY;
115 using FluidState = FST;
116 using SolidSystem = SSY;
119 using ModelTraits = MT;
121};
122
123// necessary for models derived from 2p
124class TwoPIOFields;
125
127// properties
129namespace Properties {
130
132// Type tags
134
135// Create new type tags
136namespace TTag {
138struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
139
141struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
142} // end namespace TTag
143
145// properties for the isothermal two-phase model
148template<class TypeTag>
149struct Formulation<TypeTag, TTag::TwoP>
150{ static constexpr auto value = TwoPFormulation::p0s1; };
151
152template<class TypeTag>
153struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
154
156template<class TypeTag>
158template<class TypeTag>
160
162template<class TypeTag>
163struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
164
166template<class TypeTag>
167struct VolumeVariables<TypeTag, TTag::TwoP>
168{
169private:
178 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
179 // class used for scv-wise reconstruction of nonwetting phase saturations
181
183public:
185};
186
188template<class TypeTag>
189struct FluidState<TypeTag, TTag::TwoP>
190{
191private:
194public:
196};
197
199// properties for the non-isothermal two-phase model
201
203template<class TypeTag>
205
207template<class TypeTag>
208struct VolumeVariables<TypeTag, TTag::TwoPNI>
209{
210private:
219 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
220 // class used for scv-wise reconstruction of nonwetting phase saturations
223
225
226 template<class BaseTraits, class ETCM>
227 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
228
229public:
231};
232
234template<class TypeTag>
235struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
236
238template<class TypeTag>
239struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
240{
241private:
243public:
245};
246
247} // end namespace Properties
248} // end namespace Dumux
249
250#endif
Defines an enumeration for the formulations accepted by the two-phase model.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Relation for the saturation-dependent effective thermal conductivity.
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:107
The type of the fluid state to use.
Definition: common/properties.hh:164
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:172
The formulation of the model.
Definition: common/properties.hh:176
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:81
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:84
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:92
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:93
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:87
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:89
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:91
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:88
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:112
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:120
FST FluidState
Definition: porousmediumflow/2p/model.hh:115
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:114
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:116
SST SolidState
Definition: porousmediumflow/2p/model.hh:117
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:119
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:113
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:118
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:138
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:138
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:141
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:141
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:159
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
The implicit non-isothermal model.
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
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.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the tracer model.