version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
48#ifndef DUMUX_TWOP_MODEL_HH
49#define DUMUX_TWOP_MODEL_HH
50
52
55
61
62#include "formulation.hh"
63#include "indices.hh"
64#include "volumevariables.hh"
65#include "iofields.hh"
67
68namespace Dumux
69{
74template<TwoPFormulation formulation>
76{
78
80 { return formulation; }
81
82 static constexpr int numEq() { return 2; }
83 static constexpr int numFluidPhases() { return 2; }
84 static constexpr int numFluidComponents() { return 2; }
85
86 static constexpr bool enableAdvection() { return true; }
87 static constexpr bool enableMolecularDiffusion() { return false; }
88 static constexpr bool enableEnergyBalance() { return false; }
89};
90
105template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
107{
109 using FluidSystem = FSY;
110 using FluidState = FST;
111 using SolidSystem = SSY;
114 using ModelTraits = MT;
116};
117
118// necessary for models derived from 2p
119class TwoPIOFields;
120
122// properties
124namespace Properties {
125
127// Type tags
129
130// Create new type tags
131namespace TTag {
133struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
134
136struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
137} // end namespace TTag
138
140// properties for the isothermal two-phase model
143template<class TypeTag>
144struct Formulation<TypeTag, TTag::TwoP>
145{ static constexpr auto value = TwoPFormulation::p0s1; };
146
147template<class TypeTag>
148struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
149
151template<class TypeTag>
152struct BaseModelTraits<TypeTag, TTag::TwoP> { using type = TwoPModelTraits<getPropValue<TypeTag, Properties::Formulation>()>; };
153template<class TypeTag>
154struct ModelTraits<TypeTag, TTag::TwoP> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
155
157template<class TypeTag>
158struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
159
161template<class TypeTag>
162struct VolumeVariables<TypeTag, TTag::TwoP>
163{
164private:
173 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
174 // class used for scv-wise reconstruction of nonwetting phase saturations
176
178public:
180};
181
183template<class TypeTag>
184struct FluidState<TypeTag, TTag::TwoP>
185{
186private:
189public:
191};
192
194// properties for the non-isothermal two-phase model
196
198template<class TypeTag>
199struct ModelTraits<TypeTag, TTag::TwoPNI> { using type = PorousMediumFlowNIModelTraits<GetPropType<TypeTag, Properties::BaseModelTraits>>; };
200
202template<class TypeTag>
203struct VolumeVariables<TypeTag, TTag::TwoPNI>
204{
205private:
214 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
215 // class used for scv-wise reconstruction of nonwetting phase saturations
218
220
221 template<class BaseTraits, class ETCM>
222 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
223
224public:
226};
227
229template<class TypeTag>
230struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
231
233template<class TypeTag>
234struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
235{
236private:
238public:
240};
241
242} // end namespace Properties
243} // end namespace Dumux
244
245#endif
Adds I/O fields specific to non-isothermal models.
Definition: porousmediumflow/nonisothermal/iofields.hh:27
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:30
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
Definition: porousmediumflow/immiscible/localresidual.hh:28
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:48
Adds I/O fields specific to the two-phase model.
Definition: porousmediumflow/2p/iofields.hh:27
Class that computes the nonwetting saturation in an scv from the saturation at the global degree of f...
Definition: saturationreconstruction.hh:31
Contains the quantities which are are constant within a finite volume in the two-phase model.
Definition: porousmediumflow/2p/volumevariables.hh:33
Defines all properties used in Dumux.
Defines an enumeration for the formulations accepted by the two-phase model.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
TwoPFormulation
Enumerates the formulations which the two-phase model accepts.
Definition: formulation.hh:23
@ p0s1
first phase pressure and second phase saturation as primary variables
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: adapt.hh:17
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
Defines the indices used by the non-isothermal two-phase two-component model.
Adds I/O fields specific to non-isothermal models.
The implicit non-isothermal model.
Defines a type tag and some properties for models using the box scheme.
Defines the primary variable and equation indices used by the isothermal tracer model.
Adds I/O fields specific to the tracer model.
Python wrapper for volume variables (finite volume schemes)
Relation for the saturation-dependent effective thermal conductivity.
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition: porousmediumflow/nonisothermal/model.hh:71
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:154
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:133
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:133
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:136
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:136
Defines the indices required for the two-phase fully implicit model.
Definition: porousmediumflow/2p/indices.hh:25
Specifies a number properties of two-phase models.
Definition: porousmediumflow/2p/model.hh:76
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:79
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:87
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:88
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:82
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:84
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:86
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:83
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:107
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:115
FST FluidState
Definition: porousmediumflow/2p/model.hh:110
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:109
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:111
SST SolidState
Definition: porousmediumflow/2p/model.hh:112
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:114
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:108
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:113