TwentySevenNodeBrick.h

Go to the documentation of this file.
00001 
00002 //
00003 // COPYRIGHT (C):     :-))
00004 // PROJECT:           Object Oriented Finite Element Program
00005 // FILE:              TwentySevenNodeBrick.h
00006 // CLASS:             TwentySevenNodeBrick
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:         all
00016 // DESIGNER:          Boris Jeremic, Guanzhou Jie
00017 // PROGRAMMER:        Guanzhou Jie and Boris Jeremic
00018 // DATE:              Oct. 2003
00019 // UPDATE HISTORY:
00020 //
00022 //
00023 
00024 
00025 
00026 #ifndef TWENTYSEVENNODEBRICK_H
00027 #define TWENTYSEVENNODEBRICK_H
00028 
00029 #ifndef _bool_h
00030 #include "bool.h"
00031 #endif
00032 
00033 #include <Element.h>
00034 #include <Node.h>
00035 
00036 
00037 #include <ID.h>
00038 #include <Renderer.h>
00039 #include <Domain.h>
00040 #include <string.h>
00041 
00042 #include <GaussQuadRule1d.h>
00043 
00044 #include <OPS_Globals.h>
00045 
00046 #include <Matrix.h>
00047 #include <Vector.h>
00048 #include <ID.h>
00049 
00050 #include <basics.h>
00051 #include <BJtensor.h>
00052 #include <nDarray.h>
00053 #include <stresst.h>
00054 #include <straint.h>
00055 
00056 #include <MatPoint3D.h>
00057 
00058 #include <Template3Dep.h>
00059 
00060 #include <NDMaterial.h>
00061 #include <Matrix.h>
00062 #include <Vector.h>
00063 #include <ID.h>
00064 #include <Renderer.h>
00065 #include <Domain.h>
00066 #include <string.h>
00067 #include <Information.h>
00068 #include <Channel.h>
00069 #include <FEM_ObjectBroker.h>
00070 #include <ElementResponse.h>
00071 #include <ElementalLoad.h>
00072 
00073 class Node;
00074 
00075 class TwentySevenNodeBrick: public Element
00076 {
00077 
00078   public:
00079     TwentySevenNodeBrick(int element_number,
00080                    int node_numb_1,  int node_numb_2,  int node_numb_3,  int node_numb_4,
00081                    int node_numb_5,  int node_numb_6,  int node_numb_7,  int node_numb_8,
00082                    int node_numb_9,  int node_numb_10, int node_numb_11, int node_numb_12,
00083                    int node_numb_13, int node_numb_14, int node_numb_15, int node_numb_16,
00084                    int node_numb_17, int node_numb_18, int node_numb_19, int node_numb_20,
00085                    int node_numb_21,  int node_numb_22,  int node_numb_23,  int node_numb_24,
00086                    int node_numb_25,  int node_numb_26,  int node_numb_27,
00087                    NDMaterial * Globalmmodel, double b1, double b2, double b3,
00088        double r, double p);
00089 
00090     TwentySevenNodeBrick ();
00091     ~TwentySevenNodeBrick();
00092 
00093     int getNumExternalNodes () const;
00094     const ID &getExternalNodes ();
00095     Node **getNodePtrs();
00096 
00097     int getNumDOF ();
00098     void setDomain(Domain *theDomain);
00099 
00100     // public methods to set the state of the element
00101     int commitState ();
00102     int revertToLastCommit ();
00103     int revertToStart ();
00104 
00105     // update, Guanzhou added Apr. 2004 to update incremental strain in the domain
00106     int update(void);
00107 
00108     // public methods to obtain stiffness, mass, damping and residual information
00109     // We haven't build the following functions.
00110     // All the value of K M Dmp and F are nothing.
00111     const Matrix &getTangentStiff ();
00112     const Matrix &getInitialStiff();
00113     const Matrix &getMass ();
00114 
00115     const Matrix &getConsMass ();
00116     const Matrix &getLumpedMass ();
00117 
00118     void zeroLoad ();
00119     int addLoad(ElementalLoad *theLoad, double loadFactor);
00120     //int addLoad(const Vector &addP);
00121     int addInertiaLoadToUnbalance(const Vector &accel);
00122     const Vector  FormEquiBodyForce(void);
00123     const Vector &getResistingForce ();
00124     const Vector &getResistingForceIncInertia ();
00125 
00126     // public methods for element output
00127     int sendSelf (int commitTag, Channel &theChannel);
00128     int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker
00129       &theBroker);
00130     int displaySelf (Renderer &theViewer, int displayMode, float fact);
00131     void Print(OPS_Stream &s, int flag =0);
00132     //    Do nothing with void Print (OPS_Stream &s, int flag =0);
00133     //    use Brick3D report.  08/16/00
00134     Response *setResponse (const char **argv, int argc, Information &eleInformation);
00135     int getResponse (int responseID, Information &eleInformation);
00136 
00137   protected:
00138 
00139   private:
00140     // private attributes - a copy for each object of the class
00141 
00142     //NDMaterial * **theMaterial; // pointer to the ND material objects
00143 
00144     int numDOF;          // Number of element DOF
00145     ID  connectedExternalNodes; // Tags of quad nodes
00146 
00147     Matrix *Ki;
00148     Node *theNodes[27];
00149 
00150     static Matrix K;    // Element stiffness Matrix
00151     static Matrix C;    // Element damping matrix
00152     static Matrix M;    // Element mass matrix
00153     static Vector P;    // Element resisting force vector
00154     Vector Q;    // Applied nodal loads
00155     Vector bf;    // Body forces
00156 
00157     // double thickness;  // Element thickness
00158     double rho;    // Mass per unit volume DO WE GET THIS ONE OUT!!!
00159     double pressure;  // Normal surface traction (pressure) over entire element
00160     int    order;    // Order of the quadrature rule
00161 
00162     //Matrix J;    // Jacobian of transformation
00163     //Matrix L;    // Inverse of J
00164     //Matrix B;    // Strain interpolation matrix
00165 
00166 
00167   private:
00168 
00169     double determinant_of_Jacobian;
00170     int nodes_in_brick;      // number of nodes ( 27 now Guanzhou)
00171 
00172     NDMaterial * mmodel;     // pointer to GLOBAL material models
00173 
00174     int r_integration_order; // Gauss-Legendre integration order in r direction
00175     int s_integration_order; // Gauss-Legendre integration order in s direction
00176     int t_integration_order; // Gauss-Legendre integration order in t direction
00177 
00178     // Now I want 3D array of Material points!
00179     // MatPoint3D[r_integration_order][s_integration_order][t_integration_order]
00180     // 3D array of Material points
00181     MatPoint3D ** matpoint;  // pointer to array of Material Points
00182 
00183     // this is LM array. This array holds DOFs for this element
00184     //int  LM[60]; // for 20noded x 3 = 60
00185   public:
00186 
00187     void incremental_Update(void);
00188     //void iterative_Update(void);
00189 
00190     tensor H_3D(double r1, double r2, double r3);
00191     tensor interp_poli_at(double r, double s, double t);
00192     tensor dh_drst_at(double r, double s, double t);
00193 
00194 
00195     TwentySevenNodeBrick & operator[](int subscript);
00196 
00197     tensor getStiffnessTensor(void);
00198 
00199     void set_strain_stress_tensor(FILE *fp, double * u);
00200     tensor getMassTensor(void);
00201 
00202     tensor Jacobian_3D(tensor dh);
00203     tensor Jacobian_3Dinv(tensor dh);
00204     tensor Nodal_Coordinates(void);
00205 
00206     tensor incr_disp(void);
00207     tensor total_disp(void);
00208 
00209     tensor total_disp(FILE *fp, double * u);
00210 
00211     tensor stiffness_matrix(const tensor & K);
00212     tensor mass_matrix(const tensor & M);
00213 
00214 
00215     int  get_global_number_of_node(int local_node_number);
00216     int  get_Brick_Number(void);
00217 
00218 
00219     //int * get_LM(void);
00220     //void set_LM(Node * node); // commented out temporarily 09-27-2000 Zhaohui
00221 
00222     //these two files are originally in fe.h
00223     double get_Gauss_p_c(short order, short point_numb);
00224     double get_Gauss_p_w(short order, short point_numb);
00225 
00226     // returns nodal forces for given stress field in an element
00227     tensor nodal_forces(void);
00228     // returns nodal forces for ITERATIVE stress field in an element
00229     tensor iterative_nodal_forces(void);
00230     // returns nodal forces for given constant stress field in the element
00231     tensor nodal_forces_from_stress(stresstensor & );
00232     // returns nodal forces for given incremental strain field in an element
00233     // by using the linearized constitutive tensor from the begining of the step !
00234     tensor linearized_nodal_forces(void);
00235     // updates Material point stresses and strains from given displacements
00236     tensor update_stress_strain(tensor & disp);
00237 
00238     void report(char *);
00239     void reportshort(char *);
00240     void reportPAK(char *);
00241     void reportpqtheta(int);
00242     //void reportLM(char *);
00243     void computeGaussPoint(void);
00244     void reportCIPIC(char *);
00245     void reportTensorF(FILE *);
00246     Vector getWeightofGP(void);
00247 
00248 
00249     // Setting initial E according to the initial pressure
00250     //void setInitE(void);
00251     //void reportStressTensorF(FILE *);
00252 
00253 };
00254 
00255 
00256 #endif
00257 

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