BrickUP.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 
00022 // Description: This file contains the class declaration for                 //
00023 // BrickUP, an 8-node cubic element for solid-fluid fully coupled analysis.  //
00024 // This implementation is a simplified u-p formulation of Biot theory        //
00025 // (u - solid displacement, p - fluid pressure). Each element node has three //
00026 // DOFs for u and 1 DOF for p.                                               //
00027 //                                                                           //
00028 // Written by Zhaohui Yang      (March 2004)                                     //
00029 //                                                                           //
00031 
00032 // $Revision: 1.2 $
00033 // $Date: 2006/08/04 22:32:17 $
00034 // $Source: /usr/local/cvs/OpenSees/SRC/element/UP-ucsd/BrickUP.h,v $
00035 
00036 // by Zhaohui Yang (Modified based on Ed "C++" Love's Brick element)
00037 //
00038 // Eight node BrickUP element
00039 //
00040 
00041 #include <stdio.h>
00042 #include <stdlib.h>
00043 #include <math.h>
00044 
00045 #include <ID.h>
00046 #include <Vector.h>
00047 #include <Matrix.h>
00048 #include <Element.h>
00049 #include <Node.h>
00050 #include <NDMaterial.h>
00051 
00052 class BrickUP : public Element {
00053 
00054   public :
00055 
00056     //null constructor
00057     BrickUP( ) ;
00058 
00059     //full constructor
00060     BrickUP( int tag,
00061                         int node1,
00062                         int node2,
00063                     int node3,
00064                         int node4,
00065                         int node5,
00066                         int node6,
00067                         int node7,
00068                         int node8,
00069                         NDMaterial &theMaterial,double bulk, double rhof,
00070                         double perm1, double perm2, double perm3,
00071                    double b1 = 0.0, double b2 = 0.0, double b3 = 0.0) ;
00072 
00073     //destructor
00074     virtual ~BrickUP( ) ;
00075 
00076     const char *getClassType(void) const {return "BrickUP";};
00077 
00078     //set domain
00079     void setDomain( Domain *theDomain ) ;
00080 
00081     //get the number of external nodes
00082     int getNumExternalNodes( ) const ;
00083 
00084     //return connected external nodes
00085     const ID &getExternalNodes( ) ;
00086     Node **getNodePtrs(void);
00087 
00088     //return number of dofs
00089     int getNumDOF( ) ;
00090 
00091     //commit state
00092     int commitState( ) ;
00093 
00094     //revert to last commit
00095     int revertToLastCommit( ) ;
00096 
00097     //revert to start
00098     int revertToStart( ) ;
00099 
00100     //print out element data
00101     void Print( OPS_Stream &s, int flag ) ;
00102 
00103     //return stiffness matrix
00104     const Matrix &getTangentStiff( ) ;
00105     const Matrix &getInitialStiff( ) ;
00106     const Matrix &getDamp(void);
00107     const Matrix &getMass( ) ;
00108 
00109     void zeroLoad( ) ;
00110     int addLoad(ElementalLoad *theLoad, double loadFactor);
00111     int addInertiaLoadToUnbalance(const Vector &accel);
00112 
00113     //get residual
00114     const Vector &getResistingForce( ) ;
00115 
00116     //get residual with inertia terms
00117     const Vector &getResistingForceIncInertia( ) ;
00118 
00119     // public methods for element output
00120     int sendSelf (int commitTag, Channel &theChannel);
00121     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00122                   &theBroker);
00123 
00124     Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00125     int getResponse(int responseID, Information &eleInformation);
00126 
00127     //plotting
00128     int displaySelf(Renderer &theViewer, int displayMode, float fact);
00129 
00130 
00131     // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
00132     friend class PyLiq1;
00133     friend class TzLiq1;
00134 
00135   private :
00136 
00137     //static data
00138     static Matrix stiff ;
00139     static Vector resid ;
00140     static Matrix mass ;
00141     static Matrix damp ;
00142 
00143     //quadrature data
00144     static const double root3 ;
00145     static const double one_over_root3 ;
00146     static const double sg[2] ;
00147     static const double wg[8] ;
00148 
00149 
00150     //node information
00151     ID connectedExternalNodes ;  //eight node numbers
00152     Node *nodePointers[8] ;      //pointers to eight nodes
00153 
00154 
00155     //material information
00156     NDMaterial *materialPointers[8] ; //pointers to eight materials
00157 
00158     //local nodal coordinates, three coordinates for each of four nodes
00159     //    static double xl[3][8] ;
00160     static double xl[][8] ;
00161     double b[3];                // Body forces
00162     double rho;                 // Fluid mass per unit volume
00163     double kc;   // combined bulk modulus
00164     double perm[3];  // permeability
00165 
00166     //inertia terms
00167     void formInertiaTerms( int tangFlag ) ;
00168 
00169     //damping terms
00170     void formDampingTerms( int tangFlag ) ;
00171 
00172     //form residual and tangent
00173     void formResidAndTangent( int tang_flag ) ;
00174 
00175         // Mixture mass density at integration point i
00176         double mixtureRho(int ipt);
00177 
00178     //compute coordinate system
00179     void computeBasis( ) ;
00180 
00181     //compute Bbar matrix
00182     const Matrix& computeBbar( int node,
00183                                const double shp[4][8],
00184                                const double shpBar[4][8] ) ;
00185 
00186     //compute B matrix
00187     const Matrix& computeB( int node, const double shp[4][8] ) ;
00188 
00189     //Matrix transpose
00190     Matrix transpose( int dim1, int dim2, const Matrix &M ) ;
00191 
00192     Vector *load;
00193     Matrix *Ki;
00194 } ;
00195 
00196 
00197 
00198 
00199 
00200 
00201 

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