ShellMITC4.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.9 $
00022 // $Date: 2003/02/25 23:33:01 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/shell/ShellMITC4.h,v $
00024 
00025 // Ed "C++" Love
00026 //
00027 // B-bar four node shell element with membrane and drill
00028 //
00029 
00030 #include <stdio.h> 
00031 #include <stdlib.h> 
00032 #include <math.h> 
00033 
00034 #include <ID.h> 
00035 #include <Vector.h>
00036 #include <Matrix.h>
00037 #include <Element.h>
00038 #include <Node.h>
00039 #include <SectionForceDeformation.h>
00040 #include <R3vectors.h>
00041 
00042 class ShellMITC4 : public Element {
00043 
00044  public:
00045   
00046   //null constructor
00047   ShellMITC4();
00048   
00049   //full constructor
00050   ShellMITC4(int tag, 
00051              int node1,
00052              int node2,
00053              int node3,
00054              int node4,
00055              SectionForceDeformation &theMaterial ) ;
00056   
00057   //destructor 
00058   virtual ~ShellMITC4( ) ;
00059 
00060   //set domain because frank is a dumb ass 
00061   void setDomain( Domain *theDomain ) ;
00062   
00063   //get the number of external nodes
00064   int getNumExternalNodes( ) const ;
00065     
00066     //return connected external nodes
00067     const ID &getExternalNodes( ) ;
00068     Node **getNodePtrs();
00069 
00070     //return number of dofs
00071     int getNumDOF( ) ;
00072 
00073     //commit state
00074     int commitState( ) ;
00075     
00076     //revert to last commit 
00077     int revertToLastCommit( ) ;
00078     
00079     //revert to start 
00080     int revertToStart( ) ;
00081 
00082     //print out element data
00083     void Print( OPS_Stream &s, int flag ) ;
00084         
00085     //return stiffness matrix 
00086     const Matrix &getTangentStiff( ) ;
00087     const Matrix &getInitialStiff();
00088     const Matrix &getMass();
00089 
00090     // methods for applying loads
00091     void zeroLoad(void);        
00092     int addLoad(ElementalLoad *theLoad, double loadFactor);
00093     int addInertiaLoadToUnbalance(const Vector &accel);
00094 
00095     //get residual
00096     const Vector &getResistingForce( ) ;
00097     
00098     //get residual with inertia terms
00099     const Vector &getResistingForceIncInertia( ) ;
00100 
00101     // public methods for element output
00102     int sendSelf (int commitTag, Channel &theChannel);
00103     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00104                   &theBroker);
00105       
00106     //plotting 
00107     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00108 
00109   private : 
00110 
00111     //static data
00112     static Matrix stiff ;
00113     static Vector resid ;
00114     static Matrix mass ;
00115     static Matrix damping ;
00116 
00117     //quadrature data
00118     static const double root3 ;
00119     static const double one_over_root3 ;    
00120     static double sg[4] ;
00121     static double tg[4] ;
00122     static double wg[4] ;
00123 
00124     //B-bar data
00125     static Matrix  **GammaB1pointer ;  
00126     static Matrix  **GammaD1pointer ;
00127     static Matrix  **GammaA2pointer ;
00128     static Matrix  **GammaC2pointer ;
00129 
00130     //Bhat data
00131     static Matrix **Bhat ;
00132 
00133     //node information
00134     ID connectedExternalNodes ;  //four node numbers
00135     Node *nodePointers[4] ;      //pointers to four nodes
00136 
00137     //drilling stiffness
00138     double Ktt ;
00139 
00140     //material information
00141     SectionForceDeformation *materialPointers[4] ; //pointers to four materials
00142                                           
00143     //local nodal coordinates, two coordinates for each of four nodes
00144     //static double xl[][4] ; 
00145     double xl[2][4] ; 
00146 
00147     //shell basis vectors
00148     double g1[3] ;
00149     double g2[3] ;
00150     double g3[3] ;
00151 
00152     //compute local coordinates and basis
00153     void computeBasis( ) ;
00154         
00155     //inertia terms
00156     void formInertiaTerms( int tangFlag ) ;
00157 
00158     //form residual and tangent                                   
00159     void formResidAndTangent( int tang_flag ) ;
00160 
00161     //compute Jacobian matrix and inverse at point {L1,L2}
00162     void  computeJacobian( double L1, double L2, 
00163                            const double x[2][4], 
00164                            Matrix &JJ, 
00165                            Matrix &JJinv ) ;
00166 
00167     //compute Bdrill matrix
00168     double* computeBdrill( int node, const double shp[3][4] ) ;
00169 
00170     //assemble a B matrix 
00171     const Matrix& assembleB( const Matrix &Bmembrane,
00172                              const Matrix &Bbend, 
00173                              const Matrix &Bshear ) ;
00174   
00175     //compute Bmembrane matrix
00176     const Matrix& computeBmembrane( int node, const double shp[3][4] ) ;
00177   
00178     //compute Bbend matrix
00179     const Matrix& computeBbend( int node, const double shp[3][4] ) ;
00180   
00181     //compute standard Bshear matrix
00182     const Matrix&  computeBshear( int node, const double shp[3][4] ) ;
00183 
00184     //compute Bbar shear matrix
00185     const Matrix&  computeBbarShear( int node, double L1, double L2,
00186                                      const Matrix& Jinv ) ;
00187   
00188                              
00189     //compute the gamma's
00190     void  computeGamma( const double xl[2][4], const Matrix &J ) ;
00191 
00192     //Matrix transpose
00193     Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00194 
00195     //shape function routine for four node quads
00196     void shape2d( double ss, double tt, 
00197                   const double x[2][4], 
00198                   double shp[3][4], 
00199                   double &xsj ) ;
00200 
00201     // vector for applying loads
00202     Vector *load;
00203     Matrix *Ki;
00204 } ; 
00205 
00206 
00207 
00208 
00209 
00210 
00211 

Generated on Mon Oct 23 15:05:09 2006 for OpenSees by doxygen 1.5.0