Twenty_Eight_Node_BrickUP.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 
00003 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00004 
00005 **          Pacific Earthquake Engineering Research Center            **
00006 
00007 **                                                                    **
00008 
00009 **                                                                    **
00010 
00011 ** (C) Copyright 1999, The Regents of the University of California    **
00012 
00013 ** All Rights Reserved.                                               **
00014 
00015 **                                                                    **
00016 
00017 ** Commercial use of this program without express permission of the   **
00018 
00019 ** University of California, Berkeley, is strictly prohibited.  See   **
00020 
00021 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00022 
00023 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00024 
00025 **                                                                    **
00026 
00027 ** Developed by:                                                      **
00028 
00029 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00030 
00031 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00032 
00033 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00034 
00035 **                                                                    **
00036 
00037 ** ****************************************************************** */
00038 
00039 
00040 
00041 // by Jinchi Lu and Zhaohui Yang (May 2004)
00042 
00043 //
00044 
00045 // 20-8 Noded brick element: TwentyEightNodeBrickUP
00046 
00047 //
00048 
00049 
00050 
00051 #include <stdio.h>
00052 
00053 #include <stdlib.h>
00054 
00055 #include <math.h>
00056 
00057 
00058 
00059 #include <ID.h>
00060 
00061 #include <Vector.h>
00062 
00063 #include <Matrix.h>
00064 
00065 #include <Element.h>
00066 
00067 #include <Node.h>
00068 
00069 #include <NDMaterial.h>
00070 
00071 
00072 
00073 class TwentyEightNodeBrickUP : public Element {
00074 
00075 
00076 
00077 public :
00078 
00079 
00080 
00081     //null constructor
00082 
00083     TwentyEightNodeBrickUP( ) ;
00084 
00085 
00086 
00087     //full constructor
00088 
00089     TwentyEightNodeBrickUP( int tag,
00090 
00091                 int node1,
00092 
00093                 int node2,
00094 
00095                 int node3,
00096 
00097                 int node4,
00098 
00099                 int node5,
00100 
00101                 int node6,
00102 
00103                 int node7,
00104 
00105                 int node8,
00106 
00107                 int node9,
00108 
00109                 int node10,
00110 
00111                 int node11,
00112 
00113                 int node12,
00114 
00115                 int node13,
00116 
00117                 int node14,
00118 
00119                 int node15,
00120 
00121                 int node16,
00122 
00123                 int node17,
00124 
00125                 int node18,
00126 
00127                 int node19,
00128 
00129                 int node20,
00130 
00131                 NDMaterial &theMaterial,double bulk, double rhof,
00132 
00133                 double perm1, double perm2, double perm3,
00134 
00135                 double b1 = 0.0, double b2 = 0.0, double b3 = 0.0) ;
00136 
00137 
00138 
00139     //destructor
00140 
00141     virtual ~TwentyEightNodeBrickUP( ) ;
00142 
00143     const char *getClassType(void) const {return "TwentyEightNodeBrickUP";};
00144 
00145     //set domain
00146 
00147     void setDomain( Domain *theDomain ) ;
00148 
00149 
00150 
00151     //get the number of external nodes
00152 
00153     int getNumExternalNodes( ) const ;
00154 
00155 
00156 
00157     //return connected external nodes
00158 
00159     const ID &getExternalNodes( ) ;
00160 
00161     Node **getNodePtrs(void);
00162 
00163 
00164 
00165     //return number of dofs
00166 
00167     int getNumDOF( ) ;
00168 
00169 
00170 
00171     //commit state
00172 
00173     int commitState( ) ;
00174 
00175 
00176 
00177     //revert to last commit
00178 
00179     int revertToLastCommit( ) ;
00180 
00181 
00182 
00183     //revert to start
00184 
00185     int revertToStart( ) ;
00186 
00187 
00188 
00189     //print out element data
00190 
00191     void Print( OPS_Stream &s, int flag ) ;
00192 
00193 
00194 
00195         int update(void);
00196 
00197 
00198 
00199     //return stiffness matrix
00200 
00201     const Matrix &getTangentStiff( ) ;
00202 
00203     const Matrix &getInitialStiff( ) ;
00204 
00205     const Matrix &getDamp(void);
00206 
00207     const Matrix &getMass( ) ;
00208 
00209 
00210 
00211     void zeroLoad( ) ;
00212 
00213     int addLoad(ElementalLoad *theLoad, double loadFactor);
00214 
00215     int addInertiaLoadToUnbalance(const Vector &accel);
00216 
00217 
00218 
00219     //get residual
00220 
00221     const Vector &getResistingForce( ) ;
00222 
00223 
00224 
00225     //get residual with inertia terms
00226 
00227     const Vector &getResistingForceIncInertia( ) ;
00228 
00229 
00230 
00231     // public methods for element output
00232 
00233     int sendSelf (int commitTag, Channel &theChannel);
00234 
00235     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00236 
00237                 &theBroker);
00238 
00239 
00240 
00241     Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00242 
00243     int getResponse(int responseID, Information &eleInformation);
00244 
00245 
00246 
00247     //plotting
00248 
00249     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00250 
00251 
00252 
00253     // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
00254 
00255     friend class PyLiq1;
00256 
00257     friend class TzLiq1;
00258 
00259 
00260 
00261 private :
00262 
00263 
00264 
00265     //static data
00266 
00267     static Matrix stiff ;
00268 
00269     static Vector resid ;
00270 
00271     static Matrix mass ;
00272 
00273     static Matrix damp ;
00274 
00275 
00276 
00277     //quadrature data
00278 
00279     static const int nintu;
00280 
00281     static const int nintp;
00282 
00283     static const int nenu;
00284 
00285     static const int nenp;
00286 
00287 
00288 
00289 
00290 
00291     //node information
00292 
00293     ID connectedExternalNodes ;  //eight node numbers
00294 
00295     Node *nodePointers[20] ;      //pointers to eight nodes
00296 
00297 
00298 
00299 
00300 
00301     //material information
00302 
00303     NDMaterial **materialPointers; // pointer to the ND material objects
00304 
00305 
00306 
00307     //local nodal coordinates, three coordinates for each of twenty nodes
00308 
00309     //    static double xl[3][20] ;
00310 
00311     static double xl[3][20] ;
00312 
00313     double b[3];                // Body forces
00314 
00315     double rho;                 // Fluid mass per unit volume
00316 
00317     double kc;   // combined bulk modulus
00318 
00319     double perm[3];  // permeability
00320 
00321 
00322 
00323     static double shgu[4][20][27];      // Stores shape functions and derivatives (overwritten)
00324 
00325     static double shgp[4][8][8];        // Stores shape functions and derivatives (overwritten)
00326 
00327     static double shgq[4][20][8];       // Stores shape functions and derivatives (overwritten)
00328 
00329     static double shlu[4][20][27];      // Stores shape functions and derivatives
00330 
00331     static double shlp[4][8][8];        // Stores shape functions and derivatives
00332 
00333     static double shlq[4][20][8];       // Stores shape functions and derivatives
00334 
00335     static double wu[27];               // Stores quadrature weights
00336 
00337     static double wp[8];                // Stores quadrature weights
00338 
00339     static double dvolu[27];  // Stores detJacobian (overwritten)
00340 
00341     static double dvolp[8];  // Stores detJacobian (overwritten)
00342 
00343     static double dvolq[8];  // Stores detJacobian (overwritten)
00344 
00345 
00346 
00347     //inertia terms
00348 
00349     void formInertiaTerms( int tangFlag ) ;
00350 
00351 
00352 
00353     //damping terms
00354 
00355     void formDampingTerms( int tangFlag ) ;
00356 
00357 
00358 
00359         // Mixture mass density at integration point i
00360 
00361         double mixtureRho(int ipt);
00362 
00363 
00364 
00365     //compute coordinate system
00366 
00367     void computeBasis( ) ;
00368 
00369 
00370 
00371     Vector *load;
00372 
00373     Matrix *Ki;
00374 
00375 
00376 
00377         // compute local shape functions
00378 
00379         void compuLocalShapeFunction();
00380 
00381         void Jacobian3d(int gaussPoint, double& xsj, int mode);
00382 
00383         const Matrix&  getStiff( int flag );
00384 
00385 
00386 
00387 
00388 
00389 } ;
00390 
00391 
00392 
00393 
00394 
00395 
00396 
00397 
00398 
00399 
00400 
00401 
00402 
00403 
00404 

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