11 #include "MooseMesh.h"
13 #include "NonlinearSystem.h"
14 #include "MooseVariable.h"
17 #include "libmesh/quadrature.h"
18 #include "libmesh/utility.h"
28 params.addClassDescription(
"Compute a infinitesimal/large strain increment for the beam.");
29 params.addRequiredCoupledVar(
30 "rotations",
"The rotations appropriate for the simulation geometry and coordinate system");
31 params.addRequiredCoupledVar(
33 "The displacements appropriate for the simulation geometry and coordinate system");
35 "Orientation of the y direction along "
36 "with Iyy is provided. This should be "
37 "perpendicular to the axis of the beam.");
38 params.addRequiredCoupledVar(
40 "Cross-section area of the beam. Can be supplied as either a number or a variable name.");
41 params.addCoupledVar(
"Ay",
43 "First moment of area of the beam about y axis. Can be supplied "
44 "as either a number or a variable name.");
45 params.addCoupledVar(
"Az",
47 "First moment of area of the beam about z axis. Can be supplied "
48 "as either a number or a variable name.");
49 params.addCoupledVar(
"Ix",
50 "Second moment of area of the beam about x axis. Can be "
51 "supplied as either a number or a variable name. Defaults to Iy+Iz.");
52 params.addRequiredCoupledVar(
"Iy",
53 "Second moment of area of the beam about y axis. Can be "
54 "supplied as either a number or a variable name.");
55 params.addRequiredCoupledVar(
"Iz",
56 "Second moment of area of the beam about z axis. Can be "
57 "supplied as either a number or a variable name.");
58 params.addParam<
bool>(
"large_strain",
false,
"Set to true if large strain are to be calculated.");
59 params.addParam<std::vector<MaterialPropertyName>>(
60 "eigenstrain_names",
"List of beam eigenstrains to be applied in this strain calculation.");
61 params.addParam<FunctionName>(
62 "elasticity_prefactor",
63 "Optional function to use as a scalar prefactor on the elasticity vector for the beam.");
68 : Material(parameters),
69 _has_Ix(isParamValid(
"Ix")),
70 _nrot(coupledComponents(
"rotations")),
71 _ndisp(coupledComponents(
"displacements")),
74 _area(coupledValue(
"area")),
75 _Ay(coupledValue(
"Ay")),
76 _Az(coupledValue(
"Az")),
77 _Iy(coupledValue(
"Iy")),
78 _Iz(coupledValue(
"Iz")),
79 _Ix(_has_Ix ? coupledValue(
"Ix") : _zero),
80 _original_length(declareProperty<Real>(
"original_length")),
81 _total_rotation(declareProperty<
RankTwoTensor>(
"total_rotation")),
82 _total_disp_strain(declareProperty<RealVectorValue>(
"total_disp_strain")),
83 _total_rot_strain(declareProperty<RealVectorValue>(
"total_rot_strain")),
84 _total_disp_strain_old(getMaterialPropertyOld<RealVectorValue>(
"total_disp_strain")),
85 _total_rot_strain_old(getMaterialPropertyOld<RealVectorValue>(
"total_rot_strain")),
86 _mech_disp_strain_increment(declareProperty<RealVectorValue>(
"mech_disp_strain_increment")),
87 _mech_rot_strain_increment(declareProperty<RealVectorValue>(
"mech_rot_strain_increment")),
88 _material_stiffness(getMaterialPropertyByName<RealVectorValue>(
"material_stiffness")),
93 _K22_cross(declareProperty<
RankTwoTensor>(
"Jacobian_22_cross")),
94 _large_strain(getParam<bool>(
"large_strain")),
95 _eigenstrain_names(getParam<std::vector<MaterialPropertyName>>(
"eigenstrain_names")),
96 _disp_eigenstrain(_eigenstrain_names.size()),
97 _rot_eigenstrain(_eigenstrain_names.size()),
98 _disp_eigenstrain_old(_eigenstrain_names.size()),
99 _rot_eigenstrain_old(_eigenstrain_names.size()),
100 _nonlinear_sys(_fe_problem.getNonlinearSystemBase()),
101 _soln_disp_index_0(_ndisp),
102 _soln_disp_index_1(_ndisp),
103 _soln_rot_index_0(_ndisp),
104 _soln_rot_index_1(_ndisp),
105 _initial_rotation(declareProperty<
RankTwoTensor>(
"initial_rotation")),
106 _effective_stiffness(declareProperty<Real>(
"effective_stiffness")),
107 _prefactor_function(isParamValid(
"elasticity_prefactor") ? &getFunction(
"elasticity_prefactor")
112 mooseError(
"ComputeIncrementalBeamStrain: The number of variables supplied in 'displacements' "
113 "and 'rotations' must match.");
116 for (
unsigned int i = 0; i <
_ndisp; ++i)
118 MooseVariable * disp_variable = getVar(
"displacements", i);
121 MooseVariable * rot_variable = getVar(
"rotations", i);
122 _rot_num[i] = rot_variable->number();
126 mooseError(
"ComputeIncrementalBeamStrain: Large strain calculation does not currently "
127 "support asymmetric beam configurations with non-zero first or third moments of "
145 const std::vector<RealGradient> * orientation =
146 &_subproblem.assembly(_tid).getFE(FEType(), 1)->get_dxyzdxi();
148 x_orientation /= x_orientation.norm();
150 RealGradient y_orientation = getParam<RealGradient>(
"y_orientation");
151 y_orientation /= y_orientation.norm();
152 Real sum = x_orientation(0) * y_orientation(0) + x_orientation(1) * y_orientation(1) +
153 x_orientation(2) * y_orientation(2);
155 if (std::abs(sum) > 1e-4)
156 mooseError(
"ComputeIncrementalBeamStrain: y_orientation should be perpendicular to "
157 "the axis of the beam.");
161 z_orientation(0) = (x_orientation(1) * y_orientation(2) - x_orientation(2) * y_orientation(1));
162 z_orientation(1) = (x_orientation(2) * y_orientation(0) - x_orientation(0) * y_orientation(2));
163 z_orientation(2) = (x_orientation(0) * y_orientation(1) - x_orientation(1) * y_orientation(0));
178 RealVectorValue temp;
187 std::vector<const Node *> node;
188 for (
unsigned int i = 0; i < 2; ++i)
189 node.push_back(_current_elem->node_ptr(i));
195 for (
unsigned int i = 0; i <
_ndisp; ++i)
196 dxyz(i) = (*node[1])(i) - (*node[0])(i);
201 const NumericVector<Number> & sol = *
_nonlinear_sys.currentSolution();
202 const NumericVector<Number> & sol_old =
_nonlinear_sys.solutionOld();
204 for (
unsigned int i = 0; i <
_ndisp; ++i)
223 for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
226 if (_fe_problem.currentlyComputingJacobian())
233 const Real A_avg = (
_area[0] +
_area[1]) / 2.0;
234 const Real Iz_avg = (
_Iz[0] +
_Iz[1]) / 2.0;
243 const RealVectorValue avg_rot(
336 Real effec_stiff_1 = std::max(c1_paper, c2_paper);
338 Real effec_stiff_2 = 2 / (c2_paper * std::sqrt(A_avg / Iz_avg));
352 const Real A_avg = (
_area[0] +
_area[1]) / 2.0;
353 const Real Iy_avg = (
_Iy[0] +
_Iy[1]) / 2.0;
354 const Real Iz_avg = (
_Iz[0] +
_Iz[1]) / 2.0;
355 Real Ix_avg = (
_Ix[0] +
_Ix[1]) / 2.0;
357 Ix_avg = Iy_avg + Iz_avg;
373 K21_local(2, 1) = shear_modulus * A_avg * 0.5;
374 K21_local(1, 2) = -shear_modulus * A_avg * 0.5;
389 K22_local_cross(1, 1) += 2.0 * shear_modulus * A_avg *
_original_length[0] / 4.0;
390 K22_local_cross(2, 2) += 2.0 * shear_modulus * A_avg *
_original_length[0] / 4.0;
414 k1_large_11(0, 1) = k1_large_11(1, 0);
425 k1_large_11(0, 2) = k1_large_11(2, 0);
426 k1_large_11(1, 2) = k1_large_11(2, 1);
448 k1_large_21(0, 1) = k1_large_21(1, 0);
454 k1_large_21(0, 2) = k1_large_21(2, 0);
455 k1_large_21(1, 2) = k1_large_21(2, 1);
476 k1_large_22(0, 1) = k1_large_22(1, 0);
486 k1_large_22(0, 2) = k1_large_22(2, 0);
487 k1_large_22(1, 2) = k1_large_22(2, 1);
507 k2_large_11(0, 1) = k2_large_11(1, 0);
511 k2_large_11(0, 2) = k2_large_11(2, 0);
523 k2_large_22(0, 1) = k2_large_22(1, 0);
528 k2_large_22(0, 2) = k2_large_22(2, 0);
546 k3_large_22(0, 1) = k3_large_22(1, 0);
552 k3_large_22(0, 2) = k3_large_22(2, 0);
557 k3_large_22 *= 1.0 / 16.0;
561 k3_large_21(0, 0) = -1.0 / 6.0 *
601 k3_large_22 += 1.0 / 8.0 /
_original_length[0] * (k4_large_22 + k4_large_22.transpose());