version 3.11-dev
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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
48#ifndef DUMUX_2P1C_MODEL_HH
49#define DUMUX_2P1C_MODEL_HH
50
51#include <dune/common/fvector.hh>
52
54
57
64
65#include "darcyslaw.hh"
66#include "iofields.hh"
67#include "localresidual.hh"
68#include "indices.hh"
69#include "volumevariables.hh"
70
71namespace Dumux {
72
78template<TwoPFormulation f>
80{
82
84 static constexpr int numEq() { return 2; }
86 static constexpr int numEnergyEq() { return 1; }
87 static constexpr int numFluidPhases() { return 2; }
88 static constexpr int numFluidComponents() { return 1; }
89
90 static constexpr bool enableAdvection() { return true; }
91 static constexpr bool enableMolecularDiffusion() { return false; }
92 static constexpr bool enableEnergyBalance() { return true; }
93
94 static constexpr TwoPFormulation priVarFormulation() { return f; }
95};
96
107template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
109{
111 using FluidSystem = FSY;
112 using FluidState = FST;
113 using SolidSystem = SSY;
114 using SolidState = SST;
116 using ModelTraits = MT;
117};
118
119namespace Properties {
121// Create new type tags
122namespace TTag {
123struct TwoPOneCNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
124} // end namespace TTag
125
127// Properties
129
136template<class TypeTag>
137struct FluidState<TypeTag, TTag::TwoPOneCNI>
138{
139private:
142public:
144};
145
147template<class TypeTag>
148struct Formulation<TypeTag, TTag::TwoPOneCNI>
149{ static constexpr TwoPFormulation value = TwoPFormulation::p1s0; };
150
152template<class TypeTag>
153struct UseBlockingOfSpuriousFlow<TypeTag, TTag::TwoPOneCNI> { static constexpr bool value = false; };
154
156template<class TypeTag>
157struct LocalResidual<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCLocalResidual<TypeTag>; };
158
160template<class TypeTag>
161struct AdvectionType<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCDarcysLaw<TypeTag>; };
162
164template<class TypeTag>
165struct VolumeVariables<TypeTag, TTag::TwoPOneCNI>
166{
167private:
175 static_assert(FSY::numComponents == 1, "Only fluid systems with 1 component are supported by the 2p1cni model!");
176 static_assert(FSY::numPhases == 2, "Only fluid systems with 2 phases are supported by the 2p1cni model!");
177
180 template<class BaseTraits, class ETCM>
181 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
182public:
184};
185
187template<class TypeTag>
188struct PrimaryVariables<TypeTag, TTag::TwoPOneCNI>
189{
190private:
191 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
193public:
195};
196
198template<class TypeTag>
199struct ThermalConductivityModel<TypeTag, TTag::TwoPOneCNI> { using type = ThermalConductivitySomertonTwoP<GetPropType<TypeTag, Properties::Scalar>>; };
200
202// Property values for isothermal model required for the general non-isothermal model
204
206template<class TypeTag>
207struct ModelTraits<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCNIModelTraits<getPropValue<TypeTag, Properties::Formulation>()>; };
208
210template<class TypeTag>
211struct IOFields<TypeTag, TTag::TwoPOneCNI> { using type = EnergyIOFields<TwoPOneCIOFields>; };
212
213} // end namespace Properties
214} // end namespace Dumux
215
216#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
Effective thermal conductivity after Somerton.
Definition: somerton.hh:52
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:296
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.
Adds I/O fields specific to the tracer model.
Defines the indices for the elastic model.
Local residual for the hyperelastic model.
Volume variables for the hyperelasticity model.
Effective thermal conductivity after Somerton.
Definition: porousmediumflow/2p1c/model.hh:123
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p1c/model.hh:123
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:80
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p1c/model.hh:87
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p1c/model.hh:88
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p1c/model.hh:92
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p1c/model.hh:91
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p1c/model.hh:94
static constexpr int numEq()
We solve for one more equation, i.e. the energy balance.
Definition: porousmediumflow/2p1c/model.hh:84
static constexpr int numEnergyEq()
only one energy equation is needed when assuming thermal equilibrium
Definition: porousmediumflow/2p1c/model.hh:86
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p1c/model.hh:90
Traits class for the two-phase model.
Definition: porousmediumflow/2p1c/model.hh:109
FST FluidState
Definition: porousmediumflow/2p1c/model.hh:112
PT PermeabilityType
Definition: porousmediumflow/2p1c/model.hh:115
MT ModelTraits
Definition: porousmediumflow/2p1c/model.hh:116
PV PrimaryVariables
Definition: porousmediumflow/2p1c/model.hh:110
SST SolidState
Definition: porousmediumflow/2p1c/model.hh:114
FSY FluidSystem
Definition: porousmediumflow/2p1c/model.hh:111
SSY SolidSystem
Definition: porousmediumflow/2p1c/model.hh:113
A primary variable vector with a state to allow variable switches.