3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/3p3c/implicit/columnxylol/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 *****************************************************************************/
24#ifndef DUMUX_COLUMNXYLOL_SPATIAL_PARAMS_HH
25#define DUMUX_COLUMNXYLOL_SPATIAL_PARAMS_HH
26
32
33namespace Dumux {
34
39template<class GridGeometry, class Scalar>
41: public FVSpatialParams<GridGeometry, Scalar,
42 ColumnSpatialParams<GridGeometry, Scalar>>
43{
44 using GridView = typename GridGeometry::GridView;
45 using FVElementGeometry = typename GridGeometry::LocalView;
46 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
47
48 using Element = typename GridView::template Codim<0>::Entity;
49 using ParentType = FVSpatialParams<GridGeometry, Scalar,
51
52 using GlobalPosition = typename SubControlVolume::GlobalPosition;
54
55public:
58 using PermeabilityType = Scalar;
59
60 ColumnSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
62 {
63 // intrinsic permeabilities
64 fineK_ = 1.4e-11;
65 coarseK_ = 1.4e-8;
66
67 // porosities
68 porosity_ = 0.46;
69
70 // specific heat capacities
71 fineHeatCap_ = getParam<Scalar>("Component.SolidHeatCapacityFine", 850.0);
72 coarseHeatCap_ = getParam<Scalar>("Component.SolidHeatCapacityCoarse", 84000.0);
73
74 // residual saturations
75 fineMaterialParams_.setSwr(0.12);
76 fineMaterialParams_.setSnr(0.10);
77 fineMaterialParams_.setSgr(0.01);
78 coarseMaterialParams_.setSwr(0.12);
79 coarseMaterialParams_.setSnr(0.10);
80 coarseMaterialParams_.setSgr(0.01);
81
82 // parameters for the 3phase van Genuchten law
83 fineMaterialParams_.setVgAlpha(0.0005);
84 coarseMaterialParams_.setVgAlpha(0.5);
85 fineMaterialParams_.setVgn(4.0);
86 coarseMaterialParams_.setVgn(4.0);
87
88 coarseMaterialParams_.setKrRegardsSnr(true);
89 fineMaterialParams_.setKrRegardsSnr(true);
90
91 // parameters for adsorption
92 coarseMaterialParams_.setKdNAPL(0.);
93 coarseMaterialParams_.setRhoBulk(1500.);
94 fineMaterialParams_.setKdNAPL(0.);
95 fineMaterialParams_.setRhoBulk(1500.);
96 }
97
107 template<class ElementSolution>
108 PermeabilityType permeability(const Element& element,
109 const SubControlVolume& scv,
110 const ElementSolution& elemSol) const
111 {
112 const auto& globalPos = scv.dofPosition();
113 if (isFineMaterial_(globalPos))
114 return fineK_;
115 return coarseK_;
116 }
117
122 Scalar porosityAtPos(const GlobalPosition& globalPos) const
123 {
124 return porosity_;
125 }
126
135 template<class ElementSolution>
136 const MaterialLawParams& materialLawParams(const Element& element,
137 const SubControlVolume& scv,
138 const ElementSolution& elemSol) const
139 {
140 const auto& globalPos = scv.dofPosition();
141 if (isFineMaterial_(globalPos))
142 return fineMaterialParams_;
143 else
144 return coarseMaterialParams_;
145 }
146
156 template <class ElementSolution, class SolidState>
157 Scalar solidHeatCapacity(const Element& element,
158 const SubControlVolume& scv,
159 const ElementSolution& elemSol,
160 const SolidState& solidState) const
161 {
162 const auto& globalPos = scv.dofPosition();
163 if (isFineMaterial_(globalPos))
164 return fineHeatCap_;
165 else
166 return coarseHeatCap_;
167 }
168
169private:
170 bool isFineMaterial_(const GlobalPosition &globalPos) const
171 {
172 return (0.90 - eps_ <= globalPos[1]);
173 }
174
175 Scalar fineK_;
176 Scalar coarseK_;
177
178 Scalar porosity_;
179
180 Scalar fineHeatCap_;
181 Scalar coarseHeatCap_;
182
183 MaterialLawParams fineMaterialParams_;
184 MaterialLawParams coarseMaterialParams_;
185
186 static constexpr Scalar eps_ = 1e-6;
187};
188
189} // end namespace Dumux
190
191#endif
Implementation of a regularized version of van Genuchten's capillary pressure-saturation relation for...
Parameters that are necessary for the regularization of the Parker - Van Genuchten capillary pressure...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
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 van Genuchten's capillary pressure <-> saturation relation....
Definition: regularizedparkervangen3p.hh:62
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
Definition: fv.hh:57
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fv1p.hh:334
Definition of the spatial parameters for the column problem.
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:43
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability .
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:108
ColumnSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:60
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the parameters needed by constitutive relationships (kr-sw, pc-sw,...
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:136
Scalar solidHeatCapacity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, const SolidState &solidState) const
Returns the user-defined solid heat capacity.
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:157
Scalar porosityAtPos(const GlobalPosition &globalPos) const
Defines the porosity in [-].
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:122
Scalar PermeabilityType
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:58
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/3p3c/implicit/columnxylol/spatialparams.hh:57
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...