20 params.
addClassDescription(
"Build and rotate the Hill Tensor. It can be used with other Hill " 21 "plasticity and creep materials.");
22 params.
addParam<std::string>(
"base_name",
23 "Optional parameter that allows the user to define " 24 "multiple mechanics material systems on the same " 25 "block, i.e. for multiple phases");
27 "hill_constants_size = 6",
28 "Hill material constants in order: F, " 32 "Provide the rotation angles for the transformation matrix. " 33 "This should be a vector that provides " 34 "the rotation angles about z-, x-, and z-axis, respectively in degrees.");
35 params.
addParam<std::vector<FunctionName>>(
38 "A set of functions that describe the evolution of anisotropy with temperature");
42 "Whether to rotate the Hill tensor (anisotropic parameters) to account for large kinematic " 43 "rotations. It's recommended to set it to true if large displacements are to be expected.");
44 params.
addParam<
bool>(
"use_automatic_differentiation",
46 "Whether thermal contact depends on automatic differentiation materials.");
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")
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.");
102 template <
bool is_ad>
106 if (_use_large_rotation)
109 (*_rotation_total_hill)[_qp] = identity_rotation;
113 template <
bool is_ad>
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;
158 template <
bool is_ad>
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;
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);
const std::vector< FunctionName > _function_names
Function names.
virtual void initQpStatefulProperties() override
registerMooseObject("SolidMechanicsApp", HillConstants)
static const std::string F
static const std::string G
const bool _has_temp
Flag to determine if temperature is supplied by the user.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static InputParameters validParams()
virtual void rotateHillConstants(const std::vector< Real > &hill_constants_input)
HillConstantsTempl(const InputParameters ¶meters)
void paramError(const std::string ¶m, Args... args) const
RealVectorValue _zxz_angles
Euler angles for transformation of hill tensor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Function & getFunctionByName(const FunctionName &name) const
virtual void computeQpProperties() override
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const std::vector< Real > _hill_constants_input
Hill constants for orthotropic inelasticity.
std::vector< const Function * > _functions
The functions describing the temperature dependence.
const unsigned int _num_functions
Number of function names.
static InputParameters validParams()
const bool _use_large_rotation
Flag to determine whether to rotate Hill's tensor with large strain kinematics.
This class defines a Hill tensor material object with a given base name.