3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 *****************************************************************************/
64#ifndef DUMUX_3P2CNI_MODEL_HH
65#define DUMUX_3P2CNI_MODEL_HH
66
67#include <dune/common/fvector.hh>
68
72
79
80#include "indices.hh"
81#include "model.hh"
82#include "volumevariables.hh"
83#include "localresidual.hh"
84#include "iofields.hh"
85
86namespace Dumux {
87
92template<bool onlyGasPhase>
94{
96
97 static constexpr int numEq() { return 2; }
98 static constexpr int numFluidPhases() { return 3; }
99 static constexpr int numFluidComponents() { return 2; }
100
101 static constexpr bool enableAdvection() { return true; }
102 static constexpr bool enableMolecularDiffusion() { return true; }
103 static constexpr bool enableEnergyBalance() { return false; }
104
105 static constexpr bool onlyGasPhaseCanDisappear() { return onlyGasPhase; }
106};
107
108namespace Properties {
109
110// Create new type tags
111namespace TTag {
112struct ThreePWaterOilNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
113} // end namespace TTag
114
116// Property values
118
120template<class TypeTag>
121struct ModelTraits<TypeTag, TTag::ThreePWaterOilNI>
122{
123private:
125 static_assert(FluidSystem::numComponents == 2, "Only fluid systems with 2 components are supported by the 3p2cni model!");
126 static_assert(FluidSystem::numPhases == 3, "Only fluid systems with 3 phases are supported by the 3p2cni model!");
127public:
129};
130
137template<class TypeTag>
138struct FluidState<TypeTag, TTag::ThreePWaterOilNI>{
139 private:
142 public:
144};
145
147template<class TypeTag>
148struct LocalResidual<TypeTag, TTag::ThreePWaterOilNI> { using type = ThreePWaterOilLocalResidual<TypeTag>; };
149
151template<class TypeTag>
152struct ReplaceCompEqIdx<TypeTag, TTag::ThreePWaterOilNI> { static constexpr int value = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents(); };
153
155template<class TypeTag>
156struct PrimaryVariables<TypeTag, TTag::ThreePWaterOilNI>
157{
158private:
159 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
161public:
163};
164
166template<class TypeTag>
167struct OnlyGasPhaseCanDisappear<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
168
170template<class TypeTag>
171struct VolumeVariables<TypeTag, TTag::ThreePWaterOilNI>
172{
173private:
182
186 template<class BaseTraits, class DT, class EDM, class ETCM>
187 struct NCNITraits : public BaseTraits
188 {
189 using DiffusionType = DT;
190 using EffectiveDiffusivityModel = EDM;
191 using EffectiveThermalConductivityModel = ETCM;
192 };
193
194public:
196};
197
199template<class TypeTag>
200struct EffectiveDiffusivityModel<TypeTag, TTag::ThreePWaterOilNI>
202
203// Define that mole fractions are used in the balance equations per default
204template<class TypeTag>
205struct UseMoles<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
206
208template<class TypeTag>
210
212template<class TypeTag>
213struct IOFields<TypeTag, TTag::ThreePWaterOilNI> { using type = EnergyIOFields<ThreePWaterOilIOFields>; };
214
215} // end namespace Properties
216} // end namespace Dumux
217
218#endif
Relation for the saturation-dependent effective thermal conductivity.
Relation for the saturation-dependent effective diffusion coefficient.
A primary variable vector with a state to allow variable switches.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
A vector of primary variables.
Definition: common/properties.hh:49
Traits class encapsulating model specifications.
Definition: common/properties.hh:51
A class helping models to define input and output fields.
Definition: common/properties.hh:61
Definition: common/properties.hh:72
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:83
The component balance index that should be replaced by the total mass/mole balance.
Definition: common/properties.hh:85
The secondary variables within a sub-control volume.
Definition: common/properties.hh:105
The type of the fluid state to use.
Definition: common/properties.hh:162
The employed model for the computation of the effective diffusivity.
Definition: common/properties.hh:168
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:170
reduces the phasestates to threePhases and wnPhaseOnly
Definition: common/properties.hh:201
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:60
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:52
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:47
Traits class for the two-phase model.
Definition: porousmediumflow/3p/model.hh:98
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:41
Specifies a number properties of the three-phase two-component model.
Definition: porousmediumflow/3pwateroil/model.hh:94
static constexpr int numFluidComponents()
Definition: porousmediumflow/3pwateroil/model.hh:99
static constexpr int numFluidPhases()
Definition: porousmediumflow/3pwateroil/model.hh:98
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/3pwateroil/model.hh:102
static constexpr bool onlyGasPhaseCanDisappear()
Definition: porousmediumflow/3pwateroil/model.hh:105
static constexpr int numEq()
Definition: porousmediumflow/3pwateroil/model.hh:97
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/3pwateroil/model.hh:103
static constexpr bool enableAdvection()
Definition: porousmediumflow/3pwateroil/model.hh:101
Definition: porousmediumflow/3pwateroil/model.hh:112
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/3pwateroil/model.hh:112
Contains the quantities which are are constant within a finite volume in the three-phase,...
Definition: porousmediumflow/3pwateroil/volumevariables.hh:69
A primary variable vector with a state to allow variable switches.
Definition: switchableprimaryvariables.hh:40
Adds I/O fields specific to non-isothermal models.
Definition: 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 flow model.
The implicit non-isothermal model.
Adaption of the fully implicit scheme to the tracer transport model.
Adds I/O fields specific to non-isothermal models.
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)
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.