Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : 10 : #pragma once 11 : 12 : #include "TimeKernel.h" 13 : #include "Material.h" 14 : #include "RankTwoTensor.h" 15 : 16 : // Forward Declarations 17 : 18 : class InertialForceBeam : public TimeKernel 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : 23 : InertialForceBeam(const InputParameters & parameters); 24 : 25 : virtual void computeResidual() override; 26 : 27 : virtual void computeJacobian() override; 28 : 29 : virtual void computeOffDiagJacobian(unsigned int jvar) override; 30 : 31 : protected: 32 0 : virtual Real computeQpResidual() override { return 0.0; }; 33 : 34 : private: 35 : /// Booleans for validity of params 36 : const bool _has_beta; 37 : const bool _has_gamma; 38 : const bool _has_velocities; 39 : const bool _has_rot_velocities; 40 : const bool _has_accelerations; 41 : const bool _has_rot_accelerations; 42 : const bool _has_Ix; 43 : 44 : /// Density of the beam 45 : const MaterialProperty<Real> & _density; 46 : 47 : /// Number of coupled rotational variables 48 : unsigned int _nrot; 49 : 50 : /// Number of coupled displacement variables 51 : unsigned int _ndisp; 52 : 53 : /// Variable numbers corresponding to rotational variables 54 : std::vector<unsigned int> _rot_num; 55 : 56 : /// Variable numbers corresponding to displacement variables 57 : std::vector<unsigned int> _disp_num; 58 : 59 : /// Variable numbers corresponding to velocity aux variables 60 : std::vector<unsigned int> _vel_num; 61 : 62 : /// Variable numbers corresponding to acceleraion aux variables 63 : std::vector<unsigned int> _accel_num; 64 : 65 : /// Variable numbers corresponding to rotational velocity aux variables 66 : std::vector<unsigned int> _rot_vel_num; 67 : 68 : /// Variable numbers corresponding to rotational acceleration aux variables 69 : std::vector<unsigned int> _rot_accel_num; 70 : 71 : /// Coupled variable for beam cross-sectional area 72 : const VariableValue & _area; 73 : 74 : /** 75 : * Coupled variable for first moment of area of beam in y direction, 76 : * i.e., integral of y*dA over the cross-section 77 : **/ 78 : const VariableValue & _Ay; 79 : 80 : /** 81 : * Coupled variable for first moment of area of beam in z direction, 82 : * i.e., integral of z*dA over the cross-section 83 : **/ 84 : const VariableValue & _Az; 85 : 86 : /** 87 : * Coupled variable for second moment of area of beam in x direction, 88 : * i.e., integral of (y^2+z^2)*dA over the cross-section. 89 : **/ 90 : const VariableValue & _Ix; 91 : 92 : /** 93 : * Coupled variable for second moment of area of beam in y direction, 94 : * i.e., integral of y^2*dA over the cross-section 95 : **/ 96 : const VariableValue & _Iy; 97 : 98 : /** 99 : * Coupled variable for second momemnt of area of beam in z direction, 100 : * i.e., integral of z^2*dA over the cross-section 101 : **/ 102 : const VariableValue & _Iz; 103 : 104 : /// Newmark time integration parameter 105 : const Real _beta; 106 : 107 : /// Newmark time integraion parameter 108 : const Real _gamma; 109 : 110 : /// Mass proportional Rayleigh damping parameter 111 : const MaterialProperty<Real> & _eta; 112 : 113 : /// HHT time integration parameter 114 : const Real _alpha; 115 : 116 : /** 117 : * Rotational transformation from global to initial beam local 118 : * coordinate system 119 : **/ 120 : const MaterialProperty<RankTwoTensor> & _original_local_config; 121 : 122 : /// Initial length of beam 123 : const MaterialProperty<Real> & _original_length; 124 : 125 : /// Direction along which residual is calculated 126 : const unsigned int _component; 127 : 128 : /** 129 : * Old translational and rotational velocities at the two nodes 130 : * of the beam in the global coordinate system 131 : **/ 132 : RealVectorValue _vel_old_0, _vel_old_1, _rot_vel_old_0, _rot_vel_old_1; 133 : 134 : /** 135 : * Current translational and rotational velocities at the two nodes 136 : * of the beam in the global coordinate system 137 : **/ 138 : RealVectorValue _vel_0, _vel_1, _rot_vel_0, _rot_vel_1; 139 : 140 : /** 141 : * Current translational and rotational accelerations at the two nodes 142 : * of the beam in the global coordinate system 143 : **/ 144 : RealVectorValue _accel_0, _accel_1, _rot_accel_0, _rot_accel_1; 145 : 146 : /** 147 : * Old translational and rotational velocities at the two nodes 148 : * of the beam in the initial beam local coordinate system 149 : **/ 150 : RealVectorValue _local_vel_old_0, _local_vel_old_1, _local_rot_vel_old_0, _local_rot_vel_old_1; 151 : 152 : /** 153 : * Current translational and rotational velocities at the two nodes 154 : * of the beam in the initial beam local coordinate system 155 : **/ 156 : RealVectorValue _local_vel_0, _local_vel_1, _local_rot_vel_0, _local_rot_vel_1; 157 : 158 : /** 159 : * Current translational and rotational accelerations at the two nodes 160 : * of the beam in the initial beam local coordinate system 161 : **/ 162 : RealVectorValue _local_accel_0, _local_accel_1, _local_rot_accel_0, _local_rot_accel_1; 163 : 164 : /** 165 : * Forces and moments at the two end nodes of the beam in the initial 166 : * beam local configuration 167 : **/ 168 : std::vector<RealVectorValue> _local_force, _local_moment; 169 : 170 : /** 171 : * Forces and moments at the two end nodes of the beam in the global 172 : * coordinate system 173 : **/ 174 : RealVectorValue _global_force_0, _global_force_1, _global_moment_0, _global_moment_1; 175 : 176 : /** 177 : * Coupled variable for du_dot_du calculated by time integrator 178 : **/ 179 : const VariableValue * _du_dot_du; 180 : 181 : /** 182 : * Coupled variable for du_dotdot_du calculated by time integrator 183 : **/ 184 : const VariableValue * _du_dotdot_du; 185 : };