3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.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 *****************************************************************************/
25#ifndef DUMUX_MPNC_COMPARISON_SPATIAL_PARAMS_HH
26#define DUMUX_MPNC_COMPARISON_SPATIAL_PARAMS_HH
27
33
35
36// material laws for interfacial area
41namespace Dumux {
42
47template<class GridGeometry, class Scalar>
49: public FVNonEquilibriumSpatialParams<GridGeometry, Scalar,
50 TwoPTwoCChemicalNonequilibriumSpatialParams<GridGeometry, Scalar>>
51{
52 using GridView = typename GridGeometry::GridView;
53 using FVElementGeometry = typename GridGeometry::LocalView;
54 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
55
56 using Element = typename GridView::template Codim<0>::Entity;
57 using ParentType = FVNonEquilibriumSpatialParams<GridGeometry, Scalar,
59
60 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
61
62 enum {dimWorld=GridView::dimensionworld};
63
65
66public:
68 using PermeabilityType = Scalar;
75
76 TwoPTwoCChemicalNonequilibriumSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
78 {
79 // intrinsic permeabilities
80 coarseK_ = 1e-11;
81
82 // the porosity
83 porosity_ = 0.4;
84
85 // residual saturations
86 coarseMaterialParams_.setSwr(0.2);
87 coarseMaterialParams_.setSnr(0.1);
88
89 // parameters for the Brooks-Corey law
90 coarseMaterialParams_.setPe(1e4);
91 coarseMaterialParams_.setLambda(2.0);
92
93 aWettingNonWettingA1_ = getParam<Scalar>("SpatialParams.WettingNonWettingAreaA1");
94 aWettingNonWettingA2_ = getParam<Scalar>("SpatialParams.WettingNonWettingAreaA2");
95 aWettingNonWettingA3_ = getParam<Scalar>("SpatialParams.WettingNonWettingAreaA3");
96
97 // wetting-non wetting: surface which goes to zero on the edges, but is a polynomial
98 aWettingNonWettingSurfaceParams_.setA1(aWettingNonWettingA1_);
99 aWettingNonWettingSurfaceParams_.setA2(aWettingNonWettingA2_);
100 aWettingNonWettingSurfaceParams_.setA3(aWettingNonWettingA3_);
101 // determine maximum capillary pressure for wetting-nonwetting surface
103 pcMax_ = TwoPLaw::pc(coarseMaterialParams_, /*sw = */0.0);
104 aWettingNonWettingSurfaceParams_.setPcMax(pcMax_);
105 characteristicLength_ =getParam<Scalar>("SpatialParams.MeanPoreSize");
106 factorMassTransfer_ = getParam<Scalar>("SpatialParams.MassTransferFactor");
107 }
108
109 template<class ElementSolution>
110 PermeabilityType permeability(const Element& element,
111 const SubControlVolume& scv,
112 const ElementSolution& elemSol) const
113 {
114 return coarseK_;
115 }
116
123 Scalar porosityAtPos(const GlobalPosition& globalPos) const
124 {
125 return porosity_;
126 }
127
134 const MaterialLawParams& materialLawParamsAtPos(const GlobalPosition& globalPos) const
135 {
136 return coarseMaterialParams_;
137 }
138
149 template<class ElementSolution>
151 const SubControlVolume &scv,
152 const ElementSolution &elemSol) const
153 {
154 return aWettingNonWettingSurfaceParams_ ;
155 }
156
170 template<class ElementSolution>
171 const Scalar pcMax(const Element &element,
172 const SubControlVolume &scv,
173 const ElementSolution &elemSol) const
174 { return aWettingNonWettingSurfaceParams_.pcMax() ; }
175
181 const Scalar characteristicLengthAtPos(const GlobalPosition & globalPos) const
182 { return characteristicLength_ ; }
183
189 const Scalar factorMassTransferAtPos(const GlobalPosition & globalPos) const
190 { return factorMassTransfer_; }
191
198 template<class FluidSystem>
199 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
200 { return FluidSystem::H2OIdx; }
201
202private:
203
204 Scalar coarseK_;
205 Scalar porosity_;
206 MaterialLawParams coarseMaterialParams_;
207 static constexpr Scalar eps_ = 1e-6;
208
209 AwnSurfaceParams aWettingNonWettingSurfaceParams_;
210 Scalar pcMax_ ;
211
212 // interfacial area parameters
213 Scalar aWettingNonWettingA1_ ;
214 Scalar aWettingNonWettingA2_ ;
215 Scalar aWettingNonWettingA3_ ;
216
217 Scalar factorMassTransfer_ ;
218 Scalar characteristicLength_ ;
219};
220
221} // end namespace Dumux
222
223#endif
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
Regularized linear capillary pressure and relative permeability <-> saturation relations.
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
Specification of a function relating volume specific interfacial area to capillary pressure and satur...
This material law takes a material law (interfacial area surface) defined for effective saturations a...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Base class for spatial parameters dealing with thermal and chemical non-equilibrium.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
This material law takes a material law defined for effective saturations and converts it to a materia...
Definition: 2p/efftoabslaw.hh:60
AbsParamsT Params
Definition: 2p/efftoabslaw.hh:64
Implementation of the regularized Brooks-Corey capillary pressure / relative permeability <-> saturat...
Definition: regularizedbrookscorey.hh:62
Implementation of an interfacial area surface.
Definition: awnsurfacepcmaxfct.hh:44
This material law takes a material law (interfacial area surface) defined for effective saturations a...
Definition: efftoabslawia.hh:63
InterfacialAreaAbsParamsT Params
Definition: efftoabslawia.hh:68
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition of the spatial parameters for non-equilibrium.
Definition: fvnonequilibrium.hh:39
The spatial parameters for the 2p2c chemical nonequilibrium problem.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:51
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:199
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity of the soil.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:123
const Scalar factorMassTransferAtPos(const GlobalPosition &globalPos) const
Return the pre factor the the energy transfer.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:189
const AwnSurfaceParams & aWettingNonWettingSurfaceParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns a reference to the container object for the parametrization of the surface between wetting an...
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:150
Scalar PermeabilityType
Export permeability type.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:68
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:110
const Scalar characteristicLengthAtPos(const GlobalPosition &globalPos) const
Returns the characteristic length for the mass transfer.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:181
TwoPTwoCChemicalNonequilibriumSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:76
const Scalar pcMax(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the maximum capillary pressure for the given pc-Sw curve.
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:171
const MaterialLawParams & materialLawParamsAtPos(const GlobalPosition &globalPos) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:134
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:71
typename AwnSurface::Params AwnSurfaceParams
Definition: porousmediumflow/2p2c/implicit/chemicalnonequilibrium/spatialparams.hh:74
Defines a type tag and some properties for models using the box scheme.
This material law takes a material law defined for effective saturations and converts it to a materia...