UpdatedLagrangianBeam2D.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 ** See file 'COPYRIGHT'  in main directory for information on usage   **
00010 ** and redistribution of OpenSees, and for a DISCLAIMER OF ALL        **
00011 ** WARRANTIES.                                                        **
00012 **                                                                    **
00013 ** UpdatedLagrangianBeam2D.h: interface for UpdatedLagrangianBeam2D   **
00014 ** Developed by:                                                      **
00015 **    Rohit Kaul       (rkaul@stanford.edu)                           **
00016 **    Greg Deierlein   (ggd@stanford.edu)                             **
00017 **                                                                    **
00018 **           John A. Blume Earthquake Engineering Center              **
00019 **                    Stanford University                             **
00020 ** ****************************************************************** **/
00021 
00022 
00023 // UpdatedLagrangianBeam2D.h: interface for the UpdatedLagrangianBeam2D class
00024 // Written: rkaul
00025 //
00026 // Description: This file contains the class definition for UpdatedLagrangianBeam2D.
00027 
00028 // UpdatedLagrangianBeam2D is an abstract class providing most methods required by
00029 // the base class "Element", for 2D beam-column elements. Geometric
00030 // nonlinearity is incorporated at this level using updated lagrangian
00031 // formulation
00032 
00033 #ifndef UpdatedLagrangianElement2D
00034 #define UpdatedLagrangianElement2D
00035 
00036 
00037 #include <bool.h>
00038 #include <Node.h>
00039 #include <Matrix.h>
00040 #include <Vector.h>
00041 #include <Element.h>
00042 #include <ID.h>
00043 
00044 #define min_(a,b)  (((a) < (b)) ? (a) : (b))
00045 #define max_(a,b)  (((a) > (b)) ? (a) : (b))
00046 #define sign(a)    (((a) < (0)) ?(-1) : (1))
00047 
00048 class Response;
00049 
00050 class UpdatedLagrangianBeam2D : public Element
00051 {
00052 public:
00053 
00054   UpdatedLagrangianBeam2D(int classTag);
00055   UpdatedLagrangianBeam2D(int tag, int classTag, int nd1, int nd2, bool islinear = false);
00056 
00057   virtual ~UpdatedLagrangianBeam2D();
00058 
00060   // Overridden public methods, defined in Element class
00061   // (see ~/OpenSees/SRC/element/Element.h)
00063  public:
00064   virtual int update(void);
00065   // void       setEndRelease(ID &g);
00066   
00067   // methods dealing with nodes and number of external dof
00068   int           getNumExternalNodes(void) const;
00069   const ID &getExternalNodes(void);
00070   Node **getNodePtrs(void);
00071 
00072   int           getNumDOF(void);
00073   virtual void setDomain(Domain *theDomain);
00074   
00075   virtual int commitState(void);
00076   virtual int revertToLastCommit(void);
00077   
00078   // methods to return the current linearized stiffness,
00079   // damping and mass matrices
00080   virtual const Matrix &getTangentStiff(void);
00081   virtual const Matrix &getInitialStiff(void);
00082   virtual const Matrix &getMass(void);
00083   
00084   // methods for returning and applying loads
00085   virtual Vector &getUVLoadVector(double q1, double q2);
00086   void  zeroLoad(void);
00087   int           addLoad(const Vector &load);
00088   int     addLoad(ElementalLoad *theLoad, double loadFactor)
00089     { return -1;}
00090   int     addInertiaLoadToUnbalance(const Vector &accel)
00091     { return -1;}
00092   
00093   virtual const Vector &getResistingForce(void);
00094   const Vector &getResistingForceIncInertia(void);
00095   
00096   // method for graphics
00097   virtual int displaySelf(Renderer &theViewer,
00098                           int displayMode, float fact);
00099   
00100   virtual Response *setResponse(const char **argv, int argc,
00101                                 Information &eleInformation);
00102   virtual int getResponse(int responseID, Information &eleInformation);
00103   
00104  protected:
00105   
00106   virtual void  getLocalStiff(Matrix &K)=0;
00107   virtual void  getLocalMass(Matrix &M)=0;
00108   
00109   
00110   void  getIncrLocalDisp(Vector &localDisp);
00111   void  getTrialNaturalDisp(Vector &localDisp);
00112   void    getIncrNaturalDisp(Vector &nDisp);
00113   void    getConvLocalDisp(Vector &lDisp);
00114   void    getTrialLocalDisp(Vector &lDisp);
00115   void    getTrialLocalForce(Vector &force);
00116   
00117   virtual       void    updateState(void);
00118 
00119   void  addInternalGeomStiff(Matrix &K);
00120   void  addExternalGeomStiff(Matrix &K);
00121   
00122   void  transformToGlobal(Matrix &K);
00123   
00124  protected:
00125   
00126   bool    isLinear;
00127   int     numDof;
00128   double  L, sn, cs, massDof;
00129   
00130   ID      connectedExternalNodes;
00131   Vector  load;
00132   
00133   Node    *end1Ptr, *end2Ptr;
00134   double  L_hist, cs_hist, sn_hist;
00135   
00136   Vector  eleForce, eleForce_hist;
00137 
00138   int     nodeRecord, dofRecord;
00139   int     m_Iter;
00140 
00141   Matrix *Ki;
00142 
00143   static Matrix K, Kg, Kt; // stiffness matrices
00144   static Matrix M; // mass matrix
00145   static Matrix D; // damping matrix
00146   static Matrix T; // transformation matrix
00147   
00148   static Vector disp;
00149   static Vector force;
00150   
00151   // ZeroVector and ZeroMatrix should always have zero value,
00152   // used for quick return
00153   static Vector ZeroVector;
00154   static Matrix ZeroMatrix;
00155   
00156   // used for temporarily storing nodal displacements
00157   static Vector end1IncrDisp;
00158   static Vector end2IncrDisp;
00159 
00160   static Node *theNodes[2];
00161 };
00162 
00163 
00164 #endif // !defined(UpdatedLagrangianElement2D)

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