version 3.8
porousmediumflow/richards/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//
68#ifndef DUMUX_RICHARDS_MODEL_HH
69#define DUMUX_RICHARDS_MODEL_HH
70
71#include <type_traits>
72
73#include <dune/common/fvector.hh>
74
76
84
89
90#include "indices.hh"
91#include "volumevariables.hh"
92#include "iofields.hh"
93#include "localresidual.hh"
94#include "velocityoutput.hh"
96
97namespace Dumux {
98
106{
108
109 static constexpr int numEq() { return 1; }
110 static constexpr int numFluidPhases() { return 2; }
111 static constexpr int numFluidComponents() { return 1; }
112
113 static constexpr bool enableAdvection() { return true; }
114 static constexpr bool enableMolecularDiffusion() { return false; }
115 static constexpr bool enableEnergyBalance() { return false; }
116
119 template<class FluidSystem>
120 static constexpr bool fluidSystemIsCompatible()
121 {
122 return !FluidSystem::isGas(FluidSystem::phase0Idx)
123 && FluidSystem::isGas(FluidSystem::phase1Idx);
124 }
125
128 template<class FluidSystem>
129 static constexpr auto checkFluidSystem(const FluidSystem& fs)
130 {
131 struct FluidSystemCheck {
132 static_assert(fluidSystemIsCompatible<FluidSystem>(),
133 "Richards model currently assumes the first phase to be liquid and the second phase to be gaseous.");
134 };
135 return FluidSystemCheck{};
136 }
137};
138
149template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
151{
153 using FluidSystem = FSY;
154 using FluidState = FST;
155 using SolidSystem = SSY;
158 using ModelTraits = MT;
159};
160
161// \{
163// properties for the isothermal Richards model.
165namespace Properties {
166
168// Type tags
170
172// Create new type tags
173namespace TTag {
174struct Richards { using InheritsFrom = std::tuple<PorousMediumFlow>; };
175struct RichardsNI { using InheritsFrom = std::tuple<Richards>; };
176} // end namespace TTag
177
179// Properties values
181
183template<class TypeTag>
184struct LocalResidual<TypeTag, TTag::Richards> { using type = RichardsLocalResidual<TypeTag>; };
185
187template<class TypeTag>
188struct IOFields<TypeTag, TTag::Richards> { using type = RichardsIOFields; };
189
190template<class TypeTag>
191struct VelocityOutput<TypeTag, TTag::Richards>
192{
196 >;
197};
198
200template<class TypeTag>
201struct ModelTraits<TypeTag, TTag::Richards> { using type = RichardsModelTraits; };
202
204template<class TypeTag>
205struct VolumeVariables<TypeTag, TTag::Richards>
206{
207private:
216public:
218};
219
221template<class TypeTag>
222struct EffectiveDiffusivityModel<TypeTag, TTag::Richards>
224
230template<class TypeTag>
231struct FluidSystem<TypeTag, TTag::Richards>
232{
236 FluidSystems::H2OAirDefaultPolicy</*fastButSimplifiedRelations=*/true>>;
237};
238
245template<class TypeTag>
246struct FluidState<TypeTag, TTag::Richards>
247{
248private:
251public:
253};
254
256template<class TypeTag>
257struct BalanceEqOpts<TypeTag, TTag::Richards>
259
261template<class TypeTag>
262struct ThermalConductivityModel<TypeTag, TTag::RichardsNI>
263{
264private:
266public:
268};
269
271// Property values for non-isothermal Richars model
273
275template<class TypeTag>
276struct ModelTraits<TypeTag, TTag::RichardsNI>
277{
278private:
280public:
282};
283
285template<class TypeTag>
286struct IOFields<TypeTag, TTag::RichardsNI> { using type = EnergyIOFields<RichardsIOFields>; };
287
289template<class TypeTag>
290struct VolumeVariables<TypeTag, TTag::RichardsNI>
291{
292private:
301
303 template<class BaseTraits, class ETCM>
304 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
305
306public:
308};
309
310// \}
311} // end namespace Properties
312} // end namespace Dumux
313
314#endif
A simple implementation of pure water.
Definition: simpleh2o.hh:37
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 compositional two-phase fluid system with water and air as components in both, the liquid and the g...
Definition: h2oair.hh:62
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:30
Adds I/O fields specific to the Richards model.
Definition: porousmediumflow/richards/iofields.hh:27
Element-wise calculation of the Jacobian matrix for problems using the Richards fully implicit models...
Definition: porousmediumflow/richards/localresidual.hh:46
Velocity output policy for the Richards model.
Definition: porousmediumflow/richards/velocityoutput.hh:26
Volume averaged quantities required by the Richards model.
Definition: porousmediumflow/richards/volumevariables.hh:40
Relation for the saturation-dependent effective thermal conductivity.
Definition: somerton.hh:48
Velocity output for implicit (porous media) models.
Definition: io/velocityoutput.hh:29
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
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: adapt.hh:17
Element-wise calculation of the residual for problems using the n-phase immiscible fully implicit mod...
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.
Traits class to set options used by the local residual when when evaluating the balance equations.
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.
Python wrapper for volume variables (finite volume schemes)
TODO: docme!
A simple implementation of pure water.
Relation for the saturation-dependent effective thermal conductivity.
Policy for the H2O-air fluid system.
Definition: h2oair.hh:39
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition: porousmediumflow/nonisothermal/model.hh:71
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richards/model.hh:233
Definition: porousmediumflow/richards/model.hh:174
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richards/model.hh:174
Definition: porousmediumflow/richards/model.hh:175
std::tuple< Richards > InheritsFrom
Definition: porousmediumflow/richards/model.hh:175
Traits class to set options used by the local residual when when evaluating the balance equations.
Definition: porousmediumflow/richards/balanceequationopts.hh:25
Index names for the Richards model.
Definition: porousmediumflow/richards/indices.hh:24
Specifies a number properties of the Richards model.
Definition: porousmediumflow/richards/model.hh:106
static constexpr int numFluidComponents()
Definition: porousmediumflow/richards/model.hh:111
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richards/model.hh:114
static constexpr auto checkFluidSystem(const FluidSystem &fs)
Definition: porousmediumflow/richards/model.hh:129
static constexpr int numFluidPhases()
Definition: porousmediumflow/richards/model.hh:110
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richards/model.hh:115
static constexpr int numEq()
Definition: porousmediumflow/richards/model.hh:109
static constexpr bool fluidSystemIsCompatible()
Definition: porousmediumflow/richards/model.hh:120
static constexpr bool enableAdvection()
Definition: porousmediumflow/richards/model.hh:113
Traits class for the Richards model.
Definition: porousmediumflow/richards/model.hh:151
PV PrimaryVariables
Definition: porousmediumflow/richards/model.hh:152
FSY FluidSystem
Definition: porousmediumflow/richards/model.hh:153
PT PermeabilityType
Definition: porousmediumflow/richards/model.hh:157
SST SolidState
Definition: porousmediumflow/richards/model.hh:156
MT ModelTraits
Definition: porousmediumflow/richards/model.hh:158
SSY SolidSystem
Definition: porousmediumflow/richards/model.hh:155
FST FluidState
Definition: porousmediumflow/richards/model.hh:154
A primary variable vector with a state to allow variable switches.