54 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
55 _use_large_rotation(getParam<bool>(
"use_large_rotation")),
56 _rotation_total_hill(_use_large_rotation ? &declareGenericProperty<
RankTwoTensor, is_ad>(
57 _base_name +
"rotation_total_hill")
59 _rotation_total_hill_old(_use_large_rotation
60 ? &this->template getMaterialPropertyOldByName<
RankTwoTensor>(
61 _base_name +
"rotation_total_hill")
63 _rotation_increment(_use_large_rotation ? &getGenericMaterialProperty<
RankTwoTensor, is_ad>(
66 _hill_constants_input(getParam<
std::vector<Real>>(
"hill_constants")),
68 _hill_constant_material(declareProperty<
std::vector<Real>>(_base_name +
"hill_constants")),
69 _hill_tensor_material(_use_large_rotation
70 ? &declareProperty<DenseMatrix<Real>>(_base_name +
"hill_tensor")
72 _zxz_angles(isParamValid(
"rotation_angles") ? getParam<RealVectorValue>(
"rotation_angles")
73 : RealVectorValue(0.0, 0.0, 0.0)),
74 _transformation_tensor(6, 6),
75 _has_temp(isParamValid(
"temperature")),
76 _temperature(_has_temp ? coupledValue(
"temperature") : _zero),
77 _function_names(getParam<
std::vector<FunctionName>>(
"function_names")),
78 _num_functions(_function_names.size()),
79 _functions(_num_functions),
80 _rigid_body_rotation_tensor(_zxz_angles)
83 for (
unsigned i = 0; i < 3; i++)
88 "Six functions need to be provided to determine the evolution of Hill's "
89 "coefficients F, G, H, L, M, and N, when temperature dependency is selected.");
95 paramError(
"function_names",
"Function names provided cannot retrieve a function.");
118 if (_use_large_rotation)
120 (*_rotation_total_hill)[_qp] = (*_rotation_increment)[_qp] * (*_rotation_total_hill_old)[_qp];
123 _hill_constant_material[_qp].resize(6);
124 _hill_constant_material[_qp] = _hill_constants_input;
130 _hill_constant_material[_qp].resize(6);
132 for (
unsigned int i = 0; i < 6; i++)
133 _hill_constant_material[_qp][i] = _functions[i]->value(_temperature[_qp]);
138 if (_has_temp || _use_large_rotation)
139 rotateHillConstants(_hill_constant_material[_qp]);
142 if (_use_large_rotation)
143 (*_hill_tensor_material)[_qp] = _hill_tensor;
146 if (!_use_large_rotation)
148 _hill_constant_material[_qp].resize(6);
149 _hill_constant_material[_qp][0] = -_hill_tensor(1, 2);
150 _hill_constant_material[_qp][1] = -_hill_tensor(0, 2);
151 _hill_constant_material[_qp][2] = -_hill_tensor(0, 1);
152 _hill_constant_material[_qp][3] = _hill_tensor(4, 4) / 2.0;
153 _hill_constant_material[_qp][4] = _hill_tensor(5, 5) / 2.0;
154 _hill_constant_material[_qp][5] = _hill_tensor(3, 3) / 2.0;
165 if (_use_large_rotation)
166 total_rotation_matrix =
169 total_rotation_matrix = _rigid_body_rotation_tensor;
173 const Real & F = hill_constants_input[0];
174 const Real & G = hill_constants_input[1];
175 const Real &
H = hill_constants_input[2];
176 const Real & L = hill_constants_input[3];
177 const Real &
M = hill_constants_input[4];
178 const Real & N = hill_constants_input[5];
182 _hill_tensor(0, 0) = G +
H;
183 _hill_tensor(1, 1) = F +
H;
184 _hill_tensor(2, 2) = F + G;
185 _hill_tensor(0, 1) = _hill_tensor(1, 0) = -
H;
186 _hill_tensor(0, 2) = _hill_tensor(2, 0) = -G;
187 _hill_tensor(1, 2) = _hill_tensor(2, 1) = -F;
189 _hill_tensor(3, 3) = 2.0 * N;
190 _hill_tensor(4, 4) = 2.0 * L;
191 _hill_tensor(5, 5) = 2.0 *
M;
197 DenseMatrix<Real> transformation_matrix_n(6, 6);
198 const static std::array<std::size_t, 3>
a = {{1, 0, 0}};
199 const static std::array<std::size_t, 3>
b = {{2, 2, 1}};
200 for (std::size_t i = 0; i < 3; ++i)
201 for (std::size_t j = 0; j < 3; ++j)
203 transformation_matrix_n(i, j) = trm(i, j) * trm(i, j);
204 transformation_matrix_n(i + 3, j) = 2.0 * trm((i + 1) % 3, j) * trm((i + 2) % 3, j);
205 transformation_matrix_n(j, i + 3) = trm(j, (i + 1) % 3) * trm(j, (i + 2) % 3);
206 transformation_matrix_n(i + 3, j + 3) =
207 trm(
a[i],
a[j]) * trm(
b[i],
b[j]) + trm(
a[i],
b[j]) * trm(
b[i],
a[j]);
210 _hill_tensor.left_multiply(transformation_matrix_n);
211 _hill_tensor.right_multiply_transpose(transformation_matrix_n);