3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
porousmediumflow/3pwateroil/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 *****************************************************************************/
70
71#ifndef DUMUX_3P2CNI_MODEL_HH
72#define DUMUX_3P2CNI_MODEL_HH
73
74#include <dune/common/fvector.hh>
75
80
86
87#include "indices.hh"
88#include "model.hh"
89#include "volumevariables.hh"
90#include "localresidual.hh"
91#include "iofields.hh"
92
93namespace Dumux {
94
99template<bool onlyGasPhase>
101{
103
104 static constexpr int numEq() { return 2; }
105 static constexpr int numFluidPhases() { return 3; }
106 static constexpr int numFluidComponents() { return 2; }
107
108 static constexpr bool enableAdvection() { return true; }
109 static constexpr bool enableMolecularDiffusion() { return true; }
110 static constexpr bool enableEnergyBalance() { return false; }
111
112 static constexpr bool onlyGasPhaseCanDisappear() { return onlyGasPhase; }
113};
114
125template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
127{
129 using FluidSystem = FSY;
130 using FluidState = FST;
131 using SolidSystem = SSY;
132 using SolidState = SST;
134 using ModelTraits = MT;
135};
136
137namespace Properties {
138
139// Create new type tags
140namespace TTag {
141struct ThreePWaterOilNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
142} // end namespace TTag
143
145// Property values
147
149template<class TypeTag>
150struct ModelTraits<TypeTag, TTag::ThreePWaterOilNI>
151{
152private:
154 static_assert(FluidSystem::numComponents == 2, "Only fluid systems with 2 components are supported by the 3p2cni model!");
155 static_assert(FluidSystem::numPhases == 3, "Only fluid systems with 3 phases are supported by the 3p2cni model!");
156public:
158};
159
166template<class TypeTag>
167struct FluidState<TypeTag, TTag::ThreePWaterOilNI>{
168 private:
171 public:
173};
174
176template<class TypeTag>
177struct LocalResidual<TypeTag, TTag::ThreePWaterOilNI> { using type = ThreePWaterOilLocalResidual<TypeTag>; };
178
180template<class TypeTag>
181struct ReplaceCompEqIdx<TypeTag, TTag::ThreePWaterOilNI> { static constexpr int value = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents(); };
182
184template<class TypeTag>
185struct PrimaryVariables<TypeTag, TTag::ThreePWaterOilNI>
186{
187private:
188 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
190public:
192};
193
195template<class TypeTag>
196struct OnlyGasPhaseCanDisappear<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
197
199template<class TypeTag>
215
217template<class TypeTag>
220
221// Define that mole fractions are used in the balance equations per default
222template<class TypeTag>
223struct UseMoles<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
224
226template<class TypeTag>
227struct ThermalConductivityModel<TypeTag, TTag::ThreePWaterOilNI>
228{
229private:
231public:
233};
234
236template<class TypeTag>
237struct IOFields<TypeTag, TTag::ThreePWaterOilNI> { using type = EnergyIOFields<ThreePWaterOilIOFields>; };
238
239} // end namespace Properties
240} // end namespace Dumux
241
242#endif
Relation for the saturation-dependent effective thermal conductivity.
Relation for the saturation-dependent effective diffusion coefficient.
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
A primary variable vector with a state to allow variable switches.
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
Definition common/properties.hh:47
Type tag for numeric models.
Definition grid.hh:35
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
Property whether to use moles or kg as amount unit for balance equations.
Definition common/properties.hh:102
The component balance index that should be replaced by the total mass/mole balance.
Definition common/properties.hh:104
The secondary variables within a sub-control volume.
Definition common/properties.hh:174
The type of the fluid state to use.
Definition common/properties.hh:225
The employed model for the computation of the effective diffusivity.
Definition common/properties.hh:231
Model to be used for the calculation of the effective conductivity.
Definition common/properties.hh:233
reduces the phasestates to threePhases and wnPhaseOnly
Definition common/properties.hh:264
Relation for the saturation-dependent effective thermal conductivity.
Definition thermalconductivitysomerton.hh:60
Relation for the saturation-dependent effective diffusion coefficient.
Definition diffusivitymillingtonquirk.hh:51
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition compositional.hh:47
The indices for the isothermal 3p2cni model.
Definition porousmediumflow/3pwateroil/indices.hh:35
Element-wise calculation of the local residual for problems using the ThreePWaterOil fully implicit m...
Definition porousmediumflow/3pwateroil/localresidual.hh:40
Specifies a number properties of the three-phase two-component model.
Definition porousmediumflow/3pwateroil/model.hh:101
static constexpr int numFluidComponents()
Definition porousmediumflow/3pwateroil/model.hh:106
ThreePWaterOilIndices Indices
Definition porousmediumflow/3pwateroil/model.hh:102
static constexpr int numFluidPhases()
Definition porousmediumflow/3pwateroil/model.hh:105
static constexpr bool enableMolecularDiffusion()
Definition porousmediumflow/3pwateroil/model.hh:109
static constexpr bool onlyGasPhaseCanDisappear()
Definition porousmediumflow/3pwateroil/model.hh:112
static constexpr int numEq()
Definition porousmediumflow/3pwateroil/model.hh:104
static constexpr bool enableEnergyBalance()
Definition porousmediumflow/3pwateroil/model.hh:110
static constexpr bool enableAdvection()
Definition porousmediumflow/3pwateroil/model.hh:108
Traits class for the two-phase model.
Definition porousmediumflow/3pwateroil/model.hh:127
FST FluidState
Definition porousmediumflow/3pwateroil/model.hh:130
MT ModelTraits
Definition porousmediumflow/3pwateroil/model.hh:134
SST SolidState
Definition porousmediumflow/3pwateroil/model.hh:132
PT PermeabilityType
Definition porousmediumflow/3pwateroil/model.hh:133
PV PrimaryVariables
Definition porousmediumflow/3pwateroil/model.hh:128
FSY FluidSystem
Definition porousmediumflow/3pwateroil/model.hh:129
SSY SolidSystem
Definition porousmediumflow/3pwateroil/model.hh:131
Definition porousmediumflow/3pwateroil/model.hh:141
std::tuple< PorousMediumFlow > InheritsFrom
Definition porousmediumflow/3pwateroil/model.hh:141
PorousMediumFlowNIModelTraits< ThreePWaterOilModelTraits< getPropValue< TypeTag, Properties::OnlyGasPhaseCanDisappear >()> > type
Definition porousmediumflow/3pwateroil/model.hh:157
CompositionalFluidState< Scalar, FluidSystem > type
Definition porousmediumflow/3pwateroil/model.hh:172
ThreePWaterOilLocalResidual< TypeTag > type
Definition porousmediumflow/3pwateroil/model.hh:177
static constexpr int value
Definition porousmediumflow/3pwateroil/model.hh:181
SwitchablePrimaryVariables< PrimaryVariablesVector, int > type
Definition porousmediumflow/3pwateroil/model.hh:191
static constexpr bool value
Definition porousmediumflow/3pwateroil/model.hh:196
ThreePWaterOilVolumeVariables< Traits > type
Definition porousmediumflow/3pwateroil/model.hh:213
DiffusivityMillingtonQuirk< GetPropType< TypeTag, Properties::Scalar > > type
Definition porousmediumflow/3pwateroil/model.hh:219
static constexpr bool value
Definition porousmediumflow/3pwateroil/model.hh:223
ThermalConductivitySomerton< Scalar > type
Definition porousmediumflow/3pwateroil/model.hh:232
EnergyIOFields< ThreePWaterOilIOFields > type
Definition porousmediumflow/3pwateroil/model.hh:237
Contains the quantities which are are constant within a finite volume in the three-phase,...
Definition porousmediumflow/3pwateroil/volumevariables.hh:56
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
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition porousmediumflow/nonisothermal/model.hh:70
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
Adaption of the fully implicit scheme to the three-phase three-component flow model.
The implicit non-isothermal model.
Defines the indices required for the 3p2cni model.
Defines the indices used by the non-isothermal two-phase two-component model.
Adds I/O fields specific to the three-phase three-component model.
Adds I/O fields specific to non-isothermal models.
Element-wise calculation of the Jacobian matrix for problems using the three-phase three-component fu...
Contains the quantities which are constant within a finite volume in the three-phase,...