version 3.7
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//
38#ifndef DUMUX_TWOP_MODEL_HH
39#define DUMUX_TWOP_MODEL_HH
40
42
45
51
52#include "formulation.hh"
53#include "indices.hh"
54#include "volumevariables.hh"
55#include "iofields.hh"
57
58namespace Dumux
59{
64template<TwoPFormulation formulation>
66{
68
70 { return formulation; }
71
72 static constexpr int numEq() { return 2; }
73 static constexpr int numFluidPhases() { return 2; }
74 static constexpr int numFluidComponents() { return 2; }
75
76 static constexpr bool enableAdvection() { return true; }
77 static constexpr bool enableMolecularDiffusion() { return false; }
78 static constexpr bool enableEnergyBalance() { return false; }
79};
80
95template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class SR>
97{
98 using PrimaryVariables = PV;
99 using FluidSystem = FSY;
100 using FluidState = FST;
101 using SolidSystem = SSY;
104 using ModelTraits = MT;
106};
107
108// necessary for models derived from 2p
109class TwoPIOFields;
110
112// properties
114namespace Properties {
115
117// Type tags
119
120// Create new type tags
121namespace TTag {
123struct TwoP { using InheritsFrom = std::tuple<PorousMediumFlow>; };
124
126struct TwoPNI { using InheritsFrom = std::tuple<TwoP>; };
127} // end namespace TTag
128
130// properties for the isothermal two-phase model
133template<class TypeTag>
134struct Formulation<TypeTag, TTag::TwoP>
135{ static constexpr auto value = TwoPFormulation::p0s1; };
136
137template<class TypeTag>
138struct LocalResidual<TypeTag, TTag::TwoP> { using type = ImmiscibleLocalResidual<TypeTag>; };
139
141template<class TypeTag>
142struct BaseModelTraits<TypeTag, TTag::TwoP> { using type = TwoPModelTraits<getPropValue<TypeTag, Properties::Formulation>()>; };
143template<class TypeTag>
144struct ModelTraits<TypeTag, TTag::TwoP> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
145
147template<class TypeTag>
148struct IOFields<TypeTag, TTag::TwoP> { using type = TwoPIOFields; };
149
151template<class TypeTag>
152struct VolumeVariables<TypeTag, TTag::TwoP>
153{
154private:
163 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
164 // class used for scv-wise reconstruction of nonwetting phase saturations
166
168public:
170};
171
173template<class TypeTag>
174struct FluidState<TypeTag, TTag::TwoP>
175{
176private:
179public:
181};
182
184// properties for the non-isothermal two-phase model
186
188template<class TypeTag>
189struct ModelTraits<TypeTag, TTag::TwoPNI> { using type = PorousMediumFlowNIModelTraits<GetPropType<TypeTag, Properties::BaseModelTraits>>; };
190
192template<class TypeTag>
193struct VolumeVariables<TypeTag, TTag::TwoPNI>
194{
195private:
204 static constexpr bool enableIS = getPropValue<TypeTag, Properties::EnableBoxInterfaceSolver>();
205 // class used for scv-wise reconstruction of nonwetting phase saturations
208
210
211 template<class BaseTraits, class ETCM>
212 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
213
214public:
216};
217
219template<class TypeTag>
220struct IOFields<TypeTag, TTag::TwoPNI> { using type = EnergyIOFields<TwoPIOFields>; };
221
223template<class TypeTag>
224struct ThermalConductivityModel<TypeTag, TTag::TwoPNI>
225{
226private:
228public:
230};
231
232} // end namespace Properties
233} // end namespace Dumux
234
235#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:267
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:58
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/2p/model.hh:144
The type tag for the isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:123
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p/model.hh:123
The type tag for the non-isothermal two-phase model.
Definition: porousmediumflow/2p/model.hh:126
std::tuple< TwoP > InheritsFrom
Definition: porousmediumflow/2p/model.hh:126
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:66
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p/model.hh:69
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p/model.hh:77
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p/model.hh:78
static constexpr int numEq()
Definition: porousmediumflow/2p/model.hh:72
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p/model.hh:74
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p/model.hh:76
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p/model.hh:73
Traits class for the two-phase model.
Definition: porousmediumflow/2p/model.hh:97
SR SaturationReconstruction
Definition: porousmediumflow/2p/model.hh:105
FST FluidState
Definition: porousmediumflow/2p/model.hh:100
FSY FluidSystem
Definition: porousmediumflow/2p/model.hh:99
SSY SolidSystem
Definition: porousmediumflow/2p/model.hh:101
SST SolidState
Definition: porousmediumflow/2p/model.hh:102
MT ModelTraits
Definition: porousmediumflow/2p/model.hh:104
PV PrimaryVariables
Definition: porousmediumflow/2p/model.hh:98
PT PermeabilityType
Definition: porousmediumflow/2p/model.hh:103