3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/1pnc/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 *****************************************************************************/
57#ifndef DUMUX_1PNC_MODEL_HH
58#define DUMUX_1PNC_MODEL_HH
59
61
64
74
75#include "indices.hh"
76#include "volumevariables.hh"
77#include "iofields.hh"
78
79namespace Dumux {
80
88template<int nComp, bool useM, int repCompEqIdx = nComp>
90{
92
93 static constexpr int numEq() { return nComp; }
94 static constexpr int numFluidPhases() { return 1; }
95 static constexpr int numFluidComponents() { return nComp; }
96 static constexpr int replaceCompEqIdx() { return repCompEqIdx; }
97
98 static constexpr bool useMoles() { return useM; }
99 static constexpr bool enableAdvection() { return true; }
100 static constexpr bool enableMolecularDiffusion() { return true; }
101 static constexpr bool enableEnergyBalance() { return false; }
102};
103
104namespace Properties {
105
107// Type tags
109
111// Create new type tags
112namespace TTag {
113struct OnePNC { using InheritsFrom = std::tuple<PorousMediumFlow>; };
114struct OnePNCNI { using InheritsFrom = std::tuple<OnePNC>; };
115} // end namespace TTag
116
118// Properties for the isothermal single phase model
120
122template<class TypeTag>
123struct ReplaceCompEqIdx<TypeTag, TTag::OnePNC> { static constexpr int value = GetPropType<TypeTag, Properties::FluidSystem>::numComponents; };
124
126template<class TypeTag>
127struct BaseModelTraits<TypeTag, TTag::OnePNC>
128{
129private:
131public:
132 using type = OnePNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
133};
134template<class TypeTag>
135struct ModelTraits<TypeTag, TTag::OnePNC> { using type = GetPropType<TypeTag, Properties::BaseModelTraits>; };
136
144template<class TypeTag>
145struct FluidState<TypeTag, TTag::OnePNC>
146{
147private:
151public:
153};
154
156template<class TypeTag>
157struct EffectiveDiffusivityModel<TypeTag, TTag::OnePNC>
159
161template<class TypeTag>
162struct UseMoles<TypeTag, TTag::OnePNC> { static constexpr bool value = true; };
163
165template<class TypeTag>
166struct LocalResidual<TypeTag, TTag::OnePNC> { using type = CompositionalLocalResidual<TypeTag>; };
167
169template<class TypeTag>
170struct VolumeVariables<TypeTag, TTag::OnePNC>
171{
172private:
180 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
181 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
182 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
183 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
185
188 template<class BaseTraits, class DT, class EDM>
189 struct NCTraits : public BaseTraits
190 {
191 using DiffusionType = DT;
192 using EffectiveDiffusivityModel = EDM;
193 };
194
195public:
197};
198
200template<class TypeTag>
201struct IOFields<TypeTag, TTag::OnePNC> { using type = OnePNCIOFields; };
202
204// Properties for the non-isothermal single phase model
206
208template<class TypeTag>
209struct IOFields<TypeTag, TTag::OnePNCNI> { using type = EnergyIOFields<OnePNCIOFields>; };
210
212template<class TypeTag>
213struct ThermalConductivityModel<TypeTag, TTag::OnePNCNI>
215
217template<class TypeTag>
218struct ModelTraits<TypeTag, TTag::OnePNCNI>
219{
220private:
222public:
224};
225
226template<class TypeTag>
227struct VolumeVariables<TypeTag, TTag::OnePNCNI>
228{
229private:
237 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
238 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
239 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
240 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
242
246 template<class BaseTraits, class DT, class EDM, class ETCM>
247 struct NCNITraits : public BaseTraits
248 {
249 using DiffusionType = DT;
250 using EffectiveDiffusivityModel = EDM;
251 using EffectiveThermalConductivityModel = ETCM;
252 };
253
254public:
256};
257
258} // end namespace Properties
259
260template<class OnePNCModelTraits>
262{
263 static constexpr int numConstraintEq() { return 0; }
264};
265
266namespace Properties {
268// Type tags
270namespace TTag {
271struct OnePNCNonEquil { using InheritsFrom = std::tuple<NonEquilibrium, OnePNC>; };
272} // end namespace TTag
273
274
276// Properties for the non-equilibrium OnePNC model
278
279template<class TypeTag>
280struct EquilibriumLocalResidual<TypeTag, TTag::OnePNCNonEquil> { using type = CompositionalLocalResidual<TypeTag>; };
281
283template<class TypeTag>
284struct EquilibriumIOFields<TypeTag, TTag::OnePNCNonEquil> { using type = OnePNCIOFields; };
285
286template<class TypeTag>
287struct ModelTraits<TypeTag, TTag::OnePNCNonEquil>
288{
289private:
291 static constexpr bool enableTNE = getPropValue<TypeTag, Properties::EnableThermalNonEquilibrium>();
292 static constexpr bool enableCNE = getPropValue<TypeTag, Properties::EnableChemicalNonEquilibrium>();
293 static constexpr int numEF = getPropValue<TypeTag, Properties::NumEnergyEqFluid>();
294 static constexpr int numES = getPropValue<TypeTag, Properties::NumEnergyEqSolid>();
295 static constexpr auto nf = getPropValue<TypeTag, Properties::NusseltFormulation>();
296 static constexpr auto ns = getPropValue<TypeTag, Properties::SherwoodFormulation>();
297
299public:
301};
302
303// by default chemical non equilibrium is enabled in the nonequil model, switch that off here
304template<class TypeTag>
305struct EnableChemicalNonEquilibrium<TypeTag, TTag::OnePNCNonEquil> { static constexpr bool value = false; };
306
308template<class TypeTag>
309struct EquilibriumModelTraits<TypeTag, TTag::OnePNCNonEquil>
310{
311private:
313 using EquilibriumTraits = OnePNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
314public:
316};
317
319template<class TypeTag>
320struct ThermalConductivityModel<TypeTag, TTag::OnePNCNonEquil>
321{
322private:
324public:
326};
327
329template<class TypeTag>
330struct VolumeVariables<TypeTag, TTag::OnePNCNonEquil>
331{
332private:
341
345 template<class BaseTraits, class DT, class EDM, class ETCM>
346 struct NCNITraits : public BaseTraits
347 {
348 using DiffusionType = DT;
349 using EffectiveDiffusivityModel = EDM;
350 using EffectiveThermalConductivityModel = ETCM;
351 };
352
354public:
356};
357
358} // end namespace Properties
359} // end namespace Dumux
360
361#endif
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...
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
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:77
Property whether to use moles or kg as amount unit for balance equations.
Definition: common/properties.hh:88
The component balance index that should be replaced by the total mass/mole balance.
Definition: common/properties.hh:90
The secondary variables within a sub-control volume.
Definition: common/properties.hh:106
The type of the fluid state to use.
Definition: common/properties.hh:157
The employed model for the computation of the effective diffusivity.
Definition: common/properties.hh:163
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:165
the formulation of the pressure e.g most wetting first
Definition: common/properties.hh:250
Definition: common/properties.hh:252
Definition: common/properties.hh:256
Definition: common/properties.hh:262
Relation for a simple effective thermal conductivity.
Definition: thermalconductivityaverage.hh:37
Relation for the saturation-dependent effective diffusion coefficient.
Definition: diffusivitymillingtonquirk.hh:51
Represents all relevant thermodynamic quantities of a multi-phase, multi-component fluid system assum...
Definition: compositional.hh:47
Traits class for the volume variables of the single-phase model.
Definition: porousmediumflow/1p/model.hh:91
The indices for the isothermal one-phase n-component model.
Definition: porousmediumflow/1pnc/indices.hh:38
Adds I/O fields specific to the OnePNC model.
Definition: porousmediumflow/1pnc/iofields.hh:38
Specifies a number properties of models that consider a single-phase with multiple components.
Definition: porousmediumflow/1pnc/model.hh:90
static constexpr bool enableEnergyBalance()
Definition: porousmediumflow/1pnc/model.hh:101
static constexpr bool useMoles()
Definition: porousmediumflow/1pnc/model.hh:98
static constexpr int numFluidPhases()
Definition: porousmediumflow/1pnc/model.hh:94
static constexpr bool enableMolecularDiffusion()
Definition: porousmediumflow/1pnc/model.hh:100
static constexpr int numFluidComponents()
Definition: porousmediumflow/1pnc/model.hh:95
static constexpr bool enableAdvection()
Definition: porousmediumflow/1pnc/model.hh:99
static constexpr int numEq()
Definition: porousmediumflow/1pnc/model.hh:93
static constexpr int replaceCompEqIdx()
Definition: porousmediumflow/1pnc/model.hh:96
Definition: porousmediumflow/1pnc/model.hh:113
std::tuple< PorousMediumFlow > InheritsFrom
Definition: porousmediumflow/1pnc/model.hh:113
Definition: porousmediumflow/1pnc/model.hh:114
std::tuple< OnePNC > InheritsFrom
Definition: porousmediumflow/1pnc/model.hh:114
GetPropType< TypeTag, Properties::BaseModelTraits > type
Definition: porousmediumflow/1pnc/model.hh:135
Definition: porousmediumflow/1pnc/model.hh:262
static constexpr int numConstraintEq()
Definition: porousmediumflow/1pnc/model.hh:263
Definition: porousmediumflow/1pnc/model.hh:271
std::tuple< NonEquilibrium, OnePNC > InheritsFrom
Definition: porousmediumflow/1pnc/model.hh:271
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porousmediumflow/1pnc/volumevariables.hh:50
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:43
Specifies a number properties of porous-medium flow non-equilibrium models.
Definition: porousmediumflow/nonequilibrium/model.hh:57
This class contains the volume variables required for the modules which require the specific interfac...
Definition: porousmediumflow/nonequilibrium/volumevariables.hh:51
Adds I/O fields specific to non-isothermal models.
Definition: 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
Declares all properties used in Dumux.
Defines a type tag and some properties for models using the box scheme.
A single-phase, isothermal flow model using the fully implicit scheme.
This specifies models which are able to capture non-equilibrium mass and / or energy transfer.
The implicit non-isothermal model.
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.
Base class for the model specific class which provides access to all volume averaged quantities.
This class contains the volume variables required for the modules which require the specific interfac...
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.