3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porenetwork/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 *****************************************************************************/
56#ifndef DUMUX_PNM1PNC_MODEL_HH
57#define DUMUX_PNM1PNC_MODEL_HH
58
60
62
67
70
77
78#include "iofields.hh"
79#include "volumevariables.hh"
80
81namespace Dumux::Properties {
83// Type tags
85
87// Create new type tags
88namespace TTag {
89struct PNMOnePNC { using InheritsFrom = std::tuple<PoreNetworkModel, OnePNC>; };
90
92struct PNMOnePNCNI { using InheritsFrom = std::tuple<PNMOnePNC>; };
93} // end namespace TTag
94
96// properties for the isothermal single phase model
98
101template<class TypeTag>
102struct SpatialParams<TypeTag, TTag::PNMOnePNC>
103{
104private:
107public:
109};
110
112template<class TypeTag>
113struct AdvectionType<TypeTag, TTag::PNMOnePNC>
114{
115private:
117 using TransmissibilityLaw = Dumux::PoreNetwork::TransmissibilityPatzekSilin<Scalar, false/*considerPoreBodyResistance*/>;
118public:
120};
121
123template<class TypeTag>
124struct ReplaceCompEqIdx<TypeTag, TTag::PNMOnePNC>
125{
126private:
128public:
129 static constexpr auto value = FluidSystem::numComponents;
130};
131
133template<class TypeTag>
134struct MolecularDiffusionType<TypeTag, TTag::PNMOnePNC>
135{
136private:
139public:
140 using type = Dumux::PoreNetwork::PNMFicksLaw<Scalar, ModelTraits::numFluidPhases(), ModelTraits::numFluidComponents()>;
141};
142
144template<class TypeTag>
145struct VolumeVariables<TypeTag, TTag::PNMOnePNC>
146{
147private:
155 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
156 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
157 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
158 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
160
163 template<class BaseTraits, class DT, class EDM>
164 struct NCTraits : public BaseTraits
165 {
166 using DiffusionType = DT;
167 using EffectiveDiffusivityModel = EDM;
168 };
169
170public:
172};
173
175template<class TypeTag>
176struct IOFields<TypeTag, TTag::PNMOnePNC>
178
179template<class TypeTag>
180struct UseMoles<TypeTag, TTag::PNMOnePNC> { static constexpr bool value = true; };
181
183// Property values for isothermal model required for the general non-isothermal model
185
187template<class TypeTag>
188struct ModelTraits<TypeTag, TTag::PNMOnePNCNI>
189{
190private:
192 using IsothermalTraits = OnePNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>;
193public:
195};
196
197template<class TypeTag>
198struct VolumeVariables<TypeTag, TTag::PNMOnePNCNI>
199{
200private:
208 static_assert(FSY::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid system");
209 static_assert(FST::numComponents == MT::numFluidComponents(), "Number of components mismatch between model and fluid state");
210 static_assert(FSY::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid system");
211 static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state");
213
217 template<class BaseTraits, class DT, class EDM, class ETCM>
218 struct NCNITraits : public BaseTraits
219 {
220 using DiffusionType = DT;
221 using EffectiveDiffusivityModel = EDM;
222 using EffectiveThermalConductivityModel = ETCM;
223 };
224
225public:
227};
228
229template<class TypeTag>
230struct IOFields<TypeTag, TTag::PNMOnePNCNI>
231{
232private:
235public:
237};
238
239template<class TypeTag>
240struct ThermalConductivityModel<TypeTag, TTag::PNMOnePNCNI>
241{
243};
244
245// template<class TypeTag>
246// struct HeatConductionType<TypeTag, TTag::PNMOnePNCNI>
247// {
248// TODO uncomment this as soon as there is a generalized approach for component enthalpies in all fluid systems
249// using type = Dumux::PoreNetwork::PNMFouriersLaw<GetPropType<TypeTag, MolecularDiffusionType>>;
250// }; //!< Use Fourier's law and also consider enthalpy transport by molecular diffusion
251
252} // end namespace Dumux::Properties
253#endif
Relation for the saturation-dependent effective diffusion coefficient.
Implementation of the single-phase transmissibility laws for throats.
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
The default class for spatial parameters for single-phase pore-network models.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Definition: common/properties.hh:37
Traits class encapsulating model specifications.
Definition: common/properties.hh:53
A class helping models to define input and output fields.
Definition: common/properties.hh:63
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:103
The type for the calculation the advective fluxes.
Definition: common/properties.hh:137
The type for the calculation of the molecular diffusion fluxes.
Definition: common/properties.hh:141
The type of the spatial parameters object.
Definition: common/properties.hh:150
The employed model for the computation of the effective diffusivity.
Definition: common/properties.hh:160
Model to be used for the calculation of the effective conductivity.
Definition: common/properties.hh:162
Definition: advection.hh:47
Specialization of Fick's Law for the pore-network model.
Definition: flux/porenetwork/fickslaw.hh:42
Relation for a simple effective thermal conductivity.
Definition: thermalconductivityaverage.hh:37
Single-phase flow throat transmissibility based on Patzek & Silin (2001) https://doi....
Definition: transmissibility1p.hh:123
The default class for spatial parameters for single-phase pore-network models.
Definition: porenetwork1p.hh:39
Adds output fields specific to the PNM 1pnc model.
Definition: porenetwork/1pnc/iofields.hh:38
Definition: porenetwork/1pnc/model.hh:89
std::tuple< PoreNetworkModel, OnePNC > InheritsFrom
Definition: porenetwork/1pnc/model.hh:89
The type tags for the corresponding non-isothermal problems.
Definition: porenetwork/1pnc/model.hh:92
std::tuple< PNMOnePNC > InheritsFrom
Definition: porenetwork/1pnc/model.hh:92
Contains the quantities which are are constant within a finite volume in the one-phase,...
Definition: porenetwork/1pnc/volumevariables.hh:44
Traits class for the volume variables of the single-phase model.
Definition: porousmediumflow/1p/model.hh:91
Specifies a number properties of models that consider a single-phase with multiple components.
Definition: porousmediumflow/1pnc/model.hh:90
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 common properties required for all pore-network models.
A one-phase-flow, isothermal pore-network model using the fully implicit scheme.
Adaption of the fully implicit model to the one-phase n-component flow model.
The implicit non-isothermal model.
This file contains the data which is required to calculate diffusive mass fluxes due to molecular dif...
Adds I/O fields specific to the OnePNC 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.
Defines the indices used by the non-isothermal two-phase two-component model.