version 3.8
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
63#ifndef DUMUX_3P2CNI_MODEL_HH
64#define DUMUX_3P2CNI_MODEL_HH
65
66#include <dune/common/fvector.hh>
67
71
78
79#include "indices.hh"
80#include "model.hh"
81#include "volumevariables.hh"
82#include "localresidual.hh"
83#include "iofields.hh"
84
85namespace Dumux {
86
91template<bool onlyGasPhase>
93{
95
96 static constexpr int numEq() { return 2; }
97 static constexpr int numFluidPhases() { return 3; }
98 static constexpr int numFluidComponents() { return 2; }
99
100 static constexpr bool enableAdvection() { return true; }
101 static constexpr bool enableMolecularDiffusion() { return true; }
102 static constexpr bool enableEnergyBalance() { return false; }
103
104 static constexpr bool onlyGasPhaseCanDisappear() { return onlyGasPhase; }
105};
106
107namespace Properties {
108
109// Create new type tags
110namespace TTag {
111struct ThreePWaterOilNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
112} // end namespace TTag
113
115// Property values
117
119template<class TypeTag>
120struct ModelTraits<TypeTag, TTag::ThreePWaterOilNI>
121{
122private:
124 static_assert(FluidSystem::numComponents == 2, "Only fluid systems with 2 components are supported by the 3p2cni model!");
125 static_assert(FluidSystem::numPhases == 3, "Only fluid systems with 3 phases are supported by the 3p2cni model!");
126public:
128};
129
136template<class TypeTag>
137struct FluidState<TypeTag, TTag::ThreePWaterOilNI>{
138 private:
141 public:
143};
144
146template<class TypeTag>
147struct LocalResidual<TypeTag, TTag::ThreePWaterOilNI> { using type = ThreePWaterOilLocalResidual<TypeTag>; };
148
150template<class TypeTag>
151struct ReplaceCompEqIdx<TypeTag, TTag::ThreePWaterOilNI> { static constexpr int value = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents(); };
152
154template<class TypeTag>
155struct PrimaryVariables<TypeTag, TTag::ThreePWaterOilNI>
156{
157private:
158 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
160public:
162};
163
165template<class TypeTag>
166struct OnlyGasPhaseCanDisappear<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
167
169template<class TypeTag>
170struct VolumeVariables<TypeTag, TTag::ThreePWaterOilNI>
171{
172private:
181
185 template<class BaseTraits, class DT, class EDM, class ETCM>
186 struct NCNITraits : public BaseTraits
187 {
188 using DiffusionType = DT;
189 using EffectiveDiffusivityModel = EDM;
190 using EffectiveThermalConductivityModel = ETCM;
191 };
192
193public:
195};
196
198template<class TypeTag>
199struct EffectiveDiffusivityModel<TypeTag, TTag::ThreePWaterOilNI>
201
202// Define that mole fractions are used in the balance equations per default
203template<class TypeTag>
204struct UseMoles<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
205
207template<class TypeTag>
208struct ThermalConductivityModel<TypeTag, TTag::ThreePWaterOilNI> { using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; };
209
211template<class TypeTag>
212struct IOFields<TypeTag, TTag::ThreePWaterOilNI> { using type = EnergyIOFields<ThreePWaterOilIOFields>; };
213
214} // end namespace Properties
215} // end namespace Dumux
216
217#endif
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:35
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:40
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
The indices for the isothermal 3p2cni model.
Definition: porousmediumflow/3pwateroil/indices.hh:23
Element-wise calculation of the local residual for problems using the ThreePWaterOil fully implicit m...
Definition: porousmediumflow/3pwateroil/localresidual.hh:29
Contains the quantities which are are constant within a finite volume in the three-phase,...
Definition: porousmediumflow/3pwateroil/volumevariables.hh:57
Defines all properties used in Dumux.
Relation for the saturation-dependent effective diffusion coefficient.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Definition: adapt.hh:17
Adaption of the fully implicit scheme to the three-phase flow model.
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.
Adaption of the fully implicit scheme to the tracer transport model.
Python wrapper for volume variables (finite volume schemes)
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition: porousmediumflow/nonisothermal/model.hh:71
Definition: porousmediumflow/3pwateroil/model.hh:111
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/3pwateroil/model.hh:111
Traits class for the two-phase model.
Definition: porousmediumflow/3p/model.hh:96
Specifies a number properties of the three-phase two-component model.
Definition: porousmediumflow/3pwateroil/model.hh:93
static constexpr int numFluidComponents()
Definition: porousmediumflow/3pwateroil/model.hh:98
static constexpr int numFluidPhases()
Definition: porousmediumflow/3pwateroil/model.hh:97
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/3pwateroil/model.hh:101
static constexpr bool onlyGasPhaseCanDisappear()
Definition: porousmediumflow/3pwateroil/model.hh:104
static constexpr int numEq()
Definition: porousmediumflow/3pwateroil/model.hh:96
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/3pwateroil/model.hh:102
static constexpr bool enableAdvection()
Definition: porousmediumflow/3pwateroil/model.hh:100
A primary variable vector with a state to allow variable switches.
Relation for the saturation-dependent effective thermal conductivity.