version 3.8
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//
40#ifndef DUMUX_RICHARDSNC_MODEL_HH
41#define DUMUX_RICHARDSNC_MODEL_HH
42
44
51
58
59#include "volumevariables.hh"
60#include "indices.hh"
61#include "iofields.hh"
62
63namespace Dumux {
64
72template<int nComp, bool useMol, int repCompEqIdx = nComp>
74{
76
77 static constexpr int numEq() { return nComp; }
78 static constexpr int numFluidPhases() { return 1; }
79 static constexpr int numFluidComponents() { return nComp; }
80 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
81
82 static constexpr bool enableAdvection() { return true; }
83 static constexpr bool enableMolecularDiffusion() { return true; }
84 static constexpr bool enableEnergyBalance() { return false; }
85 static constexpr bool enableCompositionalDispersion() { return false; }
86 static constexpr bool enableThermalDispersion() { return false; }
87
88 static constexpr bool useMoles() { return useMol; }
89};
90
103template<class PV, class FSY, class FST, class SSY, class SST, class PT, class MT, class DT, class EDM>
105{
107 using FluidSystem = FSY;
108 using FluidState = FST;
109 using SolidSystem = SSY;
112 using ModelTraits = MT;
113 using DiffusionType = DT;
115};
116
117namespace Properties {
118
120// Type tags
122
124// Create new type tags
125namespace TTag {
126struct RichardsNC { using InheritsFrom = std::tuple<PorousMediumFlow>; };
127struct RichardsNCNI { using InheritsFrom = std::tuple<RichardsNC>; };
128} // end namespace TTag
130// Property tags
133// Property values
135
137template<class TypeTag>
138struct BaseModelTraits<TypeTag, TTag::RichardsNC>
139{
140private:
142public:
143 using type = RichardsNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
144};
145template<class TypeTag>
146struct ModelTraits<TypeTag, TTag::RichardsNC> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
147
149template<class TypeTag>
150struct UseMoles<TypeTag, TTag::RichardsNC> { static constexpr bool value = true; };
151
153template<class TypeTag>
154struct LocalResidual<TypeTag, TTag::RichardsNC> { using type = CompositionalLocalResidual<TypeTag>; };
155
158template<class TypeTag>
159struct ReplaceCompEqIdx<TypeTag, TTag::RichardsNC> { static constexpr int value = 0; };
160
162template<class TypeTag>
163struct VolumeVariables<TypeTag, TTag::RichardsNC>
164{
165private:
173 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
174 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
175 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
176 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
180
181public:
183};
184
190template<class TypeTag>
191struct FluidSystem<TypeTag, TTag::RichardsNC>
192{
195};
196
203template<class TypeTag>
204struct FluidState<TypeTag, TTag::RichardsNC>
205{
209};
210
212template<class TypeTag>
213struct IOFields<TypeTag, TTag::RichardsNC> { using type = RichardsNCIOFields; };
214
216template<class TypeTag>
217struct EffectiveDiffusivityModel<TypeTag, TTag::RichardsNC> { using type = DiffusivityMillingtonQuirk<GetPropType<TypeTag, Properties::Scalar>>; };
218
220template<class TypeTag>
221struct ThermalConductivityModel<TypeTag, TTag::RichardsNCNI> { using type = ThermalConductivityAverage<GetPropType<TypeTag, Properties::Scalar>>; };
222
224// Property values for non-isothermal Richards n-components model
226
228template<class TypeTag>
229struct ModelTraits<TypeTag, TTag::RichardsNCNI>
230{
231private:
233public:
235};
236
238template<class TypeTag>
239struct VolumeVariables<TypeTag, TTag::RichardsNCNI>
240{
241private:
252
254 template<class BaseTraits, class ETCM>
255 struct NCNITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
256public:
258};
259
260
261} // end namespace Properties
262} // end namespace Dumux
263
264#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:296
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:71
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richardsnc/model.hh:206
GetPropType< TypeTag, Properties::FluidSystem > FluidSystem
Definition: porousmediumflow/richardsnc/model.hh:207
GetPropType< TypeTag, Properties::Scalar > Scalar
Definition: porousmediumflow/richardsnc/model.hh:193
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/richardsnc/model.hh:146
Definition: porousmediumflow/richardsnc/model.hh:126
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:126
Definition: porousmediumflow/richardsnc/model.hh:127
std::tuple< RichardsNC > InheritsFrom
Definition: porousmediumflow/richardsnc/model.hh:127
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:74
static constexpr bool enableThermalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:86
static constexpr int numEq()
Definition: porousmediumflow/richardsnc/model.hh:77
static constexpr int numFluidPhases()
Definition: porousmediumflow/richardsnc/model.hh:78
static constexpr bool enableCompositionalDispersion()
Definition: porousmediumflow/richardsnc/model.hh:85
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/richardsnc/model.hh:83
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/richardsnc/model.hh:84
static constexpr bool useMoles()
Definition: porousmediumflow/richardsnc/model.hh:88
static constexpr bool enableAdvection()
Definition: porousmediumflow/richardsnc/model.hh:82
static constexpr int numFluidComponents()
Definition: porousmediumflow/richardsnc/model.hh:79
static constexpr int replaceCompEqIdx()
Definition: porousmediumflow/richardsnc/model.hh:80
Traits class for the Richards n-components model.
Definition: porousmediumflow/richardsnc/model.hh:105
MT ModelTraits
Definition: porousmediumflow/richardsnc/model.hh:112
PT PermeabilityType
Definition: porousmediumflow/richardsnc/model.hh:111
PV PrimaryVariables
Definition: porousmediumflow/richardsnc/model.hh:106
FST FluidState
Definition: porousmediumflow/richardsnc/model.hh:108
SSY SolidSystem
Definition: porousmediumflow/richardsnc/model.hh:109
SST SolidState
Definition: porousmediumflow/richardsnc/model.hh:110
EDM EffectiveDiffusivityModel
Definition: porousmediumflow/richardsnc/model.hh:114
FSY FluidSystem
Definition: porousmediumflow/richardsnc/model.hh:107
DT DiffusionType
Definition: porousmediumflow/richardsnc/model.hh:113
Reation for a simple effective thermal conductivity.