3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
el1p/spatialparams_poroelastic.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_POROELASTIC_SPATIAL_PARAMS_HH
25#define DUMUX_POROELASTIC_SPATIAL_PARAMS_HH
26
30
31namespace Dumux {
32
38template<class Scalar, class GridGeometry>
39class PoroElasticSpatialParams : public FVSpatialParamsPoroElastic< Scalar,
40 GridGeometry,
41 PoroElasticSpatialParams<Scalar, GridGeometry> >
42{
43 using ThisType = PoroElasticSpatialParams<Scalar, GridGeometry>;
44 using ParentType = FVSpatialParamsPoroElastic<Scalar, GridGeometry, ThisType>;
45
46 using SubControlVolume = typename GridGeometry::SubControlVolume;
47 using GridView = typename GridGeometry::GridView;
48 using Element = typename GridView::template Codim<0>::Entity;
49 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
50
51public:
54
55 PoroElasticSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
57 , initPorosity_(getParam<Scalar>("SpatialParams.InitialPorosity"))
58 {
59 // Young's modulus [Pa]
60 Scalar E = 6.e9;
61 // Poisson's ratio [-]
62 Scalar nu = 0.2;
63 // Lame parameters [Pa]
64 lameParams_.setLambda( (E * nu) / ((1 + nu)*(1 - 2 * nu)) );
65 lameParams_.setMu( E / (2 * (1 + nu)) );
66 }
67
69 const LameParams& lameParamsAtPos(const GlobalPosition& globalPos) const
70 { return lameParams_; }
71
73 template<class ElementSolution>
74 Scalar porosity(const Element& element,
75 const SubControlVolume& scv,
76 const ElementSolution& elemSol) const
77
78 {
79 return PorosityDeformation<Scalar>::evaluatePorosity(this->gridGeometry(), element, scv, elemSol, initPorosity_);
80 }
81
83 Scalar biotCoefficientAtPos(const GlobalPosition& globalPos) const
84 { return 1.0; }
85
86private:
87 Scalar initPorosity_;
88 LameParams lameParams_;
89};
90
91} // end namespace Dumux
92
93#endif
A relationship for the porosity of a porous medium under mechanical deformation.
The base class for spatial parameters of poro-elastic geomechanical problems.
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition: parameters.hh:428
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Structure encapsulating the lame parameters.
Definition: lameparams.hh:35
void setMu(Scalar mu)
set the second lame parameter
Definition: lameparams.hh:57
void setLambda(Scalar lambda)
set the first lame parameter
Definition: lameparams.hh:53
static Scalar evaluatePorosity(const FVGridGeom &gridGeometry, const typename FVGridGeom::GridView::template Codim< 0 >::Entity &element, const typename FVGridGeom::GridView::template Codim< 0 >::Entity::Geometry::GlobalCoordinate &globalPos, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0, Scalar maxPoro=1.0)
Calculates the porosity at a position inside an element.
Definition: porositydeformation.hh:65
The base class for spatial parameters of poro-elastic geomechanical problems.
Definition: fvporoelastic.hh:79
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: fvporoelastic.hh:322
PoroElasticSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: el1p/spatialparams_poroelastic.hh:55
Scalar porosity(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol) const
Returns the porosity of the porous medium.
Definition: el1p/spatialparams_poroelastic.hh:74
const LameParams & lameParamsAtPos(const GlobalPosition &globalPos) const
Defines the Lame parameters.
Definition: el1p/spatialparams_poroelastic.hh:69
Scalar biotCoefficientAtPos(const GlobalPosition &globalPos) const
Returns the Biot coefficient of the porous medium.
Definition: el1p/spatialparams_poroelastic.hh:83