3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p/implicit/boxdfm/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_INCOMPRESSIBLE_TWOPBOXDFM_TEST_SPATIAL_PARAMS_HH
25#define DUMUX_INCOMPRESSIBLE_TWOPBOXDFM_TEST_SPATIAL_PARAMS_HH
26
28
33
35
36namespace Dumux {
37
42template<class GridGeometry, class Scalar>
43class TwoPTestSpatialParams : public FVSpatialParams< GridGeometry, Scalar, TwoPTestSpatialParams<GridGeometry, Scalar> >
44{
47
48 using GridView = typename GridGeometry::GridView;
49 using Element = typename GridView::template Codim<0>::Entity;
50 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
51
52 using FVElementGeometry = typename GridGeometry::LocalView;
53 using SubControlVolume = typename FVElementGeometry::SubControlVolume;
54
55 static constexpr int dimWorld = GridView::dimensionworld;
56
57public:
60 using PermeabilityType = Scalar;
61
62 TwoPTestSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) : ParentType(gridGeometry)
63 {
64 // residual saturations
65 matrixMaterialParams_.setSwr(0.18);
66 matrixMaterialParams_.setSnr(0.0);
67 fractureMaterialParams_.setSwr(0.05);
68 fractureMaterialParams_.setSnr(0.0);
69
70 // parameters for the Brooks-Corey law
71 matrixMaterialParams_.setPe(1e4);
72 matrixMaterialParams_.setLambda(2);
73 fractureMaterialParams_.setPe(1e3);
74 fractureMaterialParams_.setLambda(2);
75 }
76
86 template<class ElementSolution>
87 PermeabilityType permeability(const Element& element,
88 const SubControlVolume& scv,
89 const ElementSolution& elemSol) const
90 {
91 if (scv.isOnFracture())
92 return 5e-10;
93 else
94 return 1e-12;
95 }
96
105 template<class ElementSolution>
106 Scalar porosity(const Element& element,
107 const SubControlVolume& scv,
108 const ElementSolution& elemSol) const
109 {
110 if (scv.isOnFracture())
111 return 0.6;
112 else
113 return 0.15;
114 }
115
126 template<class ElementSolution>
127 const MaterialLawParams& materialLawParams(const Element& element,
128 const SubControlVolume& scv,
129 const ElementSolution& elemSol) const
130 {
131 if (scv.isOnFracture())
132 return fractureMaterialParams_;
133 else
134 return matrixMaterialParams_;
135 }
136
143 template<class FluidSystem>
144 int wettingPhaseAtPos(const GlobalPosition& globalPos) const
145 { return FluidSystem::phase0Idx; }
146
148 template<class SolutionVector>
149 void updateMaterialInterfaceParams(const SolutionVector& x)
150 {
151 materialInterfaceParams_.update(this->gridGeometry(), *this, x);
152 }
153
156 { return materialInterfaceParams_; }
157
158private:
159 MaterialLawParams matrixMaterialParams_;
160 MaterialLawParams fractureMaterialParams_;
161
162 // Determines the parameters associated with the dofs at material interfaces
163 BoxMaterialInterfaceParams<ThisType> materialInterfaceParams_;
164
165 static constexpr Scalar eps_ = 1.5e-7;
166};
167
168} // end namespace Dumux
169
170#endif
The available discretization methods in Dumux.
Implementation of a regularized version of the Brooks-Corey capillary pressure / relative permeabilit...
Implementation of the regularized version of the van Genuchten's capillary pressure / relative permea...
The base class for spatial parameters of multi-phase problems using a fully implicit discretization m...
copydoc Dumux::BoxMaterialInterfaceParams
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
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
Class that determines the material with the lowest capillary pressure (under fully water-saturated co...
Definition: boxmaterialinterfaceparams.hh:47
The spatial params for the incompressible 2p test.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:44
const BoxMaterialInterfaceParams< ThisType > & materialInterfaceParams() const
Returns the material parameters associated with a nodal dof.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:155
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the porosity .
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:106
Scalar PermeabilityType
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:60
const MaterialLawParams & materialLawParams(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the parameter object for the Brooks-Corey material law.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:127
PermeabilityType permeability(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Function for defining the (intrinsic) permeability . In this test, we use element-wise distributed pe...
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:87
typename MaterialLaw::Params MaterialLawParams
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:59
int wettingPhaseAtPos(const GlobalPosition &globalPos) const
Function for defining which phase is to be considered as the wetting phase.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:144
TwoPTestSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:62
void updateMaterialInterfaceParams(const SolutionVector &x)
Updates the map of which material parameters are associated with a nodal dof.
Definition: porousmediumflow/2p/implicit/boxdfm/spatialparams.hh:149
This material law takes a material law defined for effective saturations and converts it to a materia...