version 3.8
geomechanics/hyperelastic/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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_GEOMECHANICS_DEFAULT_HYPERELASTIC_SPATIAL_PARAMS_HH
13#define DUMUX_GEOMECHANICS_DEFAULT_HYPERELASTIC_SPATIAL_PARAMS_HH
14
16
17namespace Dumux {
18
19template<class GridGeometry, class Scalar>
21: public FVSpatialParams<GridGeometry, Scalar, DefaultHyperelasticSpatialParams<GridGeometry, Scalar>>
22{
24public:
25 DefaultHyperelasticSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
27 , E_(getParam<Scalar>("Problem.YoungsModulus"))
28 , nu_(getParam<Scalar>("Problem.PoissonRatio"))
29 {
30 mu_ = E_/(2*(1 + nu_));
31 K_ = E_/(3*(1 - 2*nu_));
32 lambda_ = nu_*E_/((1 + nu_)*(1-2*nu_));
33 }
34
35 Scalar shearModulus() const
36 { return mu_; }
37
38 Scalar bulkModulus() const
39 { return K_; }
40
41 Scalar youngsModulus() const
42 { return E_; }
43
44 Scalar poissonRatio() const
45 { return nu_; }
46
47 Scalar firstLameParameter() const
48 { return lambda_; }
49
50private:
51 Scalar E_, nu_, mu_, K_, lambda_;
52};
53
54} // end namespace Dumux
55
56#endif
Definition: geomechanics/hyperelastic/spatialparams.hh:22
Scalar bulkModulus() const
Definition: geomechanics/hyperelastic/spatialparams.hh:38
DefaultHyperelasticSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
Definition: geomechanics/hyperelastic/spatialparams.hh:25
Scalar poissonRatio() const
Definition: geomechanics/hyperelastic/spatialparams.hh:44
Scalar firstLameParameter() const
Definition: geomechanics/hyperelastic/spatialparams.hh:47
Scalar youngsModulus() const
Definition: geomechanics/hyperelastic/spatialparams.hh:41
Scalar shearModulus() const
Definition: geomechanics/hyperelastic/spatialparams.hh:35
The base class for spatial parameters used with finite-volume schemes.
Definition: common/fvspatialparams.hh:34
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvspatialparams.hh:130
Basic spatial parameters to be used with finite-volume schemes.
T getParam(Args &&... args)
A free function to get a parameter from the parameter tree singleton.
Definition: parameters.hh:139
Definition: adapt.hh:17