3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/richardsnc/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 *****************************************************************************/
67#ifndef DUMUX_RICHARDSNC_MODEL_HH
68#define DUMUX_RICHARDSNC_MODEL_HH
69
71
78
85
86#include "volumevariables.hh"
87#include "indices.hh"
88#include "iofields.hh"
89
90namespace Dumux {
91
99template<int nComp, bool useMol, int repCompEqIdx = nComp>
101{
103
104 static constexpr int numEq() { return nComp; }
105 static constexpr int numFluidPhases() { return 1; }
106 static constexpr int numFluidComponents() { return nComp; }
107 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
108
109 static constexpr bool enableAdvection() { return true; }
110 static constexpr bool enableMolecularDiffusion() { return true; }
111 static constexpr bool enableEnergyBalance() { return false; }
112 static constexpr bool enableCompositionalDispersion() { return false; }
113 static constexpr bool enableThermalDispersion() { return false; }
114
115 static constexpr bool useMoles() { return useMol; }
116};
117
118namespace Properties {
119
121// Type tags
123
125// Create new type tags
126namespace TTag {
127struct RichardsNC { using InheritsFrom = std::tuple<PorousMediumFlow>; };
128struct RichardsNCNI { using InheritsFrom = std::tuple<RichardsNC>; };
129} // end namespace TTag
131// Property tags
134// Property values
136
138template<class TypeTag>
139struct BaseModelTraits<TypeTag, TTag::RichardsNC>
140{
141private:
143public:
144 using type = RichardsNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
145};
146template<class TypeTag>
147struct ModelTraits<TypeTag, TTag::RichardsNC> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
148
150template<class TypeTag>
151struct UseMoles<TypeTag, TTag::RichardsNC> { static constexpr bool value = true; };
152
154template<class TypeTag>
155struct LocalResidual<TypeTag, TTag::RichardsNC> { using type = CompositionalLocalResidual<TypeTag>; };
156
159template<class TypeTag>
160struct ReplaceCompEqIdx<TypeTag, TTag::RichardsNC> { static constexpr int value = 0; };
161
163template<class TypeTag>
164struct VolumeVariables<TypeTag, TTag::RichardsNC>
165{
166private:
174 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
175 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
176 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
177 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
181
182public:
184};
185
188template<class TypeTag>
189struct EnableWaterDiffusionInAir<TypeTag, TTag::RichardsNC> { static constexpr bool value = false; };
190
196template<class TypeTag>
197struct FluidSystem<TypeTag, TTag::RichardsNC>
198{
201};
202
209template<class TypeTag>
210struct FluidState<TypeTag, TTag::RichardsNC>
211{
215};
216
218template<class TypeTag>
219struct IOFields<TypeTag, TTag::RichardsNC> { using type = RichardsNCIOFields; };
220
222template<class TypeTag>
224
226template<class TypeTag>
228
230// Property values for non-isothermal Richards n-components model
232
234template<class TypeTag>
235struct ModelTraits<TypeTag, TTag::RichardsNCNI>
236{
237private:
239public:
241};
242
244template<class TypeTag>
245struct VolumeVariables<TypeTag, TTag::RichardsNCNI>
246{
247private:
258
260 template<class BaseTraits, class ETCM>
261 struct NCNITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
262public:
264};
265
266
267} // end namespace Properties
268} // end namespace Dumux
269
270#endif
Setting constant fluid properties via the input file.
A much simpler (and thus potentially less buggy) version of pure water.
Reation for a simple effective thermal conductivity.
Relation for the saturation-dependent effective diffusion coefficient.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
A liquid phase consisting of a two components, a main component and a conservative tracer component.
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
Model traits to be used as a base for nonisothermal, mineralization ... models.
Definition: common/properties.hh:55
A class helping models to define input and output fields.
Definition: common/properties.hh:63
Definition: common/properties.hh:74
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:85
The component balance index that should be replaced by the total mass/mole balance.
Definition: common/properties.hh:87
The secondary variables within a sub-control volume.
Definition: common/properties.hh:107
The type of the fluid system to use.
Definition: common/properties.hh:162
The type of the fluid state to use.
Definition: common/properties.hh:164
The employed model for the computation of the effective diffusivity.
Definition: common/properties.hh:170
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:172
Property for turning Richards into extended Richards.
Definition: common/properties.hh:197
A component which returns run time specified values for all fluid properties.
Definition: constant.hh:61
Relation for a simple effective thermal conductivity.
Definition: thermalconductivityaverage.hh:37
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:52
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:47
A liquid phase consisting of a two components, a main component and a conservative tracer component.
Definition: liquidphase2c.hh:46
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:46
Specifies a number properties of non-isothermal porous medium flow models based on the specifics of a...
Definition: porousmediumflow/nonisothermal/model.hh:70
Traits class for the Richards model.
Definition: porousmediumflow/richards/model.hh:172
The indices for the isothermal Richards, n-component model.
Definition: porousmediumflow/richardsnc/indices.hh:36
Adds I/O fields specific to the Richards model.
Definition: porousmediumflow/richardsnc/iofields.hh:38
Specifies a number properties of the Richards n-components model.
Definition: porousmediumflow/richardsnc/model.hh:101
static constexpr bool enableThermalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:113
static constexpr int numEq()
Definition: porousmediumflow/richardsnc/model.hh:104
static constexpr int numFluidPhases()
Definition: porousmediumflow/richardsnc/model.hh:105
static constexpr bool enableCompositionalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:112
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richardsnc/model.hh:110
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richardsnc/model.hh:111
static constexpr bool useMoles()
Definition: porousmediumflow/richardsnc/model.hh:115
static constexpr bool enableAdvection()
Definition: porousmediumflow/richardsnc/model.hh:109
static constexpr int numFluidComponents()
Definition: porousmediumflow/richardsnc/model.hh:106
static constexpr int replaceCompEqIdx()
Definition: porousmediumflow/richardsnc/model.hh:107
Definition: porousmediumflow/richardsnc/model.hh:127
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:127
Definition: porousmediumflow/richardsnc/model.hh:128
std::tuple< RichardsNC > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:128
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/richardsnc/model.hh:147
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richardsnc/model.hh:199
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richardsnc/model.hh:212
GetPropType< TypeTag, Properties::FluidSystem > FluidSystem
Definition: porousmediumflow/richardsnc/model.hh:213
Contains the quantities which are constant within a finite volume in the Richards,...
Definition: porousmediumflow/richardsnc/volumevariables.hh:47
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.
Adds I/O fields specific to non-isothermal models.
Adds I/O fields specific to the tracer model.
Element-wise calculation of the local residual for problems using compositional fully implicit model.
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.