Twenty_Node_Brick.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 // by Jinchi Lu and Zhaohui Yang (May 2004)
00022 //
00023 // 20NodeBrick element
00024 //
00025 #ifndef TWENTY_NODE_BRICK_H
00026 #define TWENTY_NODE_BRICK_H
00027 
00028 #include <stdio.h>
00029 #include <stdlib.h>
00030 #include <math.h>
00031 
00032 #include <ID.h>
00033 #include <Vector.h>
00034 #include <Matrix.h>
00035 #include <Element.h>
00036 #include <Node.h>
00037 #include <NDMaterial.h>
00038 
00039 class Twenty_Node_Brick : public Element {
00040 
00041  public:
00042     //null constructor
00043     Twenty_Node_Brick( ) ;
00044 
00045     //full constructor
00046     Twenty_Node_Brick( int tag,
00047                 int node1,
00048                 int node2,
00049                 int node3,
00050                 int node4,
00051                 int node5,
00052                 int node6,
00053                 int node7,
00054                 int node8,
00055                 int node9,
00056                 int node10,
00057                 int node11,
00058                 int node12,
00059                 int node13,
00060                 int node14,
00061                 int node15,
00062                 int node16,
00063                 int node17,
00064                 int node18,
00065                 int node19,
00066                 int node20,
00067                 NDMaterial &theMaterial,
00068                 double b1 = 0.0, double b2 = 0.0, double b3 = 0.0) ;
00069 
00070     //destructor
00071     virtual ~Twenty_Node_Brick( ) ;
00072 
00073     const char *getClassType(void) const {return "Twenty_Node_Brick";};
00074 
00075     //set domain
00076     void setDomain( Domain *theDomain ) ;
00077 
00078     //get the number of external nodes
00079     int getNumExternalNodes( ) const ;
00080 
00081     //return connected external nodes
00082     const ID &getExternalNodes( ) ;
00083     Node **getNodePtrs(void);
00084 
00085     //return number of dofs
00086     int getNumDOF( ) ;
00087 
00088     //commit state
00089     int commitState( ) ;
00090 
00091     //revert to last commit
00092     int revertToLastCommit( ) ;
00093 
00094     //revert to start
00095     int revertToStart( ) ;
00096 
00097     //print out element data
00098     void Print( OPS_Stream &s, int flag ) ;
00099 
00100         int update(void);
00101 
00102     //return stiffness matrix
00103     const Matrix &getTangentStiff( ) ;
00104     const Matrix &getInitialStiff( ) ;
00105     const Matrix &getDamp(void);
00106     const Matrix &getMass( ) ;
00107 
00108     void zeroLoad( ) ;
00109     int addLoad(ElementalLoad *theLoad, double loadFactor);
00110     int addInertiaLoadToUnbalance(const Vector &accel);
00111 
00112     //get residual
00113     const Vector &getResistingForce( ) ;
00114 
00115     //get residual with inertia terms
00116     const Vector &getResistingForceIncInertia( ) ;
00117 
00118     // public methods for element output
00119     int sendSelf (int commitTag, Channel &theChannel);
00120     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00121                 &theBroker);
00122 
00123     Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00124     int getResponse(int responseID, Information &eleInformation);
00125 
00126     //plotting
00127     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00128 
00129 private :
00130 
00131     //static data
00132     static Matrix stiff ;
00133     static Vector resid ;
00134     static Matrix mass ;
00135     static Matrix damp ;
00136 
00137     //quadrature data
00138     static const int nintu;
00139     static const int nenu;
00140 
00141 
00142     //node information
00143     ID connectedExternalNodes ;  //eight node numbers
00144     Node *nodePointers[20] ;      //pointers to eight nodes
00145 
00146 
00147     //material information
00148     NDMaterial **materialPointers; // pointer to the ND material objects
00149 
00150     //local nodal coordinates, three coordinates for each of twenty nodes
00151     //    static double xl[3][20] ;
00152     static double xl[3][20] ;
00153     double b[3];                // Body forces
00154 
00155     static double shgu[4][20][27];      // Stores shape functions and derivatives (overwritten)
00156     static double shlu[4][20][27];      // Stores shape functions and derivatives
00157     static double wu[27];               // Stores quadrature weights
00158     static double dvolu[27];  // Stores detJacobian (overwritten)
00159 
00160     //inertia terms
00161     void formInertiaTerms( int tangFlag ) ;
00162 
00163     //damping terms
00164     void formDampingTerms( int tangFlag ) ;
00165 
00166         // Mixture mass density at integration point i
00167         double mixtureRho(int ipt);
00168 
00169     //compute coordinate system
00170     void computeBasis( ) ;
00171 
00172     Vector *load;
00173     Matrix *Ki;
00174 
00175         // compute local shape functions
00176         void compuLocalShapeFunction();
00177         void Jacobian3d(int gaussPoint, double& xsj, int mode);
00178         const Matrix&  getStiff( int flag );
00179 
00180 
00181 } ;
00182 
00183 #endif

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