version 3.7
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//
52#ifndef DUMUX_3P2CNI_MODEL_HH
53#define DUMUX_3P2CNI_MODEL_HH
54
55#include <dune/common/fvector.hh>
56
60
67
68#include "indices.hh"
69#include "model.hh"
70#include "volumevariables.hh"
71#include "localresidual.hh"
72#include "iofields.hh"
73
74namespace Dumux {
75
80template<bool onlyGasPhase>
82{
84
85 static constexpr int numEq() { return 2; }
86 static constexpr int numFluidPhases() { return 3; }
87 static constexpr int numFluidComponents() { return 2; }
88
89 static constexpr bool enableAdvection() { return true; }
90 static constexpr bool enableMolecularDiffusion() { return true; }
91 static constexpr bool enableEnergyBalance() { return false; }
92
93 static constexpr bool onlyGasPhaseCanDisappear() { return onlyGasPhase; }
94};
95
96namespace Properties {
97
98// Create new type tags
99namespace TTag {
100struct ThreePWaterOilNI { using InheritsFrom = std::tuple<PorousMediumFlow>; };
101} // end namespace TTag
102
104// Property values
106
108template<class TypeTag>
109struct ModelTraits<TypeTag, TTag::ThreePWaterOilNI>
110{
111private:
113 static_assert(FluidSystem::numComponents == 2, "Only fluid systems with 2 components are supported by the 3p2cni model!");
114 static_assert(FluidSystem::numPhases == 3, "Only fluid systems with 3 phases are supported by the 3p2cni model!");
115public:
117};
118
125template<class TypeTag>
126struct FluidState<TypeTag, TTag::ThreePWaterOilNI>{
127 private:
130 public:
132};
133
135template<class TypeTag>
136struct LocalResidual<TypeTag, TTag::ThreePWaterOilNI> { using type = ThreePWaterOilLocalResidual<TypeTag>; };
137
139template<class TypeTag>
140struct ReplaceCompEqIdx<TypeTag, TTag::ThreePWaterOilNI> { static constexpr int value = GetPropType<TypeTag, Properties::ModelTraits>::numFluidComponents(); };
141
143template<class TypeTag>
144struct PrimaryVariables<TypeTag, TTag::ThreePWaterOilNI>
145{
146private:
147 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
149public:
151};
152
154template<class TypeTag>
155struct OnlyGasPhaseCanDisappear<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
156
158template<class TypeTag>
159struct VolumeVariables<TypeTag, TTag::ThreePWaterOilNI>
160{
161private:
170
174 template<class BaseTraits, class DT, class EDM, class ETCM>
175 struct NCNITraits : public BaseTraits
176 {
177 using DiffusionType = DT;
178 using EffectiveDiffusivityModel = EDM;
179 using EffectiveThermalConductivityModel = ETCM;
180 };
181
182public:
184};
185
187template<class TypeTag>
188struct EffectiveDiffusivityModel<TypeTag, TTag::ThreePWaterOilNI>
190
191// Define that mole fractions are used in the balance equations per default
192template<class TypeTag>
193struct UseMoles<TypeTag, TTag::ThreePWaterOilNI> { static constexpr bool value = true; };
194
196template<class TypeTag>
197struct ThermalConductivityModel<TypeTag, TTag::ThreePWaterOilNI> { using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; };
198
200template<class TypeTag>
201struct IOFields<TypeTag, TTag::ThreePWaterOilNI> { using type = EnergyIOFields<ThreePWaterOilIOFields>; };
202
203} // end namespace Properties
204} // end namespace Dumux
205
206#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:267
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:58
Definition: porousmediumflow/3pwateroil/model.hh:100
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/3pwateroil/model.hh:100
Traits class for the two-phase model.
Definition: porousmediumflow/3p/model.hh:86
Specifies a number properties of the three-phase two-component model.
Definition: porousmediumflow/3pwateroil/model.hh:82
static constexpr int numFluidComponents()
Definition: porousmediumflow/3pwateroil/model.hh:87
static constexpr int numFluidPhases()
Definition: porousmediumflow/3pwateroil/model.hh:86
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/3pwateroil/model.hh:90
static constexpr bool onlyGasPhaseCanDisappear()
Definition: porousmediumflow/3pwateroil/model.hh:93
static constexpr int numEq()
Definition: porousmediumflow/3pwateroil/model.hh:85
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/3pwateroil/model.hh:91
static constexpr bool enableAdvection()
Definition: porousmediumflow/3pwateroil/model.hh:89
A primary variable vector with a state to allow variable switches.
Relation for the saturation-dependent effective thermal conductivity.