OGS
LinearElasticIsotropic.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "MechanicsBase.h"
14
15namespace MaterialLib
16{
17namespace Solids
18{
19template <int DisplacementDim>
20class LinearElasticIsotropic : public MechanicsBase<DisplacementDim>
21{
22public:
25 {
28
29 public:
30 MaterialProperties(P const& youngs_modulus, P const& poissons_ratio)
31 : _youngs_modulus(youngs_modulus), _poissons_ratio(poissons_ratio)
32 {
33 }
34
36 double lambda(double const t, X const& x) const
37 {
38 return _youngs_modulus(t, x)[0] * _poissons_ratio(t, x)[0] /
39 (1 + _poissons_ratio(t, x)[0]) /
40 (1 - 2 * _poissons_ratio(t, x)[0]);
41 }
42
44 double mu(double const t, X const& x) const
45 {
46 return _youngs_modulus(t, x)[0] /
47 (2 * (1 + _poissons_ratio(t, x)[0]));
48 }
49
51 double bulk_modulus(double const t, X const& x) const
52 {
53 return _youngs_modulus(t, x)[0] /
54 (3 * (1 - 2 * _poissons_ratio(t, x)[0]));
55 }
56
57 private:
60 };
61
62public:
63 static int const KelvinVectorSize =
69
70 explicit LinearElasticIsotropic(MaterialProperties material_properties)
71 : _mp(std::move(material_properties))
72 {
73 }
74
76 double const /*t*/,
78 double const /*dt*/,
79 KelvinVector const& eps,
80 KelvinVector const& sigma,
82 MaterialStateVariables const& /* material_state_variables */)
83 const override
84 {
85 return eps.dot(sigma) / 2;
86 }
87
88 std::optional<
89 std::tuple<typename MechanicsBase<DisplacementDim>::KelvinVector,
90 std::unique_ptr<typename MechanicsBase<
91 DisplacementDim>::MaterialStateVariables>,
94 MaterialPropertyLib::VariableArray const& variable_array_prev,
95 MaterialPropertyLib::VariableArray const& variable_array,
96 double const t, ParameterLib::SpatialPosition const& x,
97 double const /*dt*/,
99 material_state_variables) const override;
100
101 KelvinMatrix getElasticTensor(double const t,
103 double const T) const;
104
106
107 double getBulkModulus(double const t,
109 KelvinMatrix const* const /*C*/) const override
110 {
111 return _mp.bulk_modulus(t, x);
112 }
113
114
115
116protected:
118};
119
120extern template class LinearElasticIsotropic<2>;
121extern template class LinearElasticIsotropic<3>;
122
123template <int DisplacementDim>
125elasticTangentStiffness(double const first_lame_parameter,
126 double const shear_modulus)
127{
128 using KelvinMatrix =
130
131 KelvinMatrix tangentStiffness = KelvinMatrix::Zero();
132 tangentStiffness.template topLeftCorner<3, 3>().setConstant(
133 first_lame_parameter);
134 tangentStiffness.noalias() += 2 * shear_modulus * KelvinMatrix::Identity();
135 return tangentStiffness;
136}
137
138} // namespace Solids
139} // namespace MaterialLib
MaterialProperties(P const &youngs_modulus, P const &poissons_ratio)
double bulk_modulus(double const t, X const &x) const
the bulk modulus.
double mu(double const t, X const &x) const
Lamé's second parameter, the shear modulus.
double lambda(double const t, X const &x) const
Lamé's first parameter.
std::optional< std::tuple< typename MechanicsBase< DisplacementDim >::KelvinVector, std::unique_ptr< typename MechanicsBase< DisplacementDim >::MaterialStateVariables >, typename MechanicsBase< DisplacementDim >::KelvinMatrix > > integrateStress(MaterialPropertyLib::VariableArray const &variable_array_prev, MaterialPropertyLib::VariableArray const &variable_array, double const t, ParameterLib::SpatialPosition const &x, double const, typename MechanicsBase< DisplacementDim >::MaterialStateVariables const &material_state_variables) const override
double computeFreeEnergyDensity(double const, ParameterLib::SpatialPosition const &, double const, KelvinVector const &eps, KelvinVector const &sigma, typename MechanicsBase< DisplacementDim >::MaterialStateVariables const &) const override
double getBulkModulus(double const t, ParameterLib::SpatialPosition const &x, KelvinMatrix const *const) const override
LinearElasticIsotropic(MaterialProperties material_properties)
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > KelvinVector
KelvinMatrix getElasticTensor(double const t, ParameterLib::SpatialPosition const &x, double const T) const
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > elasticTangentStiffness(double const first_lame_parameter, double const shear_modulus)
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix