11 #include "RankTwoTensor.h"
12 #include "RankFourTensor.h"
15 #include "libmesh/quadrature.h"
16 #include "libmesh/utility.h"
17 #include "libmesh/enum_quadrature_type.h"
18 #include "libmesh/fe_type.h"
19 #include "libmesh/string_to_enum.h"
20 #include "libmesh/quadrature_gauss.h"
27 params.addClassDescription(
"Compute in-plane stress using elasticity for shell");
28 params.addRequiredParam<std::string>(
"through_thickness_order",
29 "Quadrature order in out of plane direction"););
31 template <ComputeStage compute_stage>
33 : ADMaterial<compute_stage>(parameters)
36 std::unique_ptr<QGauss> t_qrule = libmesh_make_unique<QGauss>(
37 1, Utility::string_to_enum<Order>(getParam<std::string>(
"through_thickness_order")));
45 for (
unsigned int t = 0; t <
_t_points.size(); ++t)
48 &getADMaterialProperty<RankFourTensor>(
"elasticity_tensor_t_points_" + std::to_string(t));
49 _stress[t] = &declareADProperty<RankTwoTensor>(
"stress_t_points_" + std::to_string(t));
51 &getMaterialPropertyOldByName<RankTwoTensor>(
"stress_t_points_" + std::to_string(t));
53 &getADMaterialProperty<RankTwoTensor>(
"strain_increment_t_points_" + std::to_string(t));
56 &getMaterialProperty<RankTwoTensor>(
"rotation_t_points_" + std::to_string(t));
58 &declareProperty<RankTwoTensor>(
"global_stress_t_points_" + std::to_string(t));
62 template <ComputeStage compute_stage>
67 for (
unsigned int i = 0; i < _t_points.size(); ++i)
68 (*_stress[i])[_qp].zero();
71 template <ComputeStage compute_stage>
75 for (
unsigned int i = 0; i < _t_points.size(); ++i)
78 (*_stress_old[i])[_qp] + (*_elasticity_tensor[i])[_qp] * (*_strain_increment[i])[_qp];
80 for (
unsigned int ii = 0; ii < 3; ++ii)
81 for (
unsigned int jj = 0; jj < 3; ++jj)
82 _unrotated_stress(ii, jj) = MetaPhysicL::raw_value((*_stress[i])[_qp](ii, jj));
83 (*_global_stress[i])[_qp] =
84 (*_rotation_matrix[i])[_qp].transpose() * _unrotated_stress * (*_rotation_matrix[i])[_qp];