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 "Kernel.h" 13 : #include "RankTwoTensorForward.h" 14 : 15 : class StressDivergenceBeam : public Kernel 16 : { 17 : public: 18 : static InputParameters validParams(); 19 : 20 : StressDivergenceBeam(const InputParameters & parameters); 21 : virtual void computeResidual() override; 22 : virtual void computeJacobian() override; 23 : virtual void computeOffDiagJacobian(unsigned int jvar) override; 24 : 25 : protected: 26 0 : virtual Real computeQpResidual() override { return 0.0; } 27 : 28 : /// Computes the force and moment due to stiffness proportional damping and HHT time integration 29 : void computeDynamicTerms(std::vector<RealVectorValue> & global_force_res, 30 : std::vector<RealVectorValue> & global_moment_res); 31 : 32 : /// Computes the residual corresponding to displacement and rotational variables given the forces and moments 33 : void computeGlobalResidual(const MaterialProperty<RealVectorValue> * force, 34 : const MaterialProperty<RealVectorValue> * moment, 35 : const MaterialProperty<RankTwoTensor> * total_rotation, 36 : std::vector<RealVectorValue> & global_force_res, 37 : std::vector<RealVectorValue> & global_moment_res); 38 : 39 : /// Direction along which force/moment is calculated 40 : const unsigned int _component; 41 : 42 : /// Number of coupled displacement variables 43 : unsigned int _ndisp; 44 : 45 : /// Variable numbers corresponding to displacement variables 46 : std::vector<unsigned int> _disp_var; 47 : 48 : /// Number of coupled rotational variables 49 : unsigned int _nrot; 50 : 51 : /// Variable numbers corresponding to rotational variables 52 : std::vector<unsigned int> _rot_var; 53 : 54 : /// Current force vector in global coordinate system 55 : const MaterialProperty<RealVectorValue> & _force; 56 : 57 : /// Current moment vector in global coordinate system 58 : const MaterialProperty<RealVectorValue> & _moment; 59 : 60 : /// Stiffness matrix relating displacement DOFs of same node or across nodes 61 : const MaterialProperty<RankTwoTensor> & _K11; 62 : 63 : /// Stiffness matrix relating rotational DOFs of same node 64 : const MaterialProperty<RankTwoTensor> & _K22; 65 : 66 : /// Stiffness matrix relating rotational DOFs across nodes 67 : const MaterialProperty<RankTwoTensor> & _K22_cross; 68 : 69 : /// Stiffness matrix relating displacement of one node to rotations of another node 70 : const MaterialProperty<RankTwoTensor> & _K21_cross; 71 : 72 : /// Stiffness matrix relating displacement and rotations of same node 73 : const MaterialProperty<RankTwoTensor> & _K21; 74 : 75 : /// Initial length of beam 76 : const MaterialProperty<Real> & _original_length; 77 : 78 : /// Rotational transformation from global to current beam local coordinate system 79 : const MaterialProperty<RankTwoTensor> & _total_rotation; 80 : 81 : /// Stiffness proportional Rayleigh damping parameter 82 : const MaterialProperty<Real> & _zeta; 83 : 84 : /// HHT time integration parameter 85 : const Real & _alpha; 86 : 87 : /// Boolean flag to turn on Rayleigh damping or numerical damping due to HHT time integration 88 : const bool _isDamped; 89 : 90 : /// Old force vector in global coordinate system 91 : const MaterialProperty<RealVectorValue> * _force_old; 92 : 93 : /// Old moment vector in global coordinate system 94 : const MaterialProperty<RealVectorValue> * _moment_old; 95 : 96 : /// Rotational transformation from global to old beam local coordinate system 97 : const MaterialProperty<RankTwoTensor> * _total_rotation_old; 98 : 99 : /// Older force vector in global coordinate system 100 : const MaterialProperty<RealVectorValue> * _force_older; 101 : 102 : /// Older moment vector in global coordinate system 103 : const MaterialProperty<RealVectorValue> * _moment_older; 104 : 105 : /// Rotational transformation from global to older beam local coordinate system 106 : const MaterialProperty<RankTwoTensor> * _total_rotation_older; 107 : 108 : /// Residual corresponding to displacement DOFs at the nodes in global coordinate system 109 : std::vector<RealVectorValue> _global_force_res; 110 : 111 : /// Residual corresponding to rotational DOFs at the nodes in global coordinate system 112 : std::vector<RealVectorValue> _global_moment_res; 113 : 114 : /// Forces at each Qp in the beam local configuration 115 : std::vector<RealVectorValue> _force_local_t; 116 : 117 : /// Moments at each Qp in the beam local configuration 118 : std::vector<RealVectorValue> _moment_local_t; 119 : 120 : /// Residual corresponding to displacement DOFs at the nodes in beam local coordinate system 121 : std::vector<RealVectorValue> _local_force_res; 122 : 123 : /// Residual corresponding to rotational DOFs at the nodes in beam local coordinate system 124 : std::vector<RealVectorValue> _local_moment_res; 125 : };