ConstantPressureVolumeQuad.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.11 $
00022 // $Date: 2006/08/04 19:07:15 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/fourNodeQuad/ConstantPressureVolumeQuad.h,v $
00024 
00025 // Ed "C++" Love
00026 //
00027 // Constant Presssure/Volume Four Node Quadrilateral
00028 // Plane Strain (NOT PLANE STRESS)
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 <NDMaterial.h>
00040 
00041 class ConstantPressureVolumeQuad : public Element 
00042 {
00043 
00044   public :
00045     
00046     ConstantPressureVolumeQuad( ) ;
00047     ConstantPressureVolumeQuad( int tag, 
00048                                 int node1,
00049                                 int node2,
00050                                 int node3,
00051                                 int node4,
00052                                 NDMaterial &theMaterial ) ;
00053     virtual ~ConstantPressureVolumeQuad( ) ;
00054 
00055     const char *getClassType(void) const {return "ConstantPressureVolumeQuad";};
00056 
00057     int getNumExternalNodes( ) const ;
00058     const ID &getExternalNodes( ) ;
00059     Node **getNodePtrs(void);
00060 
00061     int getNumDOF( ) ;
00062     void setDomain( Domain *theDomain ) ;
00063 
00064     // public methods to set the state of the element    
00065     int commitState( ) ;
00066     int revertToLastCommit( ) ;
00067     int revertToStart( ) ;
00068     int update(void);
00069 
00070     // public methods to obtain stiffness, mass, damping and residual information    
00071     const Matrix &getTangentStiff();
00072     const Matrix &getInitialStiff();
00073     const Matrix &getMass();
00074 
00075     // public methods for updating ele load information
00076     void zeroLoad( ) ;
00077     int addLoad(ElementalLoad *theLoad, double loadFactor);
00078     int addInertiaLoadToUnbalance(const Vector &accel);
00079 
00080     const Vector &getResistingForce( ) ;
00081     const Vector &getResistingForceIncInertia( ) ;
00082 
00083     // public methods for element output
00084     Response *setResponse(const char **argv, int argc, 
00085                           Information &eleInformation, OPS_Stream &s);
00086 
00087     int getResponse(int responseID, Information &eleInformation);
00088     int sendSelf (int commitTag, Channel &theChannel);
00089     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00090                   &theBroker);
00091     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00092     void Print( OPS_Stream &s, int flag ) ;
00093 
00094   
00095   private : 
00096 
00097     //static data
00098     static double matrixData[64];  // array data for matrix
00099     static Matrix stiff ;
00100     static Vector resid ;
00101     static Matrix mass ;
00102     static Matrix damping ;
00103     
00104     //volume-pressure constants
00105     static double one3 ;
00106     static double two3 ;
00107     static double four3 ;
00108     static double one9 ;
00109     
00110     //quadrature data
00111     static double root3 ;
00112     static double one_over_root3 ;    
00113     static double sg[4] ;
00114     static double tg[4] ;
00115     static double wg[4] ;
00116     
00117     //node information
00118     ID connectedExternalNodes ;  //four node numbers
00119     Node *nodePointers[4] ;      //pointers to four nodes
00120                                         
00121     //material information
00122     NDMaterial *materialPointers[4] ; //pointers to four materials
00123                                           
00124     //nodal coordinates, two coordinates for each of four nodes
00125     double xl[2][4] ; 
00126     
00127     //form residual and tangent                                   
00128     void formResidAndTangent( int tang_flag ) ;
00129 
00130     //inertia terms
00131     void formInertiaTerms( int tangFlag ) ;
00132 
00133     //shape function routine for four node quads
00134     void shape2d( double ss, double tt, 
00135                   const double x[2][4], 
00136                   double shp[3][4], 
00137                   double &xsj, 
00138                   Matrix &sx ) ;
00139 
00140     Vector *load;
00141 } ; 

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