20 params.addClassDescription(
"Enrich stress divergence kernel for small-strain simulations");
21 params.addRequiredParam<
unsigned int>(
"component",
22 "An integer corresponding to the direction the variable "
23 "this kernel acts in. (0 for x, 1 for y, 2 for z)");
24 params.addRequiredParam<
unsigned int>(
"enrichment_component",
25 "The component of the enrichement functions");
26 params.addRequiredCoupledVar(
"displacements",
27 "The string of displacements suitable for the problem statement");
28 params.addRequiredCoupledVar(
29 "enrichment_displacements",
30 "The string of enrichment displacements suitable for the problem statement");
31 params.addParam<std::string>(
"base_name",
"Material property base name");
32 params.addRequiredParam<UserObjectName>(
"crack_front_definition",
33 "The CrackFrontDefinition user object name");
34 params.set<
bool>(
"use_displaced_mesh") =
false;
39 const InputParameters & parameters)
42 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
43 _stress(getMaterialPropertyByName<
RankTwoTensor>(_base_name +
"stress")),
44 _Jacobian_mult(getMaterialPropertyByName<
RankFourTensor>(_base_name +
"Jacobian_mult")),
45 _component(getParam<unsigned int>(
"component")),
46 _enrichment_component(getParam<unsigned int>(
"enrichment_component")),
47 _nenrich_disp(coupledComponents(
"enrichment_displacements")),
48 _ndisp(coupledComponents(
"displacements")),
60 for (
unsigned int i = 0; i <
_ndisp; ++i)
61 _disp_var[i] = coupled(
"displacements", i);
70 unsigned int crack_front_point_index =
73 for (
unsigned int i = 0; i < 4; ++i)
80 _test[_i][_qp] * grad_B);
91 unsigned int crack_front_point_index =
94 for (
unsigned int i = 0; i < 4; ++i)
99 RealVectorValue grad_test =
101 _test[_i][_qp] * grad_B;
102 RealVectorValue grad_phi =
104 _phi[_j][_qp] * grad_B;
113 unsigned int coupled_component = 0;
114 unsigned int coupled_enrichment_component = 0;
116 bool active_enrich(
false);
122 coupled_component = i / 4;
123 coupled_enrichment_component = i % 4;
124 active_enrich =
true;
128 for (
unsigned int i = 0; i <
_disp_var.size(); ++i)
132 coupled_component = i;
143 unsigned int crack_front_point_index =
146 for (
unsigned int i = 0; i < 4; ++i)
150 RealVectorValue grad_B_phi(
_dBX[coupled_enrichment_component]);
152 RealVectorValue grad_test =
154 _test[_i][_qp] * grad_B_test;
155 RealVectorValue grad_phi = _grad_phi[_j][_qp] * (
_B[coupled_enrichment_component] -
156 _BJ[coupled_enrichment_component]) +
157 _phi[_j][_qp] * grad_B_phi;
167 unsigned int crack_front_point_index =
170 for (
unsigned int i = 0; i < 4; ++i)
175 RealVectorValue grad_test =
177 _test[_i][_qp] * grad_B_test;