Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EightNodeBrick.h

Go to the documentation of this file.
00001 
00002 //
00003 // COPYRIGHT (C):     :-))
00004 // PROJECT:           Object Oriented Finite Element Program
00005 // FILE:              EightNodeBrick.h
00006 // CLASS:             EightNodeBrick
00007 // MEMBER FUNCTIONS:
00008 //
00009 // MEMBER VARIABLES
00010 //
00011 // PURPOSE:           Finite Element Class
00012 // RETURN:
00013 // VERSION:
00014 // LANGUAGE:          C++.ver >= 3.0
00015 // TARGET OS:         DOS || UNIX || . . .
00016 // DESIGNER:          Boris Jeremic, Zhaohui Yang and Xiaoyan Wu
00017 // PROGRAMMER:        Boris Jeremic, Zhaohui Yang  and Xiaoyan Wu
00018 // DATE:              Aug. 2000
00019 // UPDATE HISTORY:    Modified from Brick3D and FourNodeQuad.hh  07/06/00
00020 //                    Sept. - Oct 2000 connected to OpenSees by Zhaohui
00021 //
00023 //
00024 
00025 
00026 #ifndef EIGHTNODEBRICK_H
00027 #define EIGHTNODEBRICK_H
00028 
00029 #ifndef _bool_h
00030 #include "bool.h"
00031 #endif
00032 
00033 #include <Element.h>
00034 #include <Node.h> 
00035 
00036 // Commented by Xiaoyan. Use  ~/fem/node.hh  08/04/00
00037 // Released Node.h now. Wu use Opensees's Node.09/27/00
00038 
00039 
00040 #include <ID.h>
00041 #include <Renderer.h>
00042 #include <Domain.h>
00043 #include <string.h>
00044 
00045 #include <GaussQuadRule1d.h>
00046 
00047 #include <G3Globals.h>
00048 
00049 #include <Matrix.h>
00050 #include <Vector.h>
00051 #include <ID.h>
00052 
00053 // Xiaoyan added from brick3d.hh   07/11/00
00054 #include <basics.h>
00055 #include <BJtensor.h>
00056 #include <nDarray.h>
00057 #include <stresst.h>
00058 #include <straint.h>
00059 
00060 //#include <node.h>
00061 //#include <mmodel.h>
00062 //#include <fe.h>
00063 #include <MatPoint3D.h>
00064 
00065 //#include <NDMaterial.h>
00066 #include <Template3Dep.h>
00067 
00068 
00069 #include <Node.h>
00070 //#include <NDMaterial.h>
00072 
00073 class EightNodeBrick: public Element
00074 {
00075 
00076   public:
00078     EightNodeBrick(int element_number,
00079                    int node_numb_1, int node_numb_2, int node_numb_3, int node_numb_4,
00080                    int node_numb_5, int node_numb_6, int node_numb_7, int node_numb_8,
00081                    NDMaterial * Globalmmodel, double b1, double b2, double b3,
00082      double r, double p);
00083      // int dir, double surflevel);
00085 
00086     EightNodeBrick ();
00088     ~EightNodeBrick();
00089 
00090     //Not needed Zhaohui
00091     //int Initialize(int element_number,
00092     //               int node_numb_1, int node_numb_2, int node_numb_3, int node_numb_4,
00093     //               int node_numb_5, int node_numb_6, int node_numb_7, int node_numb_8,
00094     //               NDMaterial * Globalmmodel, double b1, double b2, double b3,
00095     //               double p, double r);
00097      
00098     int getNumExternalNodes () const;
00100     const ID &getExternalNodes ();
00102     int getNumDOF (); 
00104     void setDomain(Domain *theDomain);
00105 
00107     int commitState ();
00109     int revertToLastCommit ();
00111     int revertToStart ();
00112 
00113     // public methods to obtain stiffness, mass, damping and residual information    
00114     // We haven't build the following functions. 
00115     // All the value of K M Dmp and F are nothing. just
00117     const Matrix &getTangentStiff (); 
00119     const Matrix &getSecantStiff ();     
00121     const Matrix &getDamp ();     
00123     const Matrix &getMass (); 
00124 
00126     const Matrix &getConsMass (); 
00127 
00129     void zeroLoad ();
00131     int addLoad(const Vector &addP);
00133     int addInertiaLoadToUnbalance(const Vector &accel);
00135     const Vector  FormEquiBodyForce(void);
00137     const Vector &getResistingForce ();
00139     const Vector &getResistingForceIncInertia ();
00140 
00142     int sendSelf (int commitTag, Channel &theChannel);
00144     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker 
00145     &theBroker);
00147     int displaySelf (Renderer &theViewer, int displayMode, float fact);
00149     void Print(ostream &s, int flag =0);   
00150     //    Do nothing with void Print (ostream &s, int flag =0);
00152     Response *setResponse (char **argv, int argc, Information &eleInformation);
00154     int getResponse (int responseID, Information &eleInformation);
00155  
00156   protected:
00157     
00158   private:
00159     // private attributes - a copy for each object of the class
00160 
00162     
00163     int numDOF;       
00164     ID  connectedExternalNodes; 
00165 
00166     Node *nd1Ptr;  
00167     Node *nd2Ptr;
00169     Node *nd3Ptr;
00171     Node *nd4Ptr;
00172     
00174     Node *nd5Ptr;
00176     Node *nd6Ptr;
00178     Node *nd7Ptr;
00180     Node *nd8Ptr;
00181 
00183     Matrix K;  
00184     Matrix C;  
00185     Matrix M;  
00186     Vector P;  
00187     Vector Q;  
00188     Vector bf;   // Body forces
00189     
00191     double rho;  
00192     double pressure; 
00193     int    order;   // Order of the quadrature rule
00194 
00195     //int dir;            // Direction of vertial coord.
00196     //double surflevel;   // free surface level above or below this element
00197 
00199 
00200     Matrix J;  
00201     Matrix L;  
00202     Matrix B;  // Strain interpolation matrix
00203     
00204  
00205     //    // static data - single copy for all objects of the class 
00206     //    static G3Matrix N; // Displacement interpolation matrix
00207      
00208     //    // private member functions - only objects of this class can call these
00209     //    void setJacobian (double r, double s, double t);         // Xiaoyan changed 
00210     //    double formDetJ (double r, double s, double t);    // xi, eta to r and s
00211     //    void formBMatrix (double r, double s, double t);    // and added t
00212     //    static void formNMatrix (double r, double s, double t);  // 07/06/00
00213     
00214   private:
00215     // element number (tag)
00217     
00218     double determinant_of_Jacobian;
00220         
00221     int nodes_in_brick;      // number of nodes ( from 8-20 //8 now Zhaohui)  
00222     
00224     
00225     NDMaterial * mmodel;     
00226     
00227     int r_integration_order; 
00228     int s_integration_order; 
00229     int t_integration_order; // Gauss-Legendre integration order in t direction
00230     
00231     // Now I want 3D array of Material points!
00232     // MatPoint3D[r_integration_order][s_integration_order][t_integration_order]
00234     MatPoint3D ** matpoint;  // pointer to array of Material Points
00235     
00236     // 3D array of material models for each Material points
00237     // NDMaterial *GPmmodel;  // pointer to array of material models for Material Points
00238     // Do we need this one? 
00239     
00240     //..NDMaterial  *MatPoint;  // Zhaohui  10-01-2000
00241     
00242     
00243     // this tensor is tangent constitutive tensor MS definition.
00244     // It represents the state at Material point before applying strain increment
00245     // that was produced by incremental displacements
00246     
00247     // Zhaohui  10-01-2000
00248     //..tensor * GPtangent_E;  // pointer to array of constitutive tensors for Material Points
00249     
00250     // this stress tensor is start_stress from my MS definition.
00251     // It represents the state at Material point before applying strain increment
00252     // that was produced by incremental displacements
00253     
00254     // Zhaohui  10-01-2000
00255     //..stresstensor * GPstress;  // pointer to array of stresstensors for Material Points
00256     
00257     // 3D array of stresstensors models for each Material points
00258     // this stress tensor is iterative stress.
00259     // It represents the state at Material point during iterative procedure on FEM level.
00260     // Zhaohui  10-01-2000
00261     //stresstensor * GPiterative_stress;  // pointer to array of stresstensors for Material Points
00262     //double * GPq_ast_iterative;  // pointer to array of iterative values of internal variable
00263     
00264     // 3D array of straintensors models for each Material points
00265     // this strain tensor is strain_increment from my MS definition.
00266     // It represents the additional strains that are to be
00267     // integrated. After numerical integration is done, the return value
00268     // ( from one of the numerical integration procedures )
00269     // is stresstensor that should then be put in GPstress place!
00270     // Zhaohui  10-01-2000
00271     //straintensor * GPstrain;  // pointer to array of straintensors for Material Points
00272     
00274     int  LM[24]; // for 8noded x 3 = 24
00275   public:
00276     //CONSTRUCTOR
00277     //EightNodeBrick(int tag = 0, // default constructor
00278     //               //int r_int_order = 0, //int s_int_order = 0, //int t_int_order = 0,
00279     //               int node_numb_1  = 0,
00280     //               int node_numb_2  = 0,
00281     //               int node_numb_3  = 0,
00282     //               int node_numb_4  = 0,
00283     //               int node_numb_5  = 0,
00284     //               int node_numb_6  = 0,
00285     //               int node_numb_7  = 0,
00286     //               int node_numb_8  = 0,
00287     //               NDMaterial * Globalmmodel = 0,
00288     //               //Node       * GlobalNodes = 0,   // maybe put NULL
00289     //               //tensor   * IN_tangent_E = 0,         //stresstensor * INstress = 0,                //stresstensor * INiterative_stress = 0,                   //double       * INq_ast_iterative =0,                   //straintensor * INstrain = 0
00290     //               EPState *eps =0
00291     //               );
00292 
00293     //void Initialize(int element_numb, // Initialize function
00294     //                //short int r_int_order,
00295     //                //short int s_int_order,
00296     //                //short int t_int_order,
00297     //                int node_numb_1,
00298     //                int node_numb_2,
00299     //                int node_numb_3,
00300     //                int node_numb_4,
00301     //                int node_numb_5,
00302     //                int node_numb_6,
00303     //                int node_numb_7,
00304     //                int node_numb_8,
00305     //                //Node * GlobalNodes,
00306     //      NDMaterial * Globalmmodel,
00307     //                EPState *eps );
00309                     
00310     
00311     void incremental_Update(void);
00313 
00314     tensor H_3D(double r1, double r2, double r3);
00316     tensor interp_poli_at(double r, double s, double t);
00318     tensor dh_drst_at(double r, double s, double t);
00319 
00320 
00321     //CE Dynamic Allocation for for brick3d s.
00323     EightNodeBrick & operator[](int subscript);
00324     //Finite_Element & operator[](int subscript);
00326    
00327     tensor getStiffnessTensor(void);
00329 
00330     void set_strain_stress_tensor(FILE *fp, double * u);
00332     tensor getMassTensor(void);
00334 
00335     tensor Jacobian_3D(tensor dh);
00337     tensor Jacobian_3Dinv(tensor dh);
00339     tensor Nodal_Coordinates(void);
00340 
00342     tensor incr_disp(void);
00344     tensor total_disp(void);
00345 
00347     tensor total_disp(FILE *fp, double * u);
00348 
00350     tensor stiffness_matrix(const tensor & K);
00352     tensor mass_matrix(const tensor & M);
00353 
00354 
00356     int  get_global_number_of_node(int local_node_number);
00358     int  get_Brick_Number(void);
00359 
00360 
00362     int * get_LM(void);
00363     //void set_LM(Node * node); // commented out temporarily 09-27-2000 Zhaohui
00364 
00366     double get_Gauss_p_c(short order, short point_numb);
00368     double get_Gauss_p_w(short order, short point_numb);
00369 
00371     tensor nodal_forces(void);
00373     tensor iterative_nodal_forces(void);
00375     tensor nodal_forces_from_stress(stresstensor & );
00376     // returns nodal forces for given incremental strain field in an element
00378     tensor linearized_nodal_forces(void);
00380     tensor update_stress_strain(tensor & disp);
00381 
00383     void report(char *);
00385     void reportshort(char *);
00387     void reportPAK(char *);
00389     void reportpqtheta(int);
00391     void reportLM(char *);
00393     void reportTensor(char *);
00395     void reportCIPIC(char *);
00397     void reportTensorF(FILE *);
00398 
00399     // Setting initial E according to the initial pressure
00400     //void setInitE(void);
00401     //void reportStressTensorF(FILE *);
00402 
00403 };
00404 
00405 
00406 #endif
00407 
00408 ÿ
Copyright Contact Us