LCOV - code coverage report
Current view: top level - include/kernels - ADInertialForceShell.h (source / functions) Hit Total Coverage
Test: idaholab/moose solid_mechanics: f45d79 Lines: 1 2 50.0 %
Date: 2025-07-25 05:00:39 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          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 "ADTimeKernel.h"
      13             : #include "Material.h"
      14             : #include "RankTwoTensor.h"
      15             : #include "libmesh/dense_vector.h"
      16             : 
      17             : namespace libMesh
      18             : {
      19             : class QGauss;
      20             : }
      21             : 
      22          30 : struct PosRotVectors
      23             : {
      24             :   std::array<ADRealVectorValue, 4> pos;
      25             :   std::array<ADRealVectorValue, 4> rot;
      26             : };
      27             : 
      28             : class ADInertialForceShell : public ADTimeKernel
      29             : {
      30             : public:
      31             :   static InputParameters validParams();
      32             : 
      33             :   ADInertialForceShell(const InputParameters & parameters);
      34             : 
      35             : protected:
      36           0 :   virtual ADReal computeQpResidual() override { return 0.0; };
      37             : 
      38             :   virtual void computeResidual() override;
      39             :   virtual void computeResidualsForJacobian() override;
      40             :   virtual void computeShellInertialForces(const MooseArray<ADReal> & _ad_coord,
      41             :                                           const MooseArray<ADReal> & _ad_JxW);
      42             : 
      43             : private:
      44             :   /// Number of coupled rotational variables
      45             :   unsigned int _nrot;
      46             : 
      47             :   /// Number of coupled displacement variables
      48             :   unsigned int _ndisp;
      49             : 
      50             :   /// Variable numbers corresponding to rotational variables
      51             :   std::vector<unsigned int> _rot_num;
      52             : 
      53             :   /// Variable numbers corresponding to displacement variables
      54             :   std::vector<unsigned int> _disp_num;
      55             : 
      56             :   /// Variable numbers corresponding to velocity aux variables
      57             :   std::vector<unsigned int> _vel_num;
      58             : 
      59             :   /// Variable numbers corresponding to acceleraion aux variables
      60             :   std::vector<unsigned int> _accel_num;
      61             : 
      62             :   /// Variable numbers corresponding to rotational velocity aux variables
      63             :   std::vector<unsigned int> _rot_vel_num;
      64             : 
      65             :   /// Variable numbers corresponding to rotational acceleration aux variables
      66             :   std::vector<unsigned int> _rot_accel_num;
      67             : 
      68             :   /**
      69             :    * Rotational transformation from global to initial shell local
      70             :    * coordinate system
      71             :    */
      72             :   ADRankTwoTensor _original_local_config;
      73             : 
      74             :   /// Direction along which residual is calculated
      75             :   const unsigned int _component;
      76             : 
      77             :   /// Current shell nodal velocities in the global frame of reference
      78             :   PosRotVectors _vel;
      79             : 
      80             :   /// Old shell nodal velocities in the global frame of reference
      81             :   PosRotVectors _old_vel;
      82             : 
      83             :   /// Current shell nodal accelerations in the global frame of reference
      84             :   PosRotVectors _accel;
      85             : 
      86             :   /// Current shell nodal velocities in the local frame of reference
      87             :   PosRotVectors _local_vel;
      88             : 
      89             :   /// Old shell nodal velocities in the local frame of reference
      90             :   PosRotVectors _local_old_vel;
      91             : 
      92             :   /// Current shell nodal accelerations in the local frame of reference
      93             :   PosRotVectors _local_accel;
      94             : 
      95             :   /**
      96             :    * Forces and moments at the four nodes in the initial
      97             :    * local configuration
      98             :    */
      99             :   std::array<ADRealVectorValue, 4> _local_force, _local_moment;
     100             : 
     101             :   /**
     102             :    * Forces and moments at the four nodes in the global
     103             :    * coordinate system
     104             :    */
     105             :   std::array<ADRealVectorValue, 4> _global_force, _global_moment;
     106             : 
     107             :   /// Derivatives of shape functions w.r.t isoparametric coordinates xi
     108             :   std::vector<std::vector<Real>> _dphidxi_map;
     109             : 
     110             :   /// Derivatives of shape functions w.r.t isoparametric coordinates eta
     111             :   std::vector<std::vector<Real>> _dphideta_map;
     112             : 
     113             :   /// Shape function value
     114             :   std::vector<std::vector<Real>> _phi_map;
     115             : 
     116             :   /// Vector storing pointers to the nodes of the shell element
     117             :   std::vector<const Node *> _nodes;
     118             : 
     119             :   /// Quadrature points in the in-plane direction in isoparametric coordinate system
     120             :   std::vector<Point> _2d_points;
     121             : 
     122             :   /// Quadrature weights
     123             :   std::vector<ADReal> _2d_weights;
     124             : 
     125             :   /// First tangential vectors at nodes
     126             :   std::vector<ADRealVectorValue> _v1;
     127             : 
     128             :   /// Second tangential vectors at nodes
     129             :   std::vector<ADRealVectorValue> _v2;
     130             : 
     131             :   /// Helper vector
     132             :   ADRealVectorValue _x2;
     133             : 
     134             :   /// Helper vector
     135             :   ADRealVectorValue _x3;
     136             : 
     137             :   /// Normal to the element at the 4 nodes.
     138             :   std::vector<ADRealVectorValue> _node_normal;
     139             : 
     140             :   /// Node 1 g vectors
     141             :   std::array<ADRealVectorValue, 2> _0g1_vectors;
     142             : 
     143             :   /// Node 2 g vectors
     144             :   std::array<ADRealVectorValue, 2> _0g2_vectors;
     145             : 
     146             :   /// Node 3 g vectors
     147             :   std::array<ADRealVectorValue, 2> _0g3_vectors;
     148             : 
     149             :   /// Node 4 g vectors
     150             :   std::array<ADRealVectorValue, 2> _0g4_vectors;
     151             : 
     152             :   /// Mass proportional Rayleigh damping parameter
     153             :   const MaterialProperty<Real> & _eta;
     154             : 
     155             :   /// Rotation matrix material property
     156             :   const ADMaterialProperty<RankTwoTensor> & _transformation_matrix;
     157             : 
     158             :   /// Rotation matrix material property
     159             :   const ADMaterialProperty<Real> & _J_map;
     160             : 
     161             :   /// Coupled variable for the shell thickness
     162             :   const ADReal _thickness;
     163             : 
     164             :   /// Shell material density
     165             :   const MaterialProperty<Real> & _density;
     166             : 
     167             :   /// HHT time integration parameter
     168             :   const Real _alpha;
     169             : };

Generated by: LCOV version 1.14