3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * 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 *****************************************************************************/
57#ifndef DUMUX_2P1C_MODEL_HH
58#define DUMUX_2P1C_MODEL_HH
59
60#include <dune/common/fvector.hh>
61
63
66
73
74#include "darcyslaw.hh"
75#include "iofields.hh"
76#include "localresidual.hh"
77#include "indices.hh"
78#include "volumevariables.hh"
79
80namespace Dumux {
81
87template<TwoPFormulation f>
89{
91
93 static constexpr int numEq() { return 2; }
95 static constexpr int numEnergyEq() { return 1; }
96 static constexpr int numFluidPhases() { return 2; }
97 static constexpr int numFluidComponents() { return 1; }
98
99 static constexpr bool enableAdvection() { return true; }
100 static constexpr bool enableMolecularDiffusion() { return false; }
101 static constexpr bool enableEnergyBalance() { return true; }
102
103 static constexpr TwoPFormulation priVarFormulation() { return f; }
104};
105
116template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
118{
120 using FluidSystem = FSY;
121 using FluidState = FST;
122 using SolidSystem = SSY;
123 using SolidState = SST;
125 using ModelTraits = MT;
126};
127
128namespace Properties {
130// Create new type tags
131namespace TTag {
132struct TwoPOneCNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
133} // end namespace TTag
134
136// Properties
138
145template<class TypeTag>
146struct FluidState<TypeTag, TTag::TwoPOneCNI>
147{
148private:
151public:
153};
154
156template<class TypeTag>
157struct Formulation<TypeTag, TTag::TwoPOneCNI>
158{ static constexpr TwoPFormulation value = TwoPFormulation::p1s0; };
159
161template<class TypeTag>
162struct UseBlockingOfSpuriousFlow<TypeTag, TTag::TwoPOneCNI> { static constexpr bool value = false; };
163
165template<class TypeTag>
166struct LocalResidual<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCLocalResidual<TypeTag>; };
167
169template<class TypeTag>
170struct AdvectionType<TypeTag, TTag::TwoPOneCNI> { using type = TwoPOneCDarcysLaw<TypeTag>; };
171
173template<class TypeTag>
174struct VolumeVariables<TypeTag, TTag::TwoPOneCNI>
175{
176private:
184
185 static_assert(FSY::numComponents == 1, "Only fluid systems with 1 component are supported by the 2p1cni model!");
186 static_assert(FSY::numPhases == 2, "Only fluid systems with 2 phases are supported by the 2p1cni model!");
187
189public:
191};
192
194template<class TypeTag>
195struct PrimaryVariables<TypeTag, TTag::TwoPOneCNI>
196{
197private:
198 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
200public:
202};
203
205template<class TypeTag>
207
209// Property values for isothermal model required for the general non-isothermal model
211
213template<class TypeTag>
215
217template<class TypeTag>
218struct IOFields<TypeTag, TTag::TwoPOneCNI> { using type = EnergyIOFields<TwoPOneCIOFields>; };
219
220} // end namespace Properties
221} // end namespace Dumux
222
223#endif // DUMUX_2P1C_MODEL_HH
Relation for the saturation-dependent effective thermal conductivity.
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.
A primary variable vector with a state to allow variable switches.
TwoPFormulation
Enumerates the formulations which the two-phase model accepts.
Definition: formulation.hh:35
@ p1s0
first phase saturation and second phase pressure as primary variables
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
A vector of primary variables.
Definition: common/properties.hh:59
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
A class helping models to define input and output fields.
Definition: common/properties.hh:78
Definition: common/properties.hh:91
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
The type for the calculation the advective fluxes.
Definition: common/properties.hh:208
The type of the fluid state to use.
Definition: common/properties.hh:225
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:233
The formulation of the model.
Definition: common/properties.hh:237
Relation for the saturation-dependent effective thermal conductivity.
Definition: thermalconductivitysomerton.hh:60
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:47
Determines whether blocking of spurious flow is used or not.
Definition: porousmediumflow/2p1c/darcyslaw.hh:38
Specialization of Darcy's Law for the two-phase one-component model, including a the possibility to...
Definition: porousmediumflow/2p1c/darcyslaw.hh:49
The indices for the two-phase one-component model.
Definition: porousmediumflow/2p1c/indices.hh:35
Element-wise calculation of the residual for the fully implicit two-phase one-component flow model.
Definition: porousmediumflow/2p1c/localresidual.hh:38
Specifies a number properties of models considering two phases with water as a single component.
Definition: porousmediumflow/2p1c/model.hh:89
static constexpr int numFluidPhases()
Definition: porousmediumflow/2p1c/model.hh:96
static constexpr int numFluidComponents()
Definition: porousmediumflow/2p1c/model.hh:97
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/2p1c/model.hh:101
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/2p1c/model.hh:100
static constexpr TwoPFormulation priVarFormulation()
Definition: porousmediumflow/2p1c/model.hh:103
static constexpr int numEq()
We solve for one more equation, i.e. the energy balance.
Definition: porousmediumflow/2p1c/model.hh:93
static constexpr int numEnergyEq()
only one energy equation is needed when assuming thermal equilibrium
Definition: porousmediumflow/2p1c/model.hh:95
static constexpr bool enableAdvection()
Definition: porousmediumflow/2p1c/model.hh:99
Traits class for the two-phase model.
Definition: porousmediumflow/2p1c/model.hh:118
PT PermeabilityType
Definition: porousmediumflow/2p1c/model.hh:124
SSY SolidSystem
Definition: porousmediumflow/2p1c/model.hh:122
FST FluidState
Definition: porousmediumflow/2p1c/model.hh:121
PV PrimaryVariables
Definition: porousmediumflow/2p1c/model.hh:119
MT ModelTraits
Definition: porousmediumflow/2p1c/model.hh:125
SST SolidState
Definition: porousmediumflow/2p1c/model.hh:123
FSY FluidSystem
Definition: porousmediumflow/2p1c/model.hh:120
Definition: porousmediumflow/2p1c/model.hh:132
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/2p1c/model.hh:132
The volume variables (i.e. secondary variables) for the two-phase one-component model.
Definition: porousmediumflow/2p1c/volumevariables.hh:50
A primary variable vector with a state to allow variable switches.
Definition: switchableprimaryvariables.hh:38
Adds I/O fields specific to non-isothermal models.
Definition: dumux/porousmediumflow/nonisothermal/iofields.hh:39
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
The implicit non-isothermal model.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the twop model.
Element-wise calculation of the local residual for problems using fully implicit tracer model.
Base class for the model specific class which provides access to all volume averaged quantities.
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.