17 #include "libmesh/quadrature.h" 18 #include "libmesh/utility.h" 28 "rotations",
"The rotations appropriate for the simulation geometry and coordinate system");
31 "The displacements appropriate for the simulation geometry and coordinate system");
33 "Orientation of the y direction along " 34 "with Iyy is provided. This should be " 35 "perpendicular to the axis of the beam.");
38 "Cross-section area of the beam. Can be supplied as either a number or a variable name.");
41 "First moment of area of the beam about y axis. Can be supplied " 42 "as either a number or a variable name.");
45 "First moment of area of the beam about z axis. Can be supplied " 46 "as either a number or a variable name.");
48 "Second moment of area of the beam about x axis. Can be " 49 "supplied as either a number or a variable name. Defaults to Iy+Iz.");
51 "Second moment of area of the beam about y axis. Can be " 52 "supplied as either a number or a variable name.");
54 "Second moment of area of the beam about z axis. Can be " 55 "supplied as either a number or a variable name.");
56 params.
addParam<
bool>(
"large_strain",
false,
"Set to true if large strain are to be calculated.");
57 params.
addParam<std::vector<MaterialPropertyName>>(
60 "List of beam eigenstrains to be applied in this strain calculation.");
62 "elasticity_prefactor",
63 "Optional function to use as a scalar prefactor on the elasticity vector for the beam.");
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_local_config(declareRestartableData<
RankTwoTensor>(
"original_local_config")),
81 _original_length(declareProperty<
Real>(
"original_length")),
82 _total_rotation(declareProperty<
RankTwoTensor>(
"total_rotation")),
83 _total_disp_strain(declareProperty<
RealVectorValue>(
"total_disp_strain")),
84 _total_rot_strain(declareProperty<
RealVectorValue>(
"total_rot_strain")),
85 _total_disp_strain_old(getMaterialPropertyOld<
RealVectorValue>(
"total_disp_strain")),
86 _total_rot_strain_old(getMaterialPropertyOld<
RealVectorValue>(
"total_rot_strain")),
87 _mech_disp_strain_increment(declareProperty<
RealVectorValue>(
"mech_disp_strain_increment")),
88 _mech_rot_strain_increment(declareProperty<
RealVectorValue>(
"mech_rot_strain_increment")),
89 _material_stiffness(getMaterialPropertyByName<
RealVectorValue>(
"material_stiffness")),
94 _K22_cross(declareProperty<
RankTwoTensor>(
"Jacobian_22_cross")),
95 _large_strain(getParam<bool>(
"large_strain")),
96 _eigenstrain_names(getParam<
std::vector<MaterialPropertyName>>(
"eigenstrain_names")),
97 _disp_eigenstrain(_eigenstrain_names.size()),
98 _rot_eigenstrain(_eigenstrain_names.size()),
99 _disp_eigenstrain_old(_eigenstrain_names.size()),
100 _rot_eigenstrain_old(_eigenstrain_names.size()),
101 _nonlinear_sys(_fe_problem.getNonlinearSystemBase(0)),
102 _soln_disp_index_0(_ndisp),
103 _soln_disp_index_1(_ndisp),
104 _soln_rot_index_0(_ndisp),
105 _soln_rot_index_1(_ndisp),
106 _initial_rotation(declareProperty<
RankTwoTensor>(
"initial_rotation")),
107 _effective_stiffness(declareProperty<
Real>(
"effective_stiffness")),
108 _prefactor_function(isParamValid(
"elasticity_prefactor") ? &getFunction(
"elasticity_prefactor")
113 mooseError(
"ComputeIncrementalBeamStrain: The number of variables supplied in 'displacements' " 114 "and 'rotations' must match.");
117 for (
unsigned int i = 0; i <
_ndisp; ++i)
127 mooseError(
"ComputeIncrementalBeamStrain: Large strain calculation does not currently " 128 "support asymmetric beam configurations with non-zero first or third moments of " 146 const std::vector<RealGradient> * orientation =
149 x_orientation /= x_orientation.
norm();
151 RealGradient y_orientation = getParam<RealGradient>(
"y_orientation");
152 y_orientation /= y_orientation.
norm();
153 Real sum = x_orientation(0) * y_orientation(0) + x_orientation(1) * y_orientation(1) +
154 x_orientation(2) * y_orientation(2);
156 if (std::abs(sum) > 1e-4)
157 mooseError(
"ComputeIncrementalBeamStrain: y_orientation should be perpendicular to " 158 "the axis of the beam.");
162 z_orientation(0) = (x_orientation(1) * y_orientation(2) - x_orientation(2) * y_orientation(1));
163 z_orientation(1) = (x_orientation(2) * y_orientation(0) - x_orientation(0) * y_orientation(2));
164 z_orientation(2) = (x_orientation(0) * y_orientation(1) - x_orientation(1) * y_orientation(0));
188 std::vector<const Node *> node;
189 for (
unsigned int i = 0; i < 2; ++i)
196 for (
unsigned int i = 0; i <
_ndisp; ++i)
197 dxyz(i) = (*node[1])(i) - (*node[0])(i);
205 for (
unsigned int i = 0; i <
_ndisp; ++i)
337 Real effec_stiff_1 = std::max(c1_paper, c2_paper);
339 Real effec_stiff_2 = 2 / (c2_paper * std::sqrt(A_avg / Iz_avg));
358 Ix_avg = Iy_avg + Iz_avg;
374 K21_local(2, 1) = shear_modulus * A_avg * 0.5;
375 K21_local(1, 2) = -shear_modulus * A_avg * 0.5;
390 K22_local_cross(1, 1) += 2.0 * shear_modulus * A_avg *
_original_length[0] / 4.0;
391 K22_local_cross(2, 2) += 2.0 * shear_modulus * A_avg *
_original_length[0] / 4.0;
415 k1_large_11(0, 1) = k1_large_11(1, 0);
426 k1_large_11(0, 2) = k1_large_11(2, 0);
427 k1_large_11(1, 2) = k1_large_11(2, 1);
449 k1_large_21(0, 1) = k1_large_21(1, 0);
455 k1_large_21(0, 2) = k1_large_21(2, 0);
456 k1_large_21(1, 2) = k1_large_21(2, 1);
477 k1_large_22(0, 1) = k1_large_22(1, 0);
487 k1_large_22(0, 2) = k1_large_22(2, 0);
488 k1_large_22(1, 2) = k1_large_22(2, 1);
508 k2_large_11(0, 1) = k2_large_11(1, 0);
512 k2_large_11(0, 2) = k2_large_11(2, 0);
524 k2_large_22(0, 1) = k2_large_22(1, 0);
529 k2_large_22(0, 2) = k2_large_22(2, 0);
547 k3_large_22(0, 1) = k3_large_22(1, 0);
553 k3_large_22(0, 2) = k3_large_22(2, 0);
558 k3_large_22 *= 1.0 / 16.0;
562 k3_large_21(0, 0) = -1.0 / 6.0 *
const MooseArray< Point > & _q_point
MaterialProperty< RealVectorValue > & _total_disp_strain
Current total displacement strain integrated over the cross-section in global coordinate system...
std::vector< const MaterialProperty< RealVectorValue > * > _rot_eigenstrain_old
Vector of old rotational eigenstrains.
RankTwoTensor & _original_local_config
Rotational transformation from global coordinate system to initial beam local configuration.
const VariableValue & _Iy
Coupled variable for the second moment of area in y direction, i.e., integral of y^2*dA over the cros...
std::vector< unsigned int > _soln_disp_index_1
Indices of solution vector corresponding to displacement DOFs at the node 1.
std::vector< unsigned int > _rot_num
Variable numbers corresponding to the rotational variables.
MaterialProperty< RankTwoTensor > & _initial_rotation
Rotational transformation from global coordinate system to initial beam local configuration.
FEProblemBase & _fe_problem
const QBase *const & _qrule
std::vector< unsigned int > _soln_rot_index_0
Indices of solution vector corresponding to rotation DOFs at the node 0.
MaterialProperty< RankTwoTensor > & _K21_cross
Stiffness matrix between displacement DOFs of one node to rotational DOFs of another node...
auto norm() const -> decltype(std::norm(Real()))
const VariableValue & _Iz
Coupled variable for the second moment of area in z direction, i.e., integral of z^2*dA over the cros...
unsigned int _ndisp
Number of coupled displacement variables.
unsigned int number() const
virtual void computeRotation()
Computes the rotation matrix at time t. For small rotation scenarios, the rotation matrix at time t i...
MaterialProperty< RankTwoTensor > & _K22
Stiffness matrix between rotation DOFs of the same node.
MaterialProperty< RealVectorValue > & _total_rot_strain
Current total rotational strain integrated over the cross-section in global coordinate system...
NonlinearSystemBase & _nonlinear_sys
Reference to the nonlinear system object.
std::vector< const MaterialProperty< RealVectorValue > * > _disp_eigenstrain_old
Vector of old displacement eigenstrains.
static InputParameters validParams()
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
registerMooseObject("SolidMechanicsApp", ComputeIncrementalBeamStrain)
ComputeIncrementalBeamStrain(const InputParameters ¶meters)
RealVectorValue _avg_rot_local_t
Average rotation calculated in the beam local configuration at time t.
unsigned int _nrot
Number of coupled rotational variables.
MaterialProperty< RankTwoTensor > & _K11
Stiffness matrix between displacement DOFs of same node or across nodes.
virtual const NumericVector< Number > *const & currentSolution() const override final
static InputParameters validParams()
ComputeIncrementalBeamStrain defines a displacement and rotation strain increment and rotation increm...
std::vector< unsigned int > _disp_num
Variable numbers corresponding to the displacement variables.
MaterialProperty< RankTwoTensor > & _K22_cross
Stiffness matrix between rotation DOFs of different nodes.
virtual void initQpStatefulProperties() override
MaterialProperty< Real > & _original_length
Initial length of the beam.
const bool _has_Ix
Booleans for validity of params.
unsigned int number() const
const Function *const _prefactor_function
Prefactor function to multiply the elasticity tensor with.
MaterialProperty< RealVectorValue > & _mech_rot_strain_increment
Mechanical rotation strain increment (after removal of eigenstrains) integrated over the cross-sectio...
std::vector< const MaterialProperty< RealVectorValue > * > _disp_eigenstrain
Vector of current displacement eigenstrains.
std::vector< unsigned int > _soln_rot_index_1
Indices of solution vector corresponding to rotation DOFs at the node 1.
MaterialProperty< RealVectorValue > & _mech_disp_strain_increment
Mechanical displacement strain increment (after removal of eigenstrains) integrated over the cross-se...
const MaterialProperty< RealVectorValue > & _material_stiffness
Material stiffness vector that relates displacement strain increments to force increments.
RankTwoTensorTempl< Real > transpose() const
void computeQpStrain()
Computes the displacement and rotation strain increments.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RealVectorValue _grad_rot_0_local_t
Gradient of rotation calculated in the beam local configuration at time t.
const VariableValue & _area
Coupled variable for the beam cross-sectional area.
RealVectorValue _disp0
Displacement and rotations at the two nodes of the beam in the global coordinate system.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
MaterialProperty< Real > & _effective_stiffness
Psuedo stiffness for critical time step computation.
std::vector< MaterialPropertyName > _eigenstrain_names
Vector of beam eigenstrain names.
const bool _large_strain
Boolean flag to turn on large strain calculation.
const VariableValue & _Ay
Coupled variable for the first moment of area in y direction, i.e., integral of y*dA over the cross-s...
void mooseError(Args &&... args) const
std::vector< const MaterialProperty< RealVectorValue > * > _rot_eigenstrain
Vector of current rotational eigenstrains.
void computeStiffnessMatrix()
Computes the stiffness matrices.
const VariableValue & _Az
Coupled variable for the first moment of area in z direction, i.e., integral of z*dA over the cross-s...
virtual void computeProperties() override
const bool & currentlyComputingJacobian() const
virtual Real value(Real t, const Point &p) const
const VariableValue & _Ix
Coupled variable for the second moment of area in x direction, i.e., integral of (y^2 + z^2)*dA over ...
NumericVector< Number > & solutionOld()
std::vector< unsigned int > _soln_disp_index_0
Indices of solution vector corresponding to displacement DOFs at the node 0.
const Elem *const & _current_elem
MaterialProperty< RankTwoTensor > & _total_rotation
Rotational transformation from global coordinate system to beam local configuration at time t...
MaterialProperty< RankTwoTensor > & _K21
Stiffness matrix between displacement DOFs and rotation DOFs of the same node.
const MaterialProperty< RealVectorValue > & _total_disp_strain_old
Old total displacement strain integrated over the cross-section in global coordinate system...
RealVectorValue _grad_disp_0_local_t
Gradient of displacement calculated in the beam local configuration at time t.