11 #include "RankFourTensor.h"
13 #include "libmesh/quadrature.h"
14 #include "libmesh/utility.h"
15 #include "libmesh/enum_quadrature_type.h"
16 #include "libmesh/fe_type.h"
17 #include "libmesh/string_to_enum.h"
18 #include "libmesh/quadrature_gauss.h"
25 params.addClassDescription(
"Compute a plane stress isotropic elasticity tensor.");
26 params.addRequiredRangeCheckedParam<Real>(
"poissons_ratio",
27 "poissons_ratio >= -1.0 & poissons_ratio < 0.5",
28 "Poisson's ratio for the material.");
29 params.addRequiredRangeCheckedParam<Real>(
"youngs_modulus",
30 "youngs_modulus > 0.0",
31 "Young's modulus of the material.");
32 params.addRequiredParam<std::string>(
"through_thickness_order",
33 "Quadrature order in out of plane direction"););
35 template <ComputeStage compute_stage>
37 const InputParameters & parameters)
38 : ADMaterial<compute_stage>(parameters),
39 _poissons_ratio(getParam<Real>(
"poissons_ratio")),
40 _youngs_modulus(getParam<Real>(
"youngs_modulus"))
56 std::unique_ptr<QGauss> t_qrule = libmesh_make_unique<QGauss>(
57 1, Utility::string_to_enum<Order>(getParam<std::string>(
"through_thickness_order")));
61 for (
unsigned int t = 0; t <
_t_points.size(); ++t)
64 &declareADProperty<RankFourTensor>(
"elasticity_tensor_t_points_" + std::to_string(t));
65 _ge[t] = &getADMaterialProperty<RankTwoTensor>(
"ge_t_points_" + std::to_string(t));
69 template <ComputeStage compute_stage>
73 for (
unsigned int t = 0; t < _t_points.size(); ++t)
75 (*_elasticity_tensor[t])[_qp].zero();
77 for (
unsigned int i = 0; i < 3; ++i)
78 for (
unsigned int j = 0; j < 3; ++j)
79 for (
unsigned int k = 0; k < 3; ++k)
80 for (
unsigned int l = 0; l < 3; ++l)
81 for (
unsigned int m = 0; m < 3; ++m)
82 for (
unsigned int n = 0; n < 3; ++n)
83 for (
unsigned int o = 0; o < 3; ++o)
84 for (
unsigned int p = 0; p < 3; ++p)
85 (*_elasticity_tensor[t])[_qp](i, j, k, l) +=
86 (*_ge[t])[_qp](i, m) * (*_ge[t])[_qp](j, n) * (*_ge[t])[_qp](k, o) *
87 (*_ge[t])[_qp](l, p) * _Cijkl(m, n, o, p);