version 3.7
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//
78#ifndef DUMUX_RICHARDS_MODEL_HH
79#define DUMUX_RICHARDS_MODEL_HH
80
81#include <type_traits>
82
83#include <dune/common/fvector.hh>
84
86
94
99
100#include "indices.hh"
101#include "volumevariables.hh"
102#include "iofields.hh"
103#include "localresidual.hh"
104#include "velocityoutput.hh"
105#include "balanceequationopts.hh"
106
107namespace Dumux {
108
116{
118
119 static constexpr int numEq() { return 1; }
120 static constexpr int numFluidPhases() { return 2; }
121 static constexpr int numFluidComponents() { return 1; }
122
123 static constexpr bool enableAdvection() { return true; }
124 static constexpr bool enableMolecularDiffusion() { return false; }
125 static constexpr bool enableEnergyBalance() { return false; }
126
129 template<class FluidSystem>
130 static constexpr bool fluidSystemIsCompatible()
131 {
132 return !FluidSystem::isGas(FluidSystem::phase0Idx)
133 && FluidSystem::isGas(FluidSystem::phase1Idx);
134 }
135
138 template<class FluidSystem>
139 static constexpr auto checkFluidSystem(const FluidSystem& fs)
140 {
141 struct FluidSystemCheck {
142 static_assert(fluidSystemIsCompatible<FluidSystem>(),
143 "Richards model currently assumes the first phase to be liquid and the second phase to be gaseous.");
144 };
145 return FluidSystemCheck{};
146 }
147};
148
159template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
161{
163 using FluidSystem = FSY;
164 using FluidState = FST;
165 using SolidSystem = SSY;
168 using ModelTraits = MT;
169};
170
171// \{
173// properties for the isothermal Richards model.
175namespace Properties {
176
178// Type tags
180
182// Create new type tags
183namespace TTag {
184struct Richards { using InheritsFrom = std::tuple<PorousMediumFlow>; };
185struct RichardsNI { using InheritsFrom = std::tuple<Richards>; };
186} // end namespace TTag
187
189// Properties values
191
193template<class TypeTag>
194struct LocalResidual<TypeTag, TTag::Richards> { using type = RichardsLocalResidual<TypeTag>; };
195
197template<class TypeTag>
198struct IOFields<TypeTag, TTag::Richards> { using type = RichardsIOFields; };
199
200template<class TypeTag>
201struct VelocityOutput<TypeTag, TTag::Richards>
202{
206 >;
207};
208
210template<class TypeTag>
211struct ModelTraits<TypeTag, TTag::Richards> { using type = RichardsModelTraits; };
212
214template<class TypeTag>
215struct VolumeVariables<TypeTag, TTag::Richards>
216{
217private:
226public:
228};
229
231template<class TypeTag>
232struct EffectiveDiffusivityModel<TypeTag, TTag::Richards>
234
240template<class TypeTag>
241struct FluidSystem<TypeTag, TTag::Richards>
242{
246 FluidSystems::H2OAirDefaultPolicy</*fastButSimplifiedRelations=*/true>>;
247};
248
255template<class TypeTag>
256struct FluidState<TypeTag, TTag::Richards>
257{
258private:
261public:
263};
264
266template<class TypeTag>
267struct BalanceEqOpts<TypeTag, TTag::Richards>
269
271template<class TypeTag>
272struct ThermalConductivityModel<TypeTag, TTag::RichardsNI>
273{
274private:
276public:
278};
279
281// Property values for non-isothermal Richars model
283
285template<class TypeTag>
286struct ModelTraits<TypeTag, TTag::RichardsNI>
287{
288private:
290public:
292};
293
295template<class TypeTag>
296struct IOFields<TypeTag, TTag::RichardsNI> { using type = EnergyIOFields<RichardsIOFields>; };
297
299template<class TypeTag>
300struct VolumeVariables<TypeTag, TTag::RichardsNI>
301{
302private:
311
313 template<class BaseTraits, class ETCM>
314 struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
315
316public:
318};
319
320// \}
321} // end namespace Properties
322} // end namespace Dumux
323
324#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:267
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:58
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richards/model.hh:243
Definition: porousmediumflow/richards/model.hh:184
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richards/model.hh:184
Definition: porousmediumflow/richards/model.hh:185
std::tuple< Richards > InheritsFrom
Definition: porousmediumflow/richards/model.hh:185
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:116
static constexpr int numFluidComponents()
Definition: porousmediumflow/richards/model.hh:121
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richards/model.hh:124
static constexpr auto checkFluidSystem(const FluidSystem &fs)
Definition: porousmediumflow/richards/model.hh:139
static constexpr int numFluidPhases()
Definition: porousmediumflow/richards/model.hh:120
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richards/model.hh:125
static constexpr int numEq()
Definition: porousmediumflow/richards/model.hh:119
static constexpr bool fluidSystemIsCompatible()
Definition: porousmediumflow/richards/model.hh:130
static constexpr bool enableAdvection()
Definition: porousmediumflow/richards/model.hh:123
Traits class for the Richards model.
Definition: porousmediumflow/richards/model.hh:161
PV PrimaryVariables
Definition: porousmediumflow/richards/model.hh:162
FSY FluidSystem
Definition: porousmediumflow/richards/model.hh:163
PT PermeabilityType
Definition: porousmediumflow/richards/model.hh:167
SST SolidState
Definition: porousmediumflow/richards/model.hh:166
MT ModelTraits
Definition: porousmediumflow/richards/model.hh:168
SSY SolidSystem
Definition: porousmediumflow/richards/model.hh:165
FST FluidState
Definition: porousmediumflow/richards/model.hh:164
A primary variable vector with a state to allow variable switches.