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 "DenseMatrix.h" 13 : #include "Material.h" 14 : #include "ADRankTwoTensorForward.h" 15 : 16 : namespace libMesh 17 : { 18 : class QGauss; 19 : } 20 : 21 : class ADComputeIncrementalShellStrain : public Material 22 : { 23 : public: 24 : static InputParameters validParams(); 25 : 26 : ADComputeIncrementalShellStrain(const InputParameters & parameters); 27 : 28 : protected: 29 : virtual void initQpStatefulProperties() override; 30 : virtual void computeProperties() override; 31 : 32 : /// Computes the 20x1 soln vector and its derivatives for each shell element 33 : virtual void computeSolnVector(); 34 : 35 : /// Computes the B matrix that connects strains to nodal displacements and rotations 36 : virtual void computeBMatrix(); 37 : 38 : /// Computes the node normal at each node 39 : virtual void computeNodeNormal(); 40 : 41 : /// Updates the vectors required for shear locking computation for finite rotations 42 374592 : virtual void updateGVectors(){}; 43 : 44 : /// Updates covariant vectors at each qp for finite rotations 45 0 : virtual void updatedxyz(){}; 46 : 47 : /// Computes the transformation matrix from natural coordinates to local cartesian coordinates for elasticity tensor transformation 48 : virtual void computeGMatrix(); 49 : 50 : /// Computes the element's local coordinates and store in _e1, _e2 and _e3 51 : virtual void computeLocalCoordinates(); 52 : 53 : /// Number of coupled rotational variables 54 : unsigned int _nrot; 55 : 56 : /// Number of coupled displacement variables 57 : unsigned int _ndisp; 58 : 59 : /// Variable numbers corresponding to the rotational variables 60 : std::vector<unsigned int> _rot_num; 61 : 62 : /// Variable numbers corresponding to the displacement variables 63 : std::vector<unsigned int> _disp_num; 64 : 65 : /// Coupled variable for the shell thickness 66 : const VariableValue & _thickness; 67 : 68 : /// Flag to compute large strains 69 : const bool _large_strain; 70 : 71 : /// Strain increment in the covariant coordinate system 72 : std::vector<ADMaterialProperty<RankTwoTensor> *> _strain_increment; 73 : 74 : /// Total strain increment in the covariant coordinate system 75 : std::vector<ADMaterialProperty<RankTwoTensor> *> _total_strain; 76 : 77 : /// Old total strain increment in the covariant coordinate system 78 : std::vector<const MaterialProperty<RankTwoTensor> *> _total_strain_old; 79 : 80 : /// Reference to the nonlinear system object 81 : NonlinearSystemBase & _nonlinear_sys; 82 : 83 : /// Indices of solution vector corresponding to displacement DOFs in 3 directions at the 4 nodes 84 : std::vector<std::vector<unsigned int>> _soln_disp_index; 85 : 86 : /// Indices of solution vector corresponding to rotation DOFs in 2 directions at the 4 nodes 87 : std::vector<std::vector<unsigned int>> _soln_rot_index; 88 : 89 : /// Vector that stores the incremental solution at all the 20 DOFs in the 4 noded element. 90 : ADDenseVector _soln_vector; 91 : 92 : /// Vector that stores the strain in the the 2 axial and 3 shear directions 93 : ADDenseVector _strain_vector; 94 : 95 : /// Vector storing pointers to the nodes of the shell element 96 : std::vector<const Node *> _nodes; 97 : 98 : /// Material property storing the normal to the element at the 4 nodes. Stored as a material property for convinience. 99 : ADMaterialProperty<RealVectorValue> & _node_normal; 100 : 101 : /// Material property storing the old normal to the element at the 4 nodes. 102 : const MaterialProperty<RealVectorValue> & _node_normal_old; 103 : 104 : /// Quadrature rule in the out of plane direction 105 : std::unique_ptr<libMesh::QGauss> _t_qrule; 106 : 107 : /// Quadrature points in the out of plane direction in isoparametric coordinate system 108 : std::vector<Point> _t_points; 109 : 110 : /// Quadrature points in the in-plane direction in isoparametric coordinate system 111 : std::vector<Point> _2d_points; 112 : 113 : /// Derivatives of shape functions w.r.t isoparametric coordinates xi 114 : std::vector<std::vector<Real>> _dphidxi_map; 115 : 116 : /// Derivatives of shape functions w.r.t isoparametric coordinates eta 117 : std::vector<std::vector<Real>> _dphideta_map; 118 : 119 : /// Shape function value 120 : std::vector<std::vector<Real>> _phi_map; 121 : 122 : /// Derivative of global x, y and z w.r.t isoparametric coordinate xi 123 : std::vector<ADMaterialProperty<RealVectorValue> *> _dxyz_dxi; 124 : 125 : /// Derivative of global x, y and z w.r.t isoparametric coordinate eta 126 : std::vector<ADMaterialProperty<RealVectorValue> *> _dxyz_deta; 127 : 128 : /// Derivative of global x, y and z w.r.t isoparametric coordinate zeta 129 : std::vector<ADMaterialProperty<RealVectorValue> *> _dxyz_dzeta; 130 : 131 : /// Old derivative of global x, y and z w.r.t isoparametric coordinate xi 132 : std::vector<const MaterialProperty<RealVectorValue> *> _dxyz_dxi_old; 133 : 134 : /// Old derivative of global x, y and z w.r.t isoparametric coordinate eta 135 : std::vector<const MaterialProperty<RealVectorValue> *> _dxyz_deta_old; 136 : 137 : /// Old derivative of global x, y and z w.r.t isoparametric coordinate zeta 138 : std::vector<const MaterialProperty<RealVectorValue> *> _dxyz_dzeta_old; 139 : 140 : /// First tangential vectors at nodes 141 : std::vector<ADRealVectorValue> _v1; 142 : 143 : /// First tangential vectors at nodes 144 : std::vector<ADRealVectorValue> _v2; 145 : 146 : /// B_matrix for small strain 147 : std::vector<ADMaterialProperty<DenseMatrix<Real>> *> _B; 148 : 149 : /// Old B_matrix for small strain 150 : std::vector<const MaterialProperty<DenseMatrix<Real>> *> _B_old; 151 : 152 : /// ge matrix for elasticity tensor conversion 153 : std::vector<ADMaterialProperty<RankTwoTensor> *> _ge; 154 : 155 : /// Old ge matrix for elasticity tensor conversion 156 : std::vector<const MaterialProperty<RankTwoTensor> *> _ge_old; 157 : 158 : /// Material property containing jacobian of transformation 159 : std::vector<ADMaterialProperty<Real> *> _J_map; 160 : 161 : /// Old material property containing jacobian of transformation 162 : std::vector<const MaterialProperty<Real> *> _J_map_old; 163 : 164 : /// Transformation matrix to map stresses from global coordinate to the element's local coordinate 165 : std::vector<MaterialProperty<RankTwoTensor> *> _local_transformation_matrix; 166 : std::vector<const MaterialProperty<RankTwoTensor> *> _local_transformation_matrix_old; 167 : 168 : /// Covariant base vector matrix material property to transform stress 169 : std::vector<MaterialProperty<RankTwoTensor> *> _covariant_transformation_matrix; 170 : std::vector<const MaterialProperty<RankTwoTensor> *> _covariant_transformation_matrix_old; 171 : 172 : /// Contravariant base vector matrix material property to transform strain 173 : std::vector<MaterialProperty<RankTwoTensor> *> _contravariant_transformation_matrix; 174 : std::vector<const MaterialProperty<RankTwoTensor> *> _contravariant_transformation_matrix_old; 175 : 176 : /// Total strain in global coordinate system 177 : std::vector<MaterialProperty<RankTwoTensor> *> _total_global_strain; 178 : 179 : /// Rotation matrix material property 180 : ADMaterialProperty<RankTwoTensor> * _transformation_matrix; 181 : 182 : /// simulation variables 183 : ADRealVectorValue _x2; 184 : ADRealVectorValue _x3; 185 : const NumericVector<Number> * const & _sol; 186 : const NumericVector<Number> & _sol_old; 187 : const RealVectorValue _ref_first_local_dir; 188 : ADRealVectorValue _g3_a; 189 : ADRealVectorValue _g3_c; 190 : ADRealVectorValue _g3_b; 191 : ADRealVectorValue _g3_d; 192 : ADRealVectorValue _g1_a; 193 : ADRealVectorValue _g1_c; 194 : ADRealVectorValue _g2_b; 195 : ADRealVectorValue _g2_d; 196 : RankTwoTensor _unrotated_total_strain; 197 : ADRealVectorValue _e1; 198 : ADRealVectorValue _e2; 199 : ADRealVectorValue _e3; 200 : };