3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * 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 *****************************************************************************/
90#ifndef DUMUX_RICHARDS_MODEL_HH
91#define DUMUX_RICHARDS_MODEL_HH
92
93#include <dune/common/fvector.hh>
94
96
105
110
111#include "indices.hh"
112#include "volumevariables.hh"
113#include "iofields.hh"
114#include "localresidual.hh"
115
116namespace Dumux {
117
124template<bool enableDiff>
126{
128
129 static constexpr int numEq() { return 1; }
130 static constexpr int numFluidPhases() { return 2; }
131 static constexpr int numFluidComponents() { return 1; }
132
133 static constexpr bool enableAdvection() { return true; }
134 static constexpr bool enableMolecularDiffusion() { return enableDiff; }
135 static constexpr bool enableEnergyBalance() { return false; }
136};
137
148template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT>
150{
152 using FluidSystem = FSY;
153 using FluidState = FST;
154 using SolidSystem = SSY;
155 using SolidState = SST;
157 using ModelTraits = MT;
158};
159
160// \{
162// properties for the isothermal Richards model.
164namespace Properties {
165
167// Type tags
169
171// Create new type tags
172namespace TTag {
173struct Richards { using InheritsFrom = std::tuple<PorousMediumFlow>; };
174struct RichardsNI { using InheritsFrom = std::tuple<Richards>; };
175} // end namespace TTag
176
178// Properties values
180
182template<class TypeTag>
183struct LocalResidual<TypeTag, TTag::Richards> { using type = RichardsLocalResidual<TypeTag>; };
184
186template<class TypeTag>
187struct IOFields<TypeTag, TTag::Richards>
188{
189private:
190 static constexpr bool enableWaterDiffusionInAir
191 = getPropValue<TypeTag, Properties::EnableWaterDiffusionInAir>();
192
193public:
195};
196
198template<class TypeTag>
200
202template<class TypeTag>
203struct VolumeVariables<TypeTag, TTag::Richards>
204{
205private:
213
215public:
217};
218
221template<class TypeTag>
222struct EnableWaterDiffusionInAir<TypeTag, TTag::Richards> { static constexpr bool value = false; };
223
225template<class TypeTag>
226struct EffectiveDiffusivityModel<TypeTag, TTag::Richards>
228
230template<class TypeTag>
231struct PrimaryVariables<TypeTag, TTag::Richards>
232{
233private:
234 using PrimaryVariablesVector = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>,
236public:
238};
239
245template<class TypeTag>
246struct FluidSystem<TypeTag, TTag::Richards>
247{
251 FluidSystems::H2OAirDefaultPolicy</*fastButSimplifiedRelations=*/true>>;
252};
253
260template<class TypeTag>
261struct FluidState<TypeTag, TTag::Richards>
262{
263private:
266public:
268};
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>
297{
298 static constexpr bool enableWaterDiffusionInAir
299 = getPropValue<TypeTag, Properties::EnableWaterDiffusionInAir>();
302};
303
304// \}
305} // end namespace Properties
306} // end namespace Dumux
307
308#endif
A much simpler (and thus potentially less buggy) version 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...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
A primary variable vector with a state to allow variable switches.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
A vector of primary variables.
Definition: common/properties.hh:59
Traits class encapsulating model specifications.
Definition: common/properties.hh:65
A class helping models to define input and output fields.
Definition: common/properties.hh:78
Definition: common/properties.hh:91
The secondary variables within a sub-control volume.
Definition: common/properties.hh:174
The type of the fluid system to use.
Definition: common/properties.hh:223
The type of the fluid state to use.
Definition: common/properties.hh:225
The employed model for the computation of the effective diffusivity.
Definition: common/properties.hh:231
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:233
Property for turning Richards into extended Richards.
Definition: common/properties.hh:258
A much simpler (and thus potentially less buggy) version of pure water.
Definition: simpleh2o.hh:51
Relation for the saturation-dependent effective thermal conductivity.
Definition: thermalconductivitysomerton.hh:60
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:51
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:42
Policy for the H2O-air fluid system.
Definition: h2oair.hh:52
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
Definition: h2oair.hh:75
A primary variable vector with a state to allow variable switches.
Definition: switchableprimaryvariables.hh:38
Adds I/O fields specific to non-isothermal models.
Definition: dumux/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
Index names for the Richards model.
Definition: porousmediumflow/richards/indices.hh:36
Adds I/O fields specific to the Richards model.
Definition: dumux/porousmediumflow/richards/iofields.hh:39
Element-wise calculation of the Jacobian matrix for problems using the Richards fully implicit models...
Definition: porousmediumflow/richards/localresidual.hh:44
Specifies a number properties of the Richards model.
Definition: porousmediumflow/richards/model.hh:126
static constexpr bool enableAdvection()
Definition: porousmediumflow/richards/model.hh:133
static constexpr int numEq()
Definition: porousmediumflow/richards/model.hh:129
static constexpr int numFluidPhases()
Definition: porousmediumflow/richards/model.hh:130
static constexpr int numFluidComponents()
Definition: porousmediumflow/richards/model.hh:131
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richards/model.hh:135
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richards/model.hh:134
Traits class for the Richards model.
Definition: porousmediumflow/richards/model.hh:150
PV PrimaryVariables
Definition: porousmediumflow/richards/model.hh:151
FSY FluidSystem
Definition: porousmediumflow/richards/model.hh:152
PT PermeabilityType
Definition: porousmediumflow/richards/model.hh:156
SST SolidState
Definition: porousmediumflow/richards/model.hh:155
MT ModelTraits
Definition: porousmediumflow/richards/model.hh:157
SSY SolidSystem
Definition: porousmediumflow/richards/model.hh:154
FST FluidState
Definition: porousmediumflow/richards/model.hh:153
Definition: porousmediumflow/richards/model.hh:173
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richards/model.hh:173
Definition: porousmediumflow/richards/model.hh:174
std::tuple< Richards > InheritsFrom
Definition: porousmediumflow/richards/model.hh:174
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richards/model.hh:248
Volume averaged quantities required by the Richards model.
Definition: porousmediumflow/richards/volumevariables.hh:66
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
The implicit non-isothermal model.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the twop 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.
Base class for the model specific class which provides access to all volume averaged quantities.
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.