version 3.7
porousmediumflow/2p1c/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_2P1C_MODEL_HH
39#define DUMUX_2P1C_MODEL_HH
40
41#include <dune/common/fvector.hh>
42
44
47
54
55#include "darcyslaw.hh"
56#include "iofields.hh"
57#include "localresidual.hh"
58#include "indices.hh"
59#include "volumevariables.hh"
60
61namespace Dumux {
62
68template<TwoPFormulation f>
70{
72
74 static constexpr int numEq() { return 2; }
76 static constexpr int numEnergyEq() { return 1; }
77 static constexpr int numFluidPhases() { return 2; }
78 static constexpr int numFluidComponents() { return 1; }
79
80 static constexpr bool enableAdvection() { return true; }
81 static constexpr bool enableMolecularDiffusion() { return false; }
82 static constexpr bool enableEnergyBalance() { return true; }
83
84 static constexpr TwoPFormulation priVarFormulation() { return f; }
85};
86
97template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
99{
101 using FluidSystem = FSY;
102 using FluidState = FST;
103 using SolidSystem = SSY;
106 using ModelTraits = MT;
107};
108
109namespace Properties {
111// Create new type tags
112namespace TTag {
113struct TwoPOneCNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
114} // end namespace TTag
115
117// Properties
119
126template<class TypeTag>
127struct FluidState<TypeTag, TTag::TwoPOneCNI>
128{
129private:
132public:
134};
135
137template<class TypeTag>
138struct Formulation<TypeTag, TTag::TwoPOneCNI>
139{ static constexpr TwoPFormulation value = TwoPFormulation::p1s0; };
140
142template<class TypeTag>
143struct UseBlockingOfSpuriousFlow<TypeTag, TTag::TwoPOneCNI> { static constexpr bool value = false; };
144
146template<class TypeTag>
147struct LocalResidual<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCLocalResidual<TypeTag>; };
148
150template<class TypeTag>
151struct AdvectionType<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCDarcysLaw<TypeTag>; };
152
154template<class TypeTag>
155struct VolumeVariables<TypeTag, TTag::TwoPOneCNI>
156{
157private:
165 static_assert(FSY::numComponents == 1, "Only fluid systems with 1 component are supported by the 2p1cni model!");
166 static_assert(FSY::numPhases == 2, "Only fluid systems with 2 phases are supported by the 2p1cni model!");
167
170 template<class BaseTraits, class ETCM>
171 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
172public:
174};
175
177template<class TypeTag>
178struct PrimaryVariables<TypeTag, TTag::TwoPOneCNI>
179{
180private:
181 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
183public:
185};
186
188template<class TypeTag>
189struct ThermalConductivityModel<TypeTag, TTag::TwoPOneCNI> { using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; };
190
192// Property values for isothermal model required for the general non-isothermal model
194
196template<class TypeTag>
197struct ModelTraits<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCNIModelTraits<getPropValue<TypeTag, Properties::Formulation>()>; };
198
200template<class TypeTag>
201struct IOFields<TypeTag, TTag::TwoPOneCNI> { using type = EnergyIOFields<TwoPOneCIOFields>; };
202
203} // end namespace Properties
204} // end namespace Dumux
205
206#endif
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:35
Adds I/O fields specific to non-isothermal models.
Definition: porousmediumflow/nonisothermal/iofields.hh:27
A primary variable vector with a state to allow variable switches.
Definition: switchableprimaryvariables.hh:28
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:48
Specialization of Darcy's Law for the two-phase one-component model, including a the possibility to...
Definition: porousmediumflow/2p1c/darcyslaw.hh:37
The indices for the two-phase one-component model.
Definition: porousmediumflow/2p1c/indices.hh:23
Element-wise calculation of the residual for the fully implicit two-phase one-component flow model.
Definition: porousmediumflow/2p1c/localresidual.hh:27
The volume variables (i.e. secondary variables) for the two-phase one-component model.
Definition: porousmediumflow/2p1c/volumevariables.hh:37
Defines all properties used in Dumux.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
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
@ p1s0
first phase saturation and second phase pressure as primary variables
Definition: adapt.hh:17
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.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Python wrapper for volume variables (finite volume schemes)
Relation for the saturation-dependent effective thermal conductivity.
Definition: porousmediumflow/2p1c/model.hh:113
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p1c/model.hh:113
Determines whether blocking of spurious flow is used or not.
Definition: porousmediumflow/2p1c/darcyslaw.hh:26
Specifies a number properties of models considering two phases with water as a single component.
Definition: porousmediumflow/2p1c/model.hh:70
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p1c/model.hh:77
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p1c/model.hh:78
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p1c/model.hh:82
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p1c/model.hh:81
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p1c/model.hh:84
static constexpr int numEq()
We solve for one more equation, i.e. the energy balance.
Definition: porousmediumflow/2p1c/model.hh:74
static constexpr int numEnergyEq()
only one energy equation is needed when assuming thermal equilibrium
Definition: porousmediumflow/2p1c/model.hh:76
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p1c/model.hh:80
Traits class for the two-phase model.
Definition: porousmediumflow/2p1c/model.hh:99
FST FluidState
Definition: porousmediumflow/2p1c/model.hh:102
PT PermeabilityType
Definition: porousmediumflow/2p1c/model.hh:105
MT ModelTraits
Definition: porousmediumflow/2p1c/model.hh:106
PV PrimaryVariables
Definition: porousmediumflow/2p1c/model.hh:100
SST SolidState
Definition: porousmediumflow/2p1c/model.hh:104
FSY FluidSystem
Definition: porousmediumflow/2p1c/model.hh:101
SSY SolidSystem
Definition: porousmediumflow/2p1c/model.hh:103
A primary variable vector with a state to allow variable switches.