3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/richardsextended/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 *****************************************************************************/
94#ifndef DUMUX_RICHARDSEXTENDED_MODEL_HH
95#define DUMUX_RICHARDSEXTENDED_MODEL_HH
96
97#include <dune/common/fvector.hh>
98
100
108
116
117#include "indices.hh"
118#include "volumevariables.hh"
119#include "iofields.hh"
120#include "localresidual.hh"
121
122namespace Dumux {
123
129{
131
132 static constexpr int numEq() { return 1; }
133 static constexpr int numFluidPhases() { return 2; }
134 static constexpr int numFluidComponents() { return 1; }
135
136 static constexpr bool enableAdvection() { return true; }
137 static constexpr bool enableMolecularDiffusion() { return true; }
138 static constexpr bool enableEnergyBalance() { return false; }
139
142 template<class FluidSystem>
143 static constexpr bool fluidSystemIsCompatible()
144 {
145 return !FluidSystem::isGas(FluidSystem::phase0Idx)
146 && FluidSystem::isGas(FluidSystem::phase1Idx);
147 }
148
151 template<class FluidSystem>
152 static constexpr auto checkFluidSystem(const FluidSystem& fs)
153 {
154 struct FluidSystemCheck {
155 static_assert(fluidSystemIsCompatible<FluidSystem>(),
156 "Richards model currently assumes the first phase to be liquid and the second phase to be gaseous.");
157 };
158 return FluidSystemCheck{};
159 }
160};
161
172template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class DT, class EDM>
174{
176 using FluidSystem = FSY;
177 using FluidState = FST;
178 using SolidSystem = SSY;
181 using ModelTraits = MT;
182 using DiffusionType = DT;
184};
185
186// \{
188// properties for the isothermal Richards model.
190namespace Properties {
191
193// Type tags
195
197// Create new type tags
198namespace TTag {
199struct ExtendedRichards { using InheritsFrom = std::tuple<Richards>; };
200struct ExtendedRichardsNI { using InheritsFrom = std::tuple<ExtendedRichards>; };
201} // end namespace TTag
202
204// Properties values
206
208template<class TypeTag>
209struct LocalResidual<TypeTag, TTag::ExtendedRichards> { using type = ExtendedRichardsLocalResidual<TypeTag>; };
210
212template<class TypeTag>
213struct IOFields<TypeTag, TTag::ExtendedRichards>
214{
216};
217
219template<class TypeTag>
220struct ModelTraits<TypeTag, TTag::ExtendedRichards> { using type = ExtendedRichardsModelTraits; };
221
223template<class TypeTag>
224struct VolumeVariables<TypeTag, TTag::ExtendedRichards>
225{
226private:
237public:
239};
240
242template<class TypeTag>
243struct EffectiveDiffusivityModel<TypeTag, TTag::ExtendedRichards>
245
247template<class TypeTag>
248struct PrimaryVariables<TypeTag, TTag::ExtendedRichards>
249{
250private:
251 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
253public:
255};
256
258// Property values for non-isothermal Richars model
260
262template<class TypeTag>
263struct ModelTraits<TypeTag, TTag::ExtendedRichardsNI>
264{
265private:
267public:
269};
270
272template<class TypeTag>
273struct IOFields<TypeTag, TTag::ExtendedRichardsNI>
274{
276};
277
279template<class TypeTag>
280struct VolumeVariables<TypeTag, TTag::ExtendedRichardsNI>
281{
282private:
293
295 template<class BaseTraits, class ETCM>
296 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
297
298public:
300};
301
303template<class TypeTag>
304struct ThermalConductivityModel<TypeTag, TTag::ExtendedRichardsNI>
305{
306private:
308public:
310};
311
312// \}
313} // end namespace Properties
314} // end namespace Dumux
315
316#endif
A simple implementation of pure water.
Relation for the saturation-dependent effective thermal conductivity.
Relation for the saturation-dependent effective diffusion coefficient.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
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
The secondary variables within a sub-control volume.
Definition: common/properties.hh:105
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
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:60
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:52
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
Specifies a number properties of the Richards model.
Definition: porousmediumflow/richards/model.hh:130
Index names for the extended Richards model.
Definition: porousmediumflow/richardsextended/indices.hh:36
Adds I/O fields specific to the extended Richards model.
Definition: porousmediumflow/richardsextended/iofields.hh:38
Element-wise calculation of the Jacobian matrix for problems using the extended Richards fully implic...
Definition: porousmediumflow/richardsextended/localresidual.hh:46
Specifies a number properties of the extended Richards model.
Definition: porousmediumflow/richardsextended/model.hh:129
static constexpr int numFluidComponents()
Definition: porousmediumflow/richardsextended/model.hh:134
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richardsextended/model.hh:138
static constexpr int numEq()
Definition: porousmediumflow/richardsextended/model.hh:132
static constexpr int numFluidPhases()
Definition: porousmediumflow/richardsextended/model.hh:133
static constexpr auto checkFluidSystem(const FluidSystem &fs)
Definition: porousmediumflow/richardsextended/model.hh:152
static constexpr bool fluidSystemIsCompatible()
Definition: porousmediumflow/richardsextended/model.hh:143
static constexpr bool enableAdvection()
Definition: porousmediumflow/richardsextended/model.hh:136
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richardsextended/model.hh:137
Traits class for the Richards model.
Definition: porousmediumflow/richardsextended/model.hh:174
FSY FluidSystem
Definition: porousmediumflow/richardsextended/model.hh:176
PT PermeabilityType
Definition: porousmediumflow/richardsextended/model.hh:180
SSY SolidSystem
Definition: porousmediumflow/richardsextended/model.hh:178
PV PrimaryVariables
Definition: porousmediumflow/richardsextended/model.hh:175
FST FluidState
Definition: porousmediumflow/richardsextended/model.hh:177
DT DiffusionType
Definition: porousmediumflow/richardsextended/model.hh:182
EDM EffectiveDiffusivityModel
Definition: porousmediumflow/richardsextended/model.hh:183
MT ModelTraits
Definition: porousmediumflow/richardsextended/model.hh:181
SST SolidState
Definition: porousmediumflow/richardsextended/model.hh:179
Definition: porousmediumflow/richardsextended/model.hh:199
std::tuple< Richards > InheritsFrom
Definition: porousmediumflow/richardsextended/model.hh:199
Definition: porousmediumflow/richardsextended/model.hh:200
std::tuple< ExtendedRichards > InheritsFrom
Definition: porousmediumflow/richardsextended/model.hh:200
Volume averaged quantities required by the extended Richards model.
Definition: porousmediumflow/richardsextended/volumevariables.hh:53
Traits class to set options used by the local residual when when evaluating the balance equations.
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
The implicit non-isothermal model.
This model implements a variant of the Richards' equation for quasi-twophase flow.
Velocity output for the Richards model.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
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.