OGS
LinearElasticIsotropic.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "MechanicsBase.h"
13 #include "ParameterLib/Parameter.h"
14 
15 namespace MaterialLib
16 {
17 namespace Solids
18 {
19 template <int DisplacementDim>
20 class LinearElasticIsotropic : public MechanicsBase<DisplacementDim>
21 {
22 public:
25  {
28 
29  public:
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 
62 public:
63  static int const KelvinVectorSize =
65  using KelvinVector =
67  using KelvinMatrix =
69 
70  explicit LinearElasticIsotropic(MaterialProperties material_properties)
71  : _mp(std::move(material_properties))
72  {
73  }
74 
76  double const /*t*/,
77  ParameterLib::SpatialPosition const& /*x*/,
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<
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 
116 protected:
118 };
119 
120 extern template class LinearElasticIsotropic<2>;
121 extern template class LinearElasticIsotropic<3>;
122 
123 template <int DisplacementDim>
125 elasticTangentStiffness(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
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix
double getBulkModulus(double const t, ParameterLib::SpatialPosition const &x, KelvinMatrix const *const) const override
LinearElasticIsotropic(MaterialProperties material_properties)
KelvinMatrix getElasticTensor(double const t, ParameterLib::SpatialPosition const &x, double const T) const
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > KelvinVector
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > elasticTangentStiffness(double const first_lame_parameter, double const shear_modulus)
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), 1, Eigen::ColMajor > KelvinVectorType
Definition: KelvinVector.h:49
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Definition: KelvinVector.h:24
Eigen::Matrix< double, kelvin_vector_dimensions(DisplacementDim), kelvin_vector_dimensions(DisplacementDim), Eigen::RowMajor > KelvinMatrixType
Definition: KelvinVector.h:57
static const double t
MathLib::KelvinVector::KelvinVectorType< DisplacementDim > KelvinVector
Definition: Base.h:20
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix
Definition: Base.h:23
MathLib::KelvinVector::KelvinMatrixType< DisplacementDim > KelvinMatrix
Definition: MechanicsBase.h:77