version 3.7
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
55#ifndef DUMUX_RICHARDSNC_MODEL_HH
56#define DUMUX_RICHARDSNC_MODEL_HH
57
59
66
73
74#include "volumevariables.hh"
75#include "indices.hh"
76#include "iofields.hh"
77
78namespace Dumux {
79
87template<int nComp, bool useMol, int repCompEqIdx = nComp>
89{
91
92 static constexpr int numEq() { return nComp; }
93 static constexpr int numFluidPhases() { return 1; }
94 static constexpr int numFluidComponents() { return nComp; }
95 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
96
97 static constexpr bool enableAdvection() { return true; }
98 static constexpr bool enableMolecularDiffusion() { return true; }
99 static constexpr bool enableEnergyBalance() { return false; }
100 static constexpr bool enableCompositionalDispersion() { return false; }
101 static constexpr bool enableThermalDispersion() { return false; }
102
103 static constexpr bool useMoles() { return useMol; }
104};
105
118template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class DT, class EDM>
120{
122 using FluidSystem = FSY;
123 using FluidState = FST;
124 using SolidSystem = SSY;
127 using ModelTraits = MT;
128 using DiffusionType = DT;
130};
131
132namespace Properties {
133
135// Type tags
137
139// Create new type tags
140namespace TTag {
141struct RichardsNC { using InheritsFrom = std::tuple<PorousMediumFlow>; };
142struct RichardsNCNI { using InheritsFrom = std::tuple<RichardsNC>; };
143} // end namespace TTag
145// Property tags
148// Property values
150
152template<class TypeTag>
153struct BaseModelTraits<TypeTag, TTag::RichardsNC>
154{
155private:
157public:
158 using type = RichardsNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
159};
160template<class TypeTag>
161struct ModelTraits<TypeTag, TTag::RichardsNC> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
162
164template<class TypeTag>
165struct UseMoles<TypeTag, TTag::RichardsNC> { static constexpr bool value = true; };
166
168template<class TypeTag>
169struct LocalResidual<TypeTag, TTag::RichardsNC> { using type = CompositionalLocalResidual<TypeTag>; };
170
173template<class TypeTag>
174struct ReplaceCompEqIdx<TypeTag, TTag::RichardsNC> { static constexpr int value = 0; };
175
177template<class TypeTag>
178struct VolumeVariables<TypeTag, TTag::RichardsNC>
179{
180private:
188 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
189 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
190 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
191 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
195
196public:
198};
199
205template<class TypeTag>
206struct FluidSystem<TypeTag, TTag::RichardsNC>
207{
210};
211
218template<class TypeTag>
219struct FluidState<TypeTag, TTag::RichardsNC>
220{
224};
225
227template<class TypeTag>
228struct IOFields<TypeTag, TTag::RichardsNC> { using type = RichardsNCIOFields; };
229
231template<class TypeTag>
232struct EffectiveDiffusivityModel<TypeTag, TTag::RichardsNC> { using type = DiffusivityMillingtonQuirk<GetPropType<TypeTag, Properties::Scalar>>; };
233
235template<class TypeTag>
236struct ThermalConductivityModel<TypeTag, TTag::RichardsNCNI> { using type = ThermalConductivityAverage<GetPropType<TypeTag, Properties::Scalar>>; };
237
239// Property values for non-isothermal Richards n-components model
241
243template<class TypeTag>
244struct ModelTraits<TypeTag, TTag::RichardsNCNI>
245{
246private:
248public:
250};
251
253template<class TypeTag>
254struct VolumeVariables<TypeTag, TTag::RichardsNCNI>
255{
256private:
267
269 template<class BaseTraits, class ETCM>
270 struct NCNITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
271public:
273};
274
275
276} // end namespace Properties
277} // end namespace Dumux
278
279#endif
A component which returns run time specified values for all fluid properties.
Definition: constant.hh:49
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:35
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:33
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:40
A liquid phase consisting of a two components, a main component and a conservative tracer component.
Definition: liquidphase2c.hh:34
Adds I/O fields specific to the Richards model.
Definition: porousmediumflow/richardsnc/iofields.hh:26
Contains the quantities which are constant within a finite volume in the Richards,...
Definition: porousmediumflow/richardsnc/volumevariables.hh:35
Relation for a simple effective thermal conductivity.
Definition: thermalconductivityaverage.hh:25
Defines all properties used in Dumux.
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Setting constant fluid properties via the input file.
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
Definition: adapt.hh:17
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.
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.
This model implements a variant of the Richards' equation for quasi-twophase flow.
Defines the primary variable and equation indices used by the isothermal tracer model.
Adds I/O fields specific to the tracer model.
Python wrapper for volume variables (finite volume schemes)
A simple implementation of pure water.
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/richardsnc/model.hh:221
GetPropType< TypeTag, Properties::FluidSystem > FluidSystem
Definition: porousmediumflow/richardsnc/model.hh:222
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richardsnc/model.hh:208
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/richardsnc/model.hh:161
Definition: porousmediumflow/richardsnc/model.hh:141
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:141
Definition: porousmediumflow/richardsnc/model.hh:142
std::tuple< RichardsNC > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:142
The indices for the isothermal Richards, n-component model.
Definition: porousmediumflow/richardsnc/indices.hh:24
Specifies a number properties of the Richards n-components model.
Definition: porousmediumflow/richardsnc/model.hh:89
static constexpr bool enableThermalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:101
static constexpr int numEq()
Definition: porousmediumflow/richardsnc/model.hh:92
static constexpr int numFluidPhases()
Definition: porousmediumflow/richardsnc/model.hh:93
static constexpr bool enableCompositionalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:100
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richardsnc/model.hh:98
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richardsnc/model.hh:99
static constexpr bool useMoles()
Definition: porousmediumflow/richardsnc/model.hh:103
static constexpr bool enableAdvection()
Definition: porousmediumflow/richardsnc/model.hh:97
static constexpr int numFluidComponents()
Definition: porousmediumflow/richardsnc/model.hh:94
static constexpr int replaceCompEqIdx()
Definition: porousmediumflow/richardsnc/model.hh:95
Traits class for the Richards n-components model.
Definition: porousmediumflow/richardsnc/model.hh:120
MT ModelTraits
Definition: porousmediumflow/richardsnc/model.hh:127
PT PermeabilityType
Definition: porousmediumflow/richardsnc/model.hh:126
PV PrimaryVariables
Definition: porousmediumflow/richardsnc/model.hh:121
FST FluidState
Definition: porousmediumflow/richardsnc/model.hh:123
SSY SolidSystem
Definition: porousmediumflow/richardsnc/model.hh:124
SST SolidState
Definition: porousmediumflow/richardsnc/model.hh:125
EDM EffectiveDiffusivityModel
Definition: porousmediumflow/richardsnc/model.hh:129
FSY FluidSystem
Definition: porousmediumflow/richardsnc/model.hh:122
DT DiffusionType
Definition: porousmediumflow/richardsnc/model.hh:128
Reation for a simple effective thermal conductivity.