www.mooseframework.org
ComputeIncrementalBeamStrain.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "MooseMesh.h"
12 #include "Assembly.h"
13 #include "NonlinearSystem.h"
14 #include "MooseVariable.h"
15 #include "Function.h"
16 
17 #include "libmesh/quadrature.h"
18 #include "libmesh/utility.h"
19 
21 
23 
24 InputParameters
26 {
27  InputParameters params = Material::validParams();
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(
32  "displacements",
33  "The displacements appropriate for the simulation geometry and coordinate system");
34  params.addRequiredParam<RealGradient>("y_orientation",
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(
39  "area",
40  "Cross-section area of the beam. Can be supplied as either a number or a variable name.");
41  params.addCoupledVar("Ay",
42  0.0,
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",
46  0.0,
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.");
64  return params;
65 }
66 
68  : Material(parameters),
69  _has_Ix(isParamValid("Ix")),
70  _nrot(coupledComponents("rotations")),
71  _ndisp(coupledComponents("displacements")),
72  _rot_num(_nrot),
73  _disp_num(_ndisp),
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")),
89  _K11(declareProperty<RankTwoTensor>("Jacobian_11")),
90  _K21_cross(declareProperty<RankTwoTensor>("Jacobian_12")),
91  _K21(declareProperty<RankTwoTensor>("Jacobian_21")),
92  _K22(declareProperty<RankTwoTensor>("Jacobian_22")),
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")
108  : nullptr)
109 {
110  // Checking for consistency between length of the provided displacements and rotations vector
111  if (_ndisp != _nrot)
112  mooseError("ComputeIncrementalBeamStrain: The number of variables supplied in 'displacements' "
113  "and 'rotations' must match.");
114 
115  // fetch coupled variables and gradients (as stateful properties if necessary)
116  for (unsigned int i = 0; i < _ndisp; ++i)
117  {
118  MooseVariable * disp_variable = getVar("displacements", i);
119  _disp_num[i] = disp_variable->number();
120 
121  MooseVariable * rot_variable = getVar("rotations", i);
122  _rot_num[i] = rot_variable->number();
123  }
124 
125  if (_large_strain && (_Ay[0] > 0.0 || _Ay[1] > 0.0 || _Az[0] > 0.0 || _Az[1] > 0.0))
126  mooseError("ComputeIncrementalBeamStrain: Large strain calculation does not currently "
127  "support asymmetric beam configurations with non-zero first or third moments of "
128  "area.");
129 
130  for (unsigned int i = 0; i < _eigenstrain_names.size(); ++i)
131  {
132  _disp_eigenstrain[i] = &getMaterialProperty<RealVectorValue>("disp_" + _eigenstrain_names[i]);
133  _rot_eigenstrain[i] = &getMaterialProperty<RealVectorValue>("rot_" + _eigenstrain_names[i]);
135  &getMaterialPropertyOld<RealVectorValue>("disp_" + _eigenstrain_names[i]);
137  &getMaterialPropertyOld<RealVectorValue>("rot_" + _eigenstrain_names[i]);
138  }
139 }
140 
141 void
143 {
144  // compute initial orientation of the beam for calculating initial rotation matrix
145  const std::vector<RealGradient> * orientation =
146  &_subproblem.assembly(_tid).getFE(FEType(), 1)->get_dxyzdxi();
147  RealGradient x_orientation = (*orientation)[0];
148  x_orientation /= x_orientation.norm();
149 
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);
154 
155  if (std::abs(sum) > 1e-4)
156  mooseError("ComputeIncrementalBeamStrain: y_orientation should be perpendicular to "
157  "the axis of the beam.");
158 
159  // Calculate z orientation as a cross product of the x and y orientations
160  RealGradient z_orientation;
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));
164 
165  // Rotation matrix from global to original beam local configuration
166  _original_local_config(0, 0) = x_orientation(0);
167  _original_local_config(0, 1) = x_orientation(1);
168  _original_local_config(0, 2) = x_orientation(2);
169  _original_local_config(1, 0) = y_orientation(0);
170  _original_local_config(1, 1) = y_orientation(1);
171  _original_local_config(1, 2) = y_orientation(2);
172  _original_local_config(2, 0) = z_orientation(0);
173  _original_local_config(2, 1) = z_orientation(1);
174  _original_local_config(2, 2) = z_orientation(2);
175 
177 
178  RealVectorValue temp;
179  _total_disp_strain[_qp] = temp;
180  _total_rot_strain[_qp] = temp;
181 }
182 
183 void
185 {
186  // fetch the two end nodes for current element
187  std::vector<const Node *> node;
188  for (unsigned int i = 0; i < 2; ++i)
189  node.push_back(_current_elem->node_ptr(i));
190 
191  // calculate original length of a beam element
192  // Nodal positions do not change with time as undisplaced mesh is used by material classes by
193  // default
194  RealGradient dxyz;
195  for (unsigned int i = 0; i < _ndisp; ++i)
196  dxyz(i) = (*node[1])(i) - (*node[0])(i);
197 
198  _original_length[0] = dxyz.norm();
199 
200  // Fetch the solution for the two end nodes at time t
201  const NumericVector<Number> & sol = *_nonlinear_sys.currentSolution();
202  const NumericVector<Number> & sol_old = _nonlinear_sys.solutionOld();
203 
204  for (unsigned int i = 0; i < _ndisp; ++i)
205  {
206  _soln_disp_index_0[i] = node[0]->dof_number(_nonlinear_sys.number(), _disp_num[i], 0);
207  _soln_disp_index_1[i] = node[1]->dof_number(_nonlinear_sys.number(), _disp_num[i], 0);
208  _soln_rot_index_0[i] = node[0]->dof_number(_nonlinear_sys.number(), _rot_num[i], 0);
209  _soln_rot_index_1[i] = node[1]->dof_number(_nonlinear_sys.number(), _rot_num[i], 0);
210 
211  _disp0(i) = sol(_soln_disp_index_0[i]) - sol_old(_soln_disp_index_0[i]);
212  _disp1(i) = sol(_soln_disp_index_1[i]) - sol_old(_soln_disp_index_1[i]);
213  _rot0(i) = sol(_soln_rot_index_0[i]) - sol_old(_soln_rot_index_0[i]);
214  _rot1(i) = sol(_soln_rot_index_1[i]) - sol_old(_soln_rot_index_1[i]);
215  }
216 
217  // For small rotation problems, the rotation matrix is essentially the transformation from the
218  // global to original beam local configuration and is never updated. This method has to be
219  // overriden for scenarios with finite rotation
220  computeRotation();
222 
223  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
224  computeQpStrain();
225 
226  if (_fe_problem.currentlyComputingJacobian())
228 }
229 
230 void
232 {
233  const Real A_avg = (_area[0] + _area[1]) / 2.0;
234  const Real Iz_avg = (_Iz[0] + _Iz[1]) / 2.0;
235  Real Ix = _Ix[_qp];
236  if (!_has_Ix)
237  Ix = _Iy[_qp] + _Iz[_qp];
238 
239  // Rotate the gradient of displacements and rotations at t+delta t from global coordinate
240  // frame to beam local coordinate frame
241  const RealVectorValue grad_disp_0(1.0 / _original_length[0] * (_disp1 - _disp0));
242  const RealVectorValue grad_rot_0(1.0 / _original_length[0] * (_rot1 - _rot0));
243  const RealVectorValue avg_rot(
244  0.5 * (_rot0(0) + _rot1(0)), 0.5 * (_rot0(1) + _rot1(1)), 0.5 * (_rot0(2) + _rot1(2)));
245 
246  _grad_disp_0_local_t = _total_rotation[0] * grad_disp_0;
247  _grad_rot_0_local_t = _total_rotation[0] * grad_rot_0;
248  _avg_rot_local_t = _total_rotation[0] * avg_rot;
249 
250  // displacement at any location on beam in local coordinate system at t
251  // u_1 = u_n1 - rot_3 * y + rot_2 * z
252  // u_2 = u_n2 - rot_1 * z
253  // u_3 = u_n3 + rot_1 * y
254  // where u_n1, u_n2, u_n3 are displacements at neutral axis
255 
256  // small strain
257  // e_11 = u_1,1 = u_n1, 1 - rot_3, 1 * y + rot_2, 1 * z
258  // e_12 = 2 * 0.5 * (u_1,2 + u_2,1) = (- rot_3 + u_n2,1 - rot_1,1 * z)
259  // e_13 = 2 * 0.5 * (u_1,3 + u_3,1) = (rot_2 + u_n3,1 + rot_1,1 * y)
260 
261  // axial and shearing strains at each qp along the length of the beam
263  _grad_rot_0_local_t(2) * _Ay[_qp] +
264  _grad_rot_0_local_t(1) * _Az[_qp];
265  _mech_disp_strain_increment[_qp](1) = -_avg_rot_local_t(2) * _area[_qp] +
266  _grad_disp_0_local_t(1) * _area[_qp] -
267  _grad_rot_0_local_t(0) * _Az[_qp];
269  _grad_disp_0_local_t(2) * _area[_qp] +
270  _grad_rot_0_local_t(0) * _Ay[_qp];
271 
272  // rotational strains at each qp along the length of the beam
273  // rot_strain_1 = integral(e_13 * y - e_12 * z) dA
274  // rot_strain_2 = integral(e_11 * z) dA
275  // rot_strain_3 = integral(e_11 * y) dA
276  // Iyz is the product moment of inertia which is zero for most cross-sections so it is assumed to
277  // be zero for this analysis
278  const Real Iyz = 0;
280  _avg_rot_local_t(1) * _Ay[_qp] + _grad_disp_0_local_t(2) * _Ay[_qp] +
281  _grad_rot_0_local_t(0) * Ix + _avg_rot_local_t(2) * _Az[_qp] -
282  _grad_disp_0_local_t(1) * _Az[_qp];
284  _grad_rot_0_local_t(2) * Iyz +
285  _grad_rot_0_local_t(1) * _Iz[_qp];
287  _grad_rot_0_local_t(2) * _Iy[_qp] +
288  _grad_rot_0_local_t(1) * Iyz;
289 
290  if (_large_strain)
291  {
292  _mech_disp_strain_increment[_qp](0) +=
293  0.5 *
294  ((Utility::pow<2>(_grad_disp_0_local_t(0)) + Utility::pow<2>(_grad_disp_0_local_t(1)) +
295  Utility::pow<2>(_grad_disp_0_local_t(2))) *
296  _area[_qp] +
297  Utility::pow<2>(_grad_rot_0_local_t(2)) * _Iy[_qp] +
298  Utility::pow<2>(_grad_rot_0_local_t(1)) * _Iz[_qp] +
299  Utility::pow<2>(_grad_rot_0_local_t(0)) * Ix);
302  _area[_qp];
305  _area[_qp];
306 
311  _Iz[_qp];
314  _Iy[_qp];
315  }
316 
317  _total_disp_strain[_qp] = _total_rotation[0].transpose() * _mech_disp_strain_increment[_qp] +
319  _total_rot_strain[_qp] = _total_rotation[0].transpose() * _mech_rot_strain_increment[_qp] +
321 
322  // Convert eigenstrain increment from global to beam local coordinate system and remove eigen
323  // strain increment
324  for (unsigned int i = 0; i < _eigenstrain_names.size(); ++i)
325  {
327  _total_rotation[0] * ((*_disp_eigenstrain[i])[_qp] - (*_disp_eigenstrain_old[i])[_qp]) *
328  _area[_qp];
330  _total_rotation[0] * ((*_rot_eigenstrain[i])[_qp] - (*_rot_eigenstrain_old[i])[_qp]);
331  }
332 
333  Real c1_paper = std::sqrt(_material_stiffness[0](0));
334  Real c2_paper = std::sqrt(_material_stiffness[0](1));
335 
336  Real effec_stiff_1 = std::max(c1_paper, c2_paper);
337 
338  Real effec_stiff_2 = 2 / (c2_paper * std::sqrt(A_avg / Iz_avg));
339 
340  _effective_stiffness[_qp] = std::max(effec_stiff_1, _original_length[0] / effec_stiff_2);
341 
343  _effective_stiffness[_qp] *= std::sqrt(_prefactor_function->value(_t, _q_point[_qp]));
344 }
345 
346 void
348 {
349  const Real youngs_modulus = _material_stiffness[0](0);
350  const Real shear_modulus = _material_stiffness[0](1);
351 
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;
356  if (!_has_Ix)
357  Ix_avg = Iy_avg + Iz_avg;
358 
359  // K = |K11 K12|
360  // |K21 K22|
361 
362  // relation between translational displacements at node 0 and translational forces at node 0
363  RankTwoTensor K11_local;
364  K11_local.zero();
365  K11_local(0, 0) = youngs_modulus * A_avg / _original_length[0];
366  K11_local(1, 1) = shear_modulus * A_avg / _original_length[0];
367  K11_local(2, 2) = shear_modulus * A_avg / _original_length[0];
368  _K11[0] = _total_rotation[0].transpose() * K11_local * _total_rotation[0];
369 
370  // relation between displacements at node 0 and rotational moments at node 0
371  RankTwoTensor K21_local;
372  K21_local.zero();
373  K21_local(2, 1) = shear_modulus * A_avg * 0.5;
374  K21_local(1, 2) = -shear_modulus * A_avg * 0.5;
375  _K21[0] = _total_rotation[0].transpose() * K21_local * _total_rotation[0];
376 
377  // relation between rotations at node 0 and rotational moments at node 0
378  RankTwoTensor K22_local;
379  K22_local.zero();
380  K22_local(0, 0) = shear_modulus * Ix_avg / _original_length[0];
381  K22_local(1, 1) = youngs_modulus * Iz_avg / _original_length[0] +
382  shear_modulus * A_avg * _original_length[0] / 4.0;
383  K22_local(2, 2) = youngs_modulus * Iy_avg / _original_length[0] +
384  shear_modulus * A_avg * _original_length[0] / 4.0;
385  _K22[0] = _total_rotation[0].transpose() * K22_local * _total_rotation[0];
386 
387  // relation between rotations at node 0 and rotational moments at node 1
388  RankTwoTensor K22_local_cross = -K22_local;
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;
391  _K22_cross[0] = _total_rotation[0].transpose() * K22_local_cross * _total_rotation[0];
392 
393  // relation between displacements at node 0 and rotational moments at node 1
394  _K21_cross[0] = -_K21[0];
395 
396  // stiffness matrix for large strain
397  if (_large_strain)
398  {
399  // k1_large is the stiffness matrix obtained from sigma_xx * d(epsilon_xx)
400  RankTwoTensor k1_large_11;
401  // row 1
402  k1_large_11(0, 0) = Utility::pow<2>(_grad_disp_0_local_t(0)) +
403  1.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg +
404  1.5 * Utility::pow<2>(_grad_rot_0_local_t(1)) * Iz_avg +
405  0.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) +
406  0.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) +
407  0.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Ix_avg;
408  k1_large_11(1, 0) = 0.5 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(1) -
409  1.0 / 3.0 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(1) * Iz_avg;
410  k1_large_11(2, 0) = 0.5 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(2) -
411  1.0 / 3.0 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(2) * Iy_avg;
412 
413  // row 2
414  k1_large_11(0, 1) = k1_large_11(1, 0);
415  k1_large_11(1, 1) = Utility::pow<2>(_grad_disp_0_local_t(1)) +
416  1.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iz_avg +
417  0.5 * Utility::pow<2>(_grad_disp_0_local_t(0)) +
418  0.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) +
419  0.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg +
420  0.5 * Utility::pow<2>(_grad_rot_0_local_t(1)) * Iz_avg +
421  0.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iy_avg;
422  k1_large_11(2, 1) = 0.5 * _grad_disp_0_local_t(1) * _grad_disp_0_local_t(2);
423 
424  // row 3
425  k1_large_11(0, 2) = k1_large_11(2, 0);
426  k1_large_11(1, 2) = k1_large_11(2, 1);
427  k1_large_11(2, 2) = Utility::pow<2>(_grad_disp_0_local_t(2)) +
428  1.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iy_avg +
429  0.5 * Utility::pow<2>(_grad_disp_0_local_t(0)) +
430  0.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) +
431  0.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iz_avg +
432  0.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg +
433  0.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iz_avg;
434 
435  k1_large_11 *= 1.0 / 4.0 / Utility::pow<2>(_original_length[0]);
436 
437  RankTwoTensor k1_large_21;
438  // row 1
439  k1_large_21(0, 0) = 0.5 * _grad_disp_0_local_t(0) * _grad_rot_0_local_t(0) * (Ix_avg)-1.0 /
440  3.0 * _grad_disp_0_local_t(1) * _grad_rot_0_local_t(1) * Iz_avg -
441  1.0 / 3.0 * _grad_disp_0_local_t(2) * _grad_rot_0_local_t(2);
442  k1_large_21(1, 0) = 1.5 * _grad_disp_0_local_t(0) * _grad_rot_0_local_t(1) * Iz_avg -
443  1.0 / 3.0 * _grad_disp_0_local_t(1) * _grad_rot_0_local_t(0) * Iz_avg;
444  k1_large_21(2, 0) = 1.5 * _grad_disp_0_local_t(0) * _grad_rot_0_local_t(2) * Iy_avg -
445  1.0 / 3.0 * _grad_disp_0_local_t(2) * _grad_rot_0_local_t(0) * Iy_avg;
446 
447  // row 2
448  k1_large_21(0, 1) = k1_large_21(1, 0);
449  k1_large_21(1, 1) = 0.5 * _grad_disp_0_local_t(1) * _grad_rot_0_local_t(1) * Iz_avg -
450  1.0 / 3.0 * _grad_disp_0_local_t(0) * _grad_rot_0_local_t(0) * Iz_avg;
451  k1_large_21(2, 1) = 0.5 * _grad_disp_0_local_t(1) * _grad_rot_0_local_t(2) * Iy_avg;
452 
453  // row 3
454  k1_large_21(0, 2) = k1_large_21(2, 0);
455  k1_large_21(1, 2) = k1_large_21(2, 1);
456  k1_large_21(2, 2) = 0.5 * _grad_disp_0_local_t(2) * _grad_rot_0_local_t(2) * Iy_avg -
457  1.0 / 3.0 * _grad_disp_0_local_t(0) * _grad_rot_0_local_t(0) * Iy_avg;
458  k1_large_21 *= 1.0 / 4.0 / Utility::pow<2>(_original_length[0]);
459 
460  RankTwoTensor k1_large_22;
461  // row 1
462  k1_large_22(0, 0) = Utility::pow<2>(_grad_rot_0_local_t(0)) * Utility::pow<2>(Ix_avg) +
463  1.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) * Iz_avg +
464  1.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) * Iy_avg +
465  0.5 * Utility::pow<2>(_grad_disp_0_local_t(0)) * Ix_avg +
466  0.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) * Iz_avg +
467  0.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) * Iy_avg +
468  0.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg * Ix_avg +
469  0.5 * Utility::pow<2>(_grad_rot_0_local_t(1)) * Iz_avg * Ix_avg;
470  k1_large_22(1, 0) = 0.5 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(1) * Iz_avg * Ix_avg -
471  1.0 / 3.0 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(1) * Iz_avg;
472  k1_large_22(2, 0) = 0.5 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(2) * Iy_avg * Ix_avg -
473  1.0 / 3.0 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(2) * Iy_avg;
474 
475  // row 2
476  k1_large_22(0, 1) = k1_large_22(1, 0);
477  k1_large_22(1, 1) = Utility::pow<2>(_grad_rot_0_local_t(1)) * Iz_avg * Iz_avg +
478  1.5 * Utility::pow<2>(_grad_disp_0_local_t(0)) * Iz_avg +
479  1.5 * Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg * Iz_avg +
480  0.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) * Iz_avg +
481  0.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) * Iz_avg +
482  0.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iz_avg * Ix_avg;
483  k1_large_22(2, 1) = 1.5 * _grad_rot_0_local_t(1) * _grad_rot_0_local_t(2) * Iy_avg * Iz_avg;
484 
485  // row 3
486  k1_large_22(0, 2) = k1_large_22(2, 0);
487  k1_large_22(1, 2) = k1_large_22(2, 1);
488  k1_large_22(2, 2) = Utility::pow<2>(_grad_rot_0_local_t(2)) * Iy_avg * Iy_avg +
489  1.5 * Utility::pow<2>(_grad_disp_0_local_t(0)) * Iy_avg +
490  1.5 * Utility::pow<2>(_grad_rot_0_local_t(1)) * Iy_avg * Iz_avg +
491  0.5 * Utility::pow<2>(_grad_disp_0_local_t(1)) * Iy_avg +
492  0.5 * Utility::pow<2>(_grad_disp_0_local_t(2)) * Iy_avg +
493  0.5 * Utility::pow<2>(_grad_rot_0_local_t(0)) * Iz_avg * Ix_avg;
494 
495  k1_large_22 *= 1.0 / 4.0 / Utility::pow<2>(_original_length[0]);
496 
497  // k2_large and k3_large are contributions from tau_xy * d(gamma_xy) and tau_xz * d(gamma_xz)
498  // k2_large for node 1 is negative of that for node 0
499  RankTwoTensor k2_large_11;
500  // col 1
501  k2_large_11(0, 0) =
502  0.25 * Utility::pow<2>(_avg_rot_local_t(2)) + 0.25 * Utility::pow<2>(_avg_rot_local_t(1));
503  k2_large_11(1, 0) = -1.0 / 6.0 * _avg_rot_local_t(0) * _avg_rot_local_t(1);
504  k2_large_11(2, 0) = -1.0 / 6.0 * _avg_rot_local_t(0) * _avg_rot_local_t(2);
505 
506  // col 2
507  k2_large_11(0, 1) = k2_large_11(1, 0);
508  k2_large_11(1, 1) = 0.25 * _avg_rot_local_t(0);
509 
510  // col 3
511  k2_large_11(0, 2) = k2_large_11(2, 0);
512  k2_large_11(2, 2) = 0.25 * Utility::pow<2>(_avg_rot_local_t(0));
513 
514  k2_large_11 *= 1.0 / 4.0 / Utility::pow<2>(_original_length[0]);
515 
516  RankTwoTensor k2_large_22;
517  // col1
518  k2_large_22(0, 0) = 0.25 * Utility::pow<2>(_avg_rot_local_t(0)) * Ix_avg;
519  k2_large_22(1, 0) = 1.0 / 6.0 * _avg_rot_local_t(0) * _avg_rot_local_t(1) * Iz_avg;
520  k2_large_22(2, 0) = 1.0 / 6.0 * _avg_rot_local_t(0) * _avg_rot_local_t(2) * Iy_avg;
521 
522  // col2
523  k2_large_22(0, 1) = k2_large_22(1, 0);
524  k2_large_22(1, 1) = 0.25 * Utility::pow<2>(_avg_rot_local_t(2)) * Iz_avg +
525  0.25 * Utility::pow<2>(_avg_rot_local_t(1)) * Iz_avg;
526 
527  // col3
528  k2_large_22(0, 2) = k2_large_22(2, 0);
529  k2_large_22(2, 2) = 0.25 * Utility::pow<2>(_avg_rot_local_t(2)) * Iy_avg +
530  0.25 * Utility::pow<2>(_avg_rot_local_t(1)) * Iy_avg;
531 
532  k2_large_22 *= 1.0 / 4.0 / Utility::pow<2>(_original_length[0]);
533 
534  // k3_large for node 1 is same as that for node 0
535  RankTwoTensor k3_large_22;
536  // col1
537  k3_large_22(0, 0) = 0.25 * Utility::pow<2>(_grad_disp_0_local_t(2)) +
538  0.25 * _grad_rot_0_local_t(0) * Ix_avg +
539  0.25 * Utility::pow<2>(_grad_disp_0_local_t(1));
540  k3_large_22(1, 0) = -1.0 / 6.0 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(1) +
541  1.0 / 6.0 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(1) * Iz_avg;
542  k3_large_22(2, 0) = -1.0 / 6.0 * _grad_disp_0_local_t(0) * _grad_disp_0_local_t(2) +
543  1.0 / 6.0 * _grad_rot_0_local_t(0) * _grad_rot_0_local_t(2) * Iy_avg;
544 
545  // col2
546  k3_large_22(0, 1) = k3_large_22(1, 0);
547  k3_large_22(2, 2) = 0.25 * Utility::pow<2>(_grad_disp_0_local_t(0)) +
548  0.25 * _grad_rot_0_local_t(2) * Iy_avg +
549  0.25 * _grad_rot_0_local_t(1) * Iz_avg;
550 
551  // col3
552  k3_large_22(0, 2) = k3_large_22(2, 0);
553  k3_large_22(2, 2) = 0.25 * Utility::pow<2>(_grad_disp_0_local_t(0)) +
554  0.25 * _grad_rot_0_local_t(2) * Iy_avg +
555  0.25 * _grad_rot_0_local_t(1) * Iz_avg;
556 
557  k3_large_22 *= 1.0 / 16.0;
558 
559  RankTwoTensor k3_large_21;
560  // col1
561  k3_large_21(0, 0) = -1.0 / 6.0 *
564  k3_large_21(1, 0) = 0.25 * _grad_disp_0_local_t(0) * _avg_rot_local_t(1) -
565  1.0 / 6.0 * _grad_disp_0_local_t(1) * _avg_rot_local_t(0);
566  k3_large_21(2, 0) = 0.25 * _grad_disp_0_local_t(0) * _avg_rot_local_t(2) -
567  1.0 / 6.0 * _grad_disp_0_local_t(2) * _avg_rot_local_t(0);
568 
569  // col2
570  k3_large_21(0, 1) = 0.25 * _grad_disp_0_local_t(1) * _avg_rot_local_t(0) -
571  1.0 / 6.0 * _grad_disp_0_local_t(0) * _avg_rot_local_t(1);
572  k3_large_21(1, 1) = -1.0 / 6.0 * _grad_disp_0_local_t(0) * _avg_rot_local_t(0);
573 
574  // col3
575  k3_large_21(0, 2) = 0.25 * _grad_disp_0_local_t(2) * _avg_rot_local_t(0) -
576  1.0 / 6.0 * _grad_disp_0_local_t(0) * _avg_rot_local_t(2);
577  k3_large_21(2, 2) = -1.0 / 6.0 * _grad_disp_0_local_t(0) * _avg_rot_local_t(0);
578 
579  k3_large_21 *= 1.0 / 8.0 / _original_length[0];
580 
581  RankTwoTensor k4_large_22;
582  // col 1
583  k4_large_22(0, 0) = 0.25 * _grad_rot_0_local_t(0) * _avg_rot_local_t(0) * Ix_avg +
584  1.0 / 6.0 * _grad_rot_0_local_t(2) * _avg_rot_local_t(2) * Iy_avg +
585  1.0 / 6.0 * _grad_rot_0_local_t(1) * _avg_rot_local_t(1) * Iz_avg;
586  k4_large_22(1, 0) = 1.0 / 6.0 * _grad_rot_0_local_t(1) * _avg_rot_local_t(0) * Iz_avg;
587  k4_large_22(2, 0) = 1.0 / 6.0 * _grad_rot_0_local_t(2) * _avg_rot_local_t(0) * Iy_avg;
588 
589  // col2
590  k4_large_22(0, 1) = 1.0 / 6.0 * _grad_rot_0_local_t(0) * _avg_rot_local_t(1) * Iz_avg;
591  k4_large_22(1, 1) = 0.25 * _grad_rot_0_local_t(1) * _avg_rot_local_t(1) * Iz_avg +
592  1.0 / 6.0 * _grad_rot_0_local_t(0) * _avg_rot_local_t(0) * Iz_avg;
593  k4_large_22(2, 1) = 0.25 * _grad_rot_0_local_t(1) * _avg_rot_local_t(2) * Iz_avg;
594 
595  // col 3
596  k4_large_22(0, 2) = 1.0 / 6.0 * _grad_rot_0_local_t(0) * _avg_rot_local_t(2) * Iy_avg;
597  k4_large_22(1, 2) = 0.25 * _grad_rot_0_local_t(2) * _avg_rot_local_t(1) * Iy_avg;
598  k4_large_22(2, 2) = 0.25 * _grad_rot_0_local_t(2) * _avg_rot_local_t(2) * Iy_avg +
599  1.0 / 6.0 * _grad_rot_0_local_t(0) * _avg_rot_local_t(0) * Iy_avg;
600 
601  k3_large_22 += 1.0 / 8.0 / _original_length[0] * (k4_large_22 + k4_large_22.transpose());
602 
603  // Assembling final matrix
604  _K11[0] += _total_rotation[0].transpose() * (k1_large_11 + k2_large_11) * _total_rotation[0];
605  _K22[0] += _total_rotation[0].transpose() * (k1_large_22 + k2_large_22 + k3_large_22) *
606  _total_rotation[0];
607  _K21[0] += _total_rotation[0].transpose() * (k1_large_21 + k3_large_21) * _total_rotation[0];
608  _K21_cross[0] +=
609  _total_rotation[0].transpose() * (-k1_large_21 + k3_large_21) * _total_rotation[0];
610  _K22_cross[0] += _total_rotation[0].transpose() * (-k1_large_22 - k2_large_22 + k3_large_22) *
611  _total_rotation[0];
612  }
613 }
614 
615 void
617 {
619 }
ComputeIncrementalBeamStrain::_effective_stiffness
MaterialProperty< Real > & _effective_stiffness
Psuedo stiffness for critical time step computation.
Definition: ComputeIncrementalBeamStrain.h:174
ComputeIncrementalBeamStrain::_mech_disp_strain_increment
MaterialProperty< RealVectorValue > & _mech_disp_strain_increment
Mechanical displacement strain increment (after removal of eigenstrains) integrated over the cross-se...
Definition: ComputeIncrementalBeamStrain.h:103
ComputeIncrementalBeamStrain::_disp_eigenstrain
std::vector< const MaterialProperty< RealVectorValue > * > _disp_eigenstrain
Vector of current displacement eigenstrains.
Definition: ComputeIncrementalBeamStrain.h:142
ComputeIncrementalBeamStrain::_avg_rot_local_t
RealVectorValue _avg_rot_local_t
Average rotation calculated in the beam local configuration at time t.
Definition: ComputeIncrementalBeamStrain.h:136
ComputeIncrementalBeamStrain::_area
const VariableValue & _area
Coupled variable for the beam cross-sectional area.
Definition: ComputeIncrementalBeamStrain.h:64
ComputeIncrementalBeamStrain::_K11
MaterialProperty< RankTwoTensor > & _K11
Stiffness matrix between displacement DOFs of same node or across nodes.
Definition: ComputeIncrementalBeamStrain.h:112
ComputeIncrementalBeamStrain::_disp_num
std::vector< unsigned int > _disp_num
Variable numbers corresponding to the displacement variables.
Definition: ComputeIncrementalBeamStrain.h:61
ComputeIncrementalBeamStrain::_K22_cross
MaterialProperty< RankTwoTensor > & _K22_cross
Stiffness matrix between rotation DOFs of different nodes.
Definition: ComputeIncrementalBeamStrain.h:124
libMesh::RealGradient
VectorValue< Real > RealGradient
Definition: GrainForceAndTorqueInterface.h:17
defineLegacyParams
defineLegacyParams(ComputeIncrementalBeamStrain)
ComputeIncrementalBeamStrain.h
registerMooseObject
registerMooseObject("TensorMechanicsApp", ComputeIncrementalBeamStrain)
ComputeIncrementalBeamStrain::_Az
const VariableValue & _Az
Coupled variable for the first moment of area in z direction, i.e., integral of z*dA over the cross-s...
Definition: ComputeIncrementalBeamStrain.h:70
ComputeIncrementalBeamStrain::_total_rotation
MaterialProperty< RankTwoTensor > & _total_rotation
Rotational transformation from global coordinate system to beam local configuration at time t.
Definition: ComputeIncrementalBeamStrain.h:88
ComputeIncrementalBeamStrain::_rot0
RealVectorValue _rot0
Definition: ComputeIncrementalBeamStrain.h:154
ComputeIncrementalBeamStrain::_soln_disp_index_0
std::vector< unsigned int > _soln_disp_index_0
Indices of solution vector corresponding to displacement DOFs at the node 0.
Definition: ComputeIncrementalBeamStrain.h:159
ComputeIncrementalBeamStrain::_initial_rotation
MaterialProperty< RankTwoTensor > & _initial_rotation
Rotational transformation from global coordinate system to initial beam local configuration.
Definition: ComputeIncrementalBeamStrain.h:171
ComputeIncrementalBeamStrain::_total_disp_strain_old
const MaterialProperty< RealVectorValue > & _total_disp_strain_old
Old total displacement strain integrated over the cross-section in global coordinate system.
Definition: ComputeIncrementalBeamStrain.h:97
ComputeIncrementalBeamStrain::_grad_disp_0_local_t
RealVectorValue _grad_disp_0_local_t
Gradient of displacement calculated in the beam local configuration at time t.
Definition: ComputeIncrementalBeamStrain.h:130
ComputeIncrementalBeamStrain::_K21
MaterialProperty< RankTwoTensor > & _K21
Stiffness matrix between displacement DOFs and rotation DOFs of the same node.
Definition: ComputeIncrementalBeamStrain.h:118
ComputeIncrementalBeamStrain::_grad_rot_0_local_t
RealVectorValue _grad_rot_0_local_t
Gradient of rotation calculated in the beam local configuration at time t.
Definition: ComputeIncrementalBeamStrain.h:133
ComputeIncrementalBeamStrain::_total_disp_strain
MaterialProperty< RealVectorValue > & _total_disp_strain
Current total displacement strain integrated over the cross-section in global coordinate system.
Definition: ComputeIncrementalBeamStrain.h:91
ComputeIncrementalBeamStrain::_Iz
const VariableValue & _Iz
Coupled variable for the second moment of area in z direction, i.e., integral of z^2*dA over the cros...
Definition: ComputeIncrementalBeamStrain.h:76
ComputeIncrementalBeamStrain::_soln_rot_index_1
std::vector< unsigned int > _soln_rot_index_1
Indices of solution vector corresponding to rotation DOFs at the node 1.
Definition: ComputeIncrementalBeamStrain.h:168
ComputeIncrementalBeamStrain::_eigenstrain_names
std::vector< MaterialPropertyName > _eigenstrain_names
Vector of beam eigenstrain names.
Definition: ComputeIncrementalBeamStrain.h:139
ComputeIncrementalBeamStrain::_ndisp
unsigned int _ndisp
Number of coupled displacement variables.
Definition: ComputeIncrementalBeamStrain.h:55
ComputeIncrementalBeamStrain::_rot_num
std::vector< unsigned int > _rot_num
Variable numbers corresponding to the rotational variables.
Definition: ComputeIncrementalBeamStrain.h:58
ComputeIncrementalBeamStrain::_Ay
const VariableValue & _Ay
Coupled variable for the first moment of area in y direction, i.e., integral of y*dA over the cross-s...
Definition: ComputeIncrementalBeamStrain.h:67
ComputeIncrementalBeamStrain::_large_strain
const bool _large_strain
Boolean flag to turn on large strain calculation.
Definition: ComputeIncrementalBeamStrain.h:127
ComputeIncrementalBeamStrain::_K22
MaterialProperty< RankTwoTensor > & _K22
Stiffness matrix between rotation DOFs of the same node.
Definition: ComputeIncrementalBeamStrain.h:121
ComputeIncrementalBeamStrain::computeRotation
virtual void computeRotation()
Computes the rotation matrix at time t. For small rotation scenarios, the rotation matrix at time t i...
Definition: ComputeIncrementalBeamStrain.C:616
ComputeIncrementalBeamStrain::_disp1
RealVectorValue _disp1
Definition: ComputeIncrementalBeamStrain.h:154
ComputeIncrementalBeamStrain::_rot1
RealVectorValue _rot1
Definition: ComputeIncrementalBeamStrain.h:154
ComputeIncrementalBeamStrain::_total_rot_strain
MaterialProperty< RealVectorValue > & _total_rot_strain
Current total rotational strain integrated over the cross-section in global coordinate system.
Definition: ComputeIncrementalBeamStrain.h:94
ComputeIncrementalBeamStrain::_disp0
RealVectorValue _disp0
Displacement and rotations at the two nodes of the beam in the global coordinate system.
Definition: ComputeIncrementalBeamStrain.h:154
ComputeIncrementalBeamStrain::_nonlinear_sys
NonlinearSystemBase & _nonlinear_sys
Reference to the nonlinear system object.
Definition: ComputeIncrementalBeamStrain.h:157
ComputeIncrementalBeamStrain::computeProperties
virtual void computeProperties() override
Definition: ComputeIncrementalBeamStrain.C:184
ComputeIncrementalBeamStrain::_rot_eigenstrain
std::vector< const MaterialProperty< RealVectorValue > * > _rot_eigenstrain
Vector of current rotational eigenstrains.
Definition: ComputeIncrementalBeamStrain.h:145
validParams
InputParameters validParams()
ComputeIncrementalBeamStrain::computeStiffnessMatrix
void computeStiffnessMatrix()
Computes the stiffness matrices.
Definition: ComputeIncrementalBeamStrain.C:347
ComputeIncrementalBeamStrain::_Ix
const VariableValue & _Ix
Coupled variable for the second moment of area in x direction, i.e., integral of (y^2 + z^2)*dA over ...
Definition: ComputeIncrementalBeamStrain.h:79
ComputeIncrementalBeamStrain::_rot_eigenstrain_old
std::vector< const MaterialProperty< RealVectorValue > * > _rot_eigenstrain_old
Vector of old rotational eigenstrains.
Definition: ComputeIncrementalBeamStrain.h:151
ComputeIncrementalBeamStrain::_Iy
const VariableValue & _Iy
Coupled variable for the second moment of area in y direction, i.e., integral of y^2*dA over the cros...
Definition: ComputeIncrementalBeamStrain.h:73
ComputeIncrementalBeamStrain::_K21_cross
MaterialProperty< RankTwoTensor > & _K21_cross
Stiffness matrix between displacement DOFs of one node to rotational DOFs of another node.
Definition: ComputeIncrementalBeamStrain.h:115
ComputeIncrementalBeamStrain::_nrot
unsigned int _nrot
Number of coupled rotational variables.
Definition: ComputeIncrementalBeamStrain.h:52
ComputeIncrementalBeamStrain::_soln_disp_index_1
std::vector< unsigned int > _soln_disp_index_1
Indices of solution vector corresponding to displacement DOFs at the node 1.
Definition: ComputeIncrementalBeamStrain.h:162
ComputeIncrementalBeamStrain::initQpStatefulProperties
virtual void initQpStatefulProperties() override
Definition: ComputeIncrementalBeamStrain.C:142
ComputeIncrementalBeamStrain::_soln_rot_index_0
std::vector< unsigned int > _soln_rot_index_0
Indices of solution vector corresponding to rotation DOFs at the node 0.
Definition: ComputeIncrementalBeamStrain.h:165
ComputeIncrementalBeamStrain::_has_Ix
const bool _has_Ix
Booleans for validity of params.
Definition: ComputeIncrementalBeamStrain.h:49
ComputeIncrementalBeamStrain
Definition: ComputeIncrementalBeamStrain.h:27
RankTwoTensorTempl< Real >
ComputeIncrementalBeamStrain::validParams
static InputParameters validParams()
Definition: ComputeIncrementalBeamStrain.C:25
ComputeIncrementalBeamStrain::_prefactor_function
const Function *const _prefactor_function
Prefactor function to multiply the elasticity tensor with.
Definition: ComputeIncrementalBeamStrain.h:177
ComputeIncrementalBeamStrain::_original_length
MaterialProperty< Real > & _original_length
Initial length of the beam.
Definition: ComputeIncrementalBeamStrain.h:85
ComputeIncrementalBeamStrain::_original_local_config
RankTwoTensor _original_local_config
Rotational transformation from global coordinate system to initial beam local configuration.
Definition: ComputeIncrementalBeamStrain.h:82
ComputeIncrementalBeamStrain::_material_stiffness
const MaterialProperty< RealVectorValue > & _material_stiffness
Material stiffness vector that relates displacement strain increments to force increments.
Definition: ComputeIncrementalBeamStrain.h:109
ComputeIncrementalBeamStrain::ComputeIncrementalBeamStrain
ComputeIncrementalBeamStrain(const InputParameters &parameters)
Definition: ComputeIncrementalBeamStrain.C:67
ComputeIncrementalBeamStrain::_disp_eigenstrain_old
std::vector< const MaterialProperty< RealVectorValue > * > _disp_eigenstrain_old
Vector of old displacement eigenstrains.
Definition: ComputeIncrementalBeamStrain.h:148
ComputeIncrementalBeamStrain::computeQpStrain
void computeQpStrain()
Computes the displacement and rotation strain increments.
Definition: ComputeIncrementalBeamStrain.C:231
ComputeIncrementalBeamStrain::_mech_rot_strain_increment
MaterialProperty< RealVectorValue > & _mech_rot_strain_increment
Mechanical rotation strain increment (after removal of eigenstrains) integrated over the cross-sectio...
Definition: ComputeIncrementalBeamStrain.h:106