XC Open source finite element analysis program
ElasticBeam2d.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.10 $
48 // $Date: 2003/03/11 20:42:39 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/elasticBeamColumn/ElasticBeam2d.h,v $
50 
51 
52 // File: ~/model/ElasticBeam2d.h
53 //
54 // Written: fmk 11/95
55 // Revised:
56 //
57 // Purpose: This file contains the class definition for ElasticBeam2d.
58 // ElasticBeam2d is a plane frame member.
59 
60 #ifndef ElasticBeam2d_h
61 #define ElasticBeam2d_h
62 
63 #include <domain/mesh/element/truss_beam_column/ProtoBeam2d.h>
64 #include <utility/matrix/Matrix.h>
65 #include <utility/matrix/Vector.h>
66 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
67 #include "domain/mesh/element/utils/coordTransformation/CrdTransf2d.h"
68 
69 namespace XC {
70 class Channel;
71 class Information;
72 class Response;
73 class CrossSectionProperties3d;
74 
76 //
79  {
80  private:
81  Vector eInic;
82  double alpha;
83  double d;
84 
85  double rho;
86 
87  static Matrix K;
88  static Vector P;
89 
90  static Matrix kb;
91  mutable Vector q;
92  FVectorBeamColumn2d q0; // Fixed end forces in basic system
93  FVectorBeamColumn2d p0; // Reactions in basic system
94 
95  CrdTransf2d *theCoordTransf;
96 
97  void set_transf(const CrdTransf *trf);
98  protected:
99  DbTagData &getDbTagData(void) const;
100  int sendData(CommParameters &cp);
101  int recvData(const CommParameters &cp);
102 
103  public:
104  ElasticBeam2d(int tag= 0);
105  ElasticBeam2d(int tag,const Material *m,const CrdTransf *trf);
106  ElasticBeam2d(int tag, double A, double E, double I,
107  int Nd1, int Nd2, CrdTransf2d &theTransf,
108  double alpha = 0.0, double d = 0.0, double rho = 0.0);
109  ElasticBeam2d(const ElasticBeam2d &otro);
110  ElasticBeam2d &operator=(const ElasticBeam2d &otro);
111  Element *getCopy(void) const;
112  ~ElasticBeam2d(void);
113 
114  int setInitialSectionDeformation(const Vector&);
115  inline const Vector &getInitialSectionDeformation(void) const
116  { return eInic; }
117  const Vector &getSectionDeformation(void) const;
118 
119  void setDomain(Domain *theDomain);
120 
121  virtual CrdTransf *getCoordTransf(void);
122  virtual const CrdTransf *getCoordTransf(void) const;
123 
124  int commitState(void);
125  int revertToLastCommit(void);
126  int revertToStart(void);
127 
128  double getRho(void) const
129  { return rho; }
130  void setRho(const double &r)
131  { rho= r; }
132  inline double getDepth(void) const
133  { return d; }
134  void setDepth(const double &h)
135  { d= h; }
136  const Vector &getInitialStrain(void) const
137  { return eInic; }
138  void setInitialStrain(const Vector &e)
139  { eInic= e; }
140 
141  int update(void);
142  const Matrix &getTangentStiff(void) const;
143  const Matrix &getInitialStiff(void) const;
144  const Matrix &getMass(void) const;
145 
146  void zeroLoad(void);
147  int addLoad(ElementalLoad *theLoad, double loadFactor);
148  int addInertiaLoadToUnbalance(const Vector &accel);
149 
150  const Vector &getVDirStrongAxisGlobalCoord(void) const;
151  const Vector &getVDirWeakAxisGlobalCoord(void) const;
152 
153  const Vector &getResistingForce(void) const;
154  const Vector &getResistingForceIncInertia(void) const;
155 
156  int sendSelf(CommParameters &);
157  int recvSelf(const CommParameters &);
158 
159  void Print(std::ostream &s, int flag = 0);
161  inline double getV(void)
162  { return (q(1)+q(2))/theCoordTransf->getInitialLength(); }
164  inline double getV1(void)
165  { return -getV()-p0[1]; }
167  inline double getV2(void)
168  { return -getV()+p0[2]; }
170  inline double getN1(void)
171  { return q(0)-p0[0]; }
173  inline double getN2(void)
174  { return q(0); }
176  inline double getM1(void)
177  { return -q(1); }
179  inline double getM2(void)
180  { return q(2); }
181 
182 
183  Response *setResponse(const std::vector<std::string> &argv, Parameter &param);
184  int getResponse(int responseID, Information &info);
185 
186  int setParameter(const std::vector<std::string> &argv, Parameter &param);
187  int updateParameter(int parameterID, Information &info);
188 
189  };
190 } // end of XC namespace
191 
192 #endif
193 
194 
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
Base class for materials.
Definition: Material.h:85
double getN1(void)
Internal axial force at the back end.
Definition: ElasticBeam2d.h:170
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
double getN2(void)
Internal axial force at the front end.
Definition: ElasticBeam2d.h:173
int commitState(void)
Consuma el estado of the element.
Definition: ElasticBeam2d.cpp:273
Definition: Vector.h:82
const Vector & getVDirWeakAxisGlobalCoord(void) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ElasticBeam2d.cpp:311
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: ElasticBeam2d.cpp:478
double getV(void)
Internal shear force in the middle of the element.
Definition: ElasticBeam2d.h:161
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticBeam2d.cpp:195
double getV1(void)
Internal shear force at the back end.
Definition: ElasticBeam2d.h:164
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: ElasticBeam2d.cpp:538
Information about an element.
Definition: Information.h:80
const Vector & getVDirStrongAxisGlobalCoord(void) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ElasticBeam2d.cpp:294
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ElasticBeam2d.cpp:377
ElasticBeam2d & operator=(const ElasticBeam2d &otro)
Assignment operator.
Definition: ElasticBeam2d.cpp:174
double getInitialLength(void) const
Return the longitud inicial of the element.
Definition: CrdTransf2d.h:103
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ElasticBeam2d.cpp:211
Definition: Matrix.h:82
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:40
Definition: Parameter.h:65
2D elastic beam element.
Definition: ElasticBeam2d.h:78
double getV2(void)
Internal shear force at the front end.
Definition: ElasticBeam2d.h:167
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: ElasticBeam2d.cpp:545
double getM1(void)
Internal bending moment at the back end.
Definition: ElasticBeam2d.h:176
virtual CrdTransf * getCoordTransf(void)
Returns (if possible) a pointer to the coordinate transformation.
Definition: ElasticBeam2d.cpp:203
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: ElasticBeam2d.cpp:586
Communication parameters between processes.
Definition: CommParameters.h:65
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: ElasticBeam2d.cpp:554
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
================================================================================
Definition: ContinuaReprComponent.h:34
int update(void)
Actualiza el estado of the element.
Definition: ElasticBeam2d.cpp:289
double getM2(void)
Internal bending moment at the front end.
Definition: ElasticBeam2d.h:179
Base class for 2D beam elements.
Definition: ProtoBeam2d.h:40
Definition: Response.h:71
void zeroLoad(void)
Anula el load vector aplicadas of the element.
Definition: ElasticBeam2d.cpp:400