XC Open source finite element analysis program
ElasticBeam3d.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.8 $
48 // $Date: 2003/03/11 20:42:40 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/elasticBeamColumn/ElasticBeam3d.h,v $
50 
51 
52 // File: ~/model/ElasticBeam3d.h
53 //
54 // Written: fmk 11/95
55 // Revised:
56 //
57 // Purpose: This file contains the class definition for ElasticBeam3d.
58 // ElasticBeam3d is a plane frame member.
59 
60 #ifndef ElasticBeam3d_h
61 #define ElasticBeam3d_h
62 
63 #include <domain/mesh/element/truss_beam_column/ProtoBeam3d.h>
64 #include <utility/matrix/Matrix.h>
65 #include "domain/mesh/element/truss_beam_column/EsfBeamColumn3d.h"
66 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
67 #include "domain/mesh/element/utils/coordTransformation/CrdTransf3d.h"
68 
69 namespace XC {
70 class Channel;
71 class Information;
72 class Response;
73 class SectionForceDeformation;
74 
76 //
78 class ElasticBeam3d : public ProtoBeam3d
79  {
80  private:
81  Vector eInic;
82  double rho;
83  int sectionTag;
84  mutable EsfBeamColumn3d q;
87 
88  CrdTransf3d *theCoordTransf;
89 
90  static Matrix K;
91  static Vector P;
92 
93  static Matrix kb;
94 
95  void set_transf(const CrdTransf *trf);
96  protected:
97  DbTagData &getDbTagData(void) const;
98  int sendData(CommParameters &cp);
99  int recvData(const CommParameters &cp);
100  public:
101  ElasticBeam3d(int tag= 0);
102  ElasticBeam3d(int tag,const Material *m,const CrdTransf *trf);
103  ElasticBeam3d(int tag, double A, double E, double G, double Jx, double Iy, double Iz, int Nd1, int Nd2,
104  CrdTransf3d &theTransf, double rho = 0.0, int sectionTag = 0);
105 
106  ElasticBeam3d(int tag, int Nd1, int Nd2, SectionForceDeformation *section, CrdTransf3d &theTransf, double rho = 0.0);
107  ElasticBeam3d(const ElasticBeam3d &otro);
108  ElasticBeam3d &operator=(const ElasticBeam3d &otro);
109  Element *getCopy(void) const;
110  ~ElasticBeam3d(void);
111 
112  int setInitialSectionDeformation(const Vector&);
113  inline const Vector &getInitialSectionDeformation(void) const
114  { return eInic; }
115  const Vector &getSectionDeformation(void) const;
116 
117  void setDomain(Domain *theDomain);
118 
119  virtual CrdTransf *getCoordTransf(void);
120  virtual const CrdTransf *getCoordTransf(void) const;
121 
122  int commitState(void);
123  int revertToLastCommit(void);
124  int revertToStart(void);
125 
126  double getRho(void) const
127  { return rho; }
128  void setRho(const double &r)
129  { rho= r; }
130  const Vector &getInitialStrain(void) const
131  { return eInic; }
132  void setInitialStrain(const Vector &e)
133  { eInic= e; }
134 
135  int update(void);
136  const Matrix &getTangentStiff(void) const;
137  const Matrix &getInitialStiff(void) const;
138  const Matrix &getMass(void) const;
139 
140  void zeroLoad(void);
141  int addLoad(ElementalLoad *theLoad, double loadFactor);
142  int addInertiaLoadToUnbalance(const Vector &accel);
143 
144  const Vector &getResistingForce(void) const;
145  const Vector &getResistingForceIncInertia(void) const;
146 
147  const Vector &getVDirStrongAxisGlobalCoord(void) const;
148  const Vector &getVDirWeakAxisGlobalCoord(void) const;
149 
150  int sendSelf(CommParameters &);
151  int recvSelf(const CommParameters &);
152 
153  void Print(std::ostream &s, int flag =0);
154 
155  inline double getAN1(void) //Axial force which acts over the element in his back end.
156  { //¡Warning! call "calc_resisting_force" before calling this method.
157  return q.AN1()+p0[0];
158  }
159  inline double getAN2(void) //Axial force which acts over the element in his front end.
160  { //¡Warning! call "calc_resisting_force" before calling this method.
161  return q.AN2();
162  }
164  inline double getN1(void)
165  { //¡Warning! call "calc_resisting_force" before calling this method.
166  return -q.AN1()-p0[0];
167  }
169  inline double getN2(void)
170  { //¡Warning! call "calc_resisting_force" before calling this method.
171  return q.AN2();
172  }
174  inline double getN(void) //Mean axial force.
175  { //¡Warning! call "calc_resisting_force" before calling this method.
176  return (-q.AN1()-p0[0]+q.AN2())/2.0;
177  }
178  inline double getAMz1(void)
179  { //¡Warning! call "calc_resisting_force" before calling this method.
180  return q.Mz1(); //Momento z que se ejerce sobre la barra en su extremo dorsal.
181  }
182  inline double getAMz2(void)
183  { //¡Warning! call "calc_resisting_force" before calling this method.
184  return q.Mz2(); //Momento z que se ejerce sobre la barra en su extremo frontal.
185  }
187  inline double getMz1(void)
188  { //¡Warning! call "calc_resisting_force" before calling this method.
189  return -q.Mz1(); //Momento z en su extremo dorsal.
190  }
192  inline double getMz2(void)
193  { //¡Warning! call "calc_resisting_force" before calling this method.
194  return q.Mz2(); //Momento z en su extremo frontal.
195  }
197  inline double getVy(void)
198  { //¡Warning! call "calc_resisting_force" before calling this method.
199  return q.Vy(theCoordTransf->getInitialLength()); //Cortante y.
200  }
201  inline double getAVy1(void)
202  { //¡Warning! call "calc_resisting_force" before calling this method.
203  return q.Vy(theCoordTransf->getInitialLength())+p0[1]; //Cortante y que se ejerce sobre la barra en su extremo dorsal.
204  }
205  inline double getAVy2(void)
206  { //¡Warning! call "calc_resisting_force" before calling this method.
207  return -q.Vy(theCoordTransf->getInitialLength())+p0[2]; //Cortante y que se ejerce sobre la barra en su extremo frontal.
208  }
210  inline double getVy1(void)
211  { //¡Warning! call "calc_resisting_force" before calling this method.
212  return -q.Vy(theCoordTransf->getInitialLength())-p0[1]; //Cortante y en su extremo dorsal.
213  }
215  inline double getVy2(void)
216  { //¡Warning! call "calc_resisting_force" before calling this method.
217  return p0[2]-q.Vy(theCoordTransf->getInitialLength()); //Cortante y en su extremo frontal.
218  }
220  inline double getVz(void)
221  { //¡Warning! call "calc_resisting_force" before calling this method.
222  return q.Vz(theCoordTransf->getInitialLength()); //Cortante z.
223  }
224  inline double getAVz1(void)
225  { //¡Warning! call "calc_resisting_force" before calling this method.
226  return q.Vz(theCoordTransf->getInitialLength())+p0[3]; //Cortante z que se ejerce sobre la barra en su extremo dorsal.
227  }
228  inline double getAVz2(void)
229  { //¡Warning! call "calc_resisting_force" before calling this method.
230  return -q.Vz(theCoordTransf->getInitialLength())+p0[4]; //Cortante z que se ejerce sobre la barra en su extremo frontal.
231  }
233  inline double getVz1(void)
234  { //¡Warning! call "calc_resisting_force" before calling this method.
235  return -q.Vz(theCoordTransf->getInitialLength())-p0[3]; //Cortante z en su extremo dorsal.
236  }
238  inline double getVz2(void)
239  { //¡Warning! call "calc_resisting_force" before calling this method.
240  return p0[4]-q.Vz(theCoordTransf->getInitialLength()); //Cortante z en su extremo frontal.
241  }
243  inline double getMy1(void)
244  { //¡Warning! call "calc_resisting_force" before calling this method.
245  return -q.My1(); //Momento y en el extremo dorsal.
246  }
248  inline double getMy2(void)
249  { //¡Warning! call "calc_resisting_force" before calling this method.
250  return q.My2(); //Momento y en el extremo frontal.
251  }
253  inline double getT(void) //Torsor en la barra.
254  { //¡Warning! call "calc_resisting_force" before calling this method.
255  return q.T();
256  }
258  inline double getT1(void)
259  { //¡Warning! call "calc_resisting_force" before calling this method.
260  return -q.T1(); //+p0[0]; //Torsor en el extremo dorsal.
261  }
263  inline double getT2(void)
264  { //¡Warning! call "calc_resisting_force" before calling this method.
265  return q.T2(); //Torsor en el extremo frontal.
266  }
267 
268  Response *setResponse(const std::vector<std::string> &argv, Information &info);
269  int getResponse(int responseID, Information &info);
270  };
271 } // end of XC namespace
272 
273 #endif
274 
275 
double getVy1(void)
Internal shear force at the back end.
Definition: ElasticBeam3d.h:210
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
int update(void)
Actualiza el estado of the element.
Definition: ElasticBeam3d.cpp:303
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:650
double Vy(const double &L) const
Returns the cortante Vy.
Definition: EsfBeamColumn3d.h:77
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:635
ElasticBeam3d & operator=(const ElasticBeam3d &otro)
Oparador asignación.
Definition: ElasticBeam3d.cpp:194
Base class for materials.
Definition: Material.h:85
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
double getN1(void)
Internal axial force at the back end.
Definition: ElasticBeam3d.h:164
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:40
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:620
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: ElasticBeam3d.cpp:503
Definition: Vector.h:82
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
double getMz1(void)
Internal bending moment at the back end.
Definition: ElasticBeam3d.h:187
3D beam column internal forces.
Definition: EsfBeamColumn3d.h:45
double getT2(void)
Internal torsional force at the front end.
Definition: ElasticBeam3d.h:263
double getVz2(void)
Internal shear force at the front end.
Definition: ElasticBeam3d.h:238
double AN2(void) const
Return the fuerza axil que se ejerce sobre la barra en el extremo frontal.
Definition: EsfBeamColumn3d.h:62
~ElasticBeam3d(void)
Constructor.
Definition: ElasticBeam3d.cpp:213
3D elastic beam element.
Definition: ElasticBeam3d.h:78
Information about an element.
Definition: Information.h:80
const double & Mz1(void) const
Returns the momento z en el extremo dorsal.
Definition: EsfBeamColumn3d.h:65
const Vector & getSectionDeformation(void) const
Return the section generalized strain.
Definition: ElasticBeam3d.cpp:266
ElasticBeam3d(int tag=0)
Default constructor.
Definition: ElasticBeam3d.cpp:104
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: ElasticBeam3d.cpp:613
double T2(void) const
Returns the torsor en el extremo frontal.
Definition: EsfBeamColumn3d.h:104
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ElasticBeam3d.cpp:224
double getVy(void)
Internal shear force in the middle of the element.
Definition: ElasticBeam3d.h:197
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:80
const double & T(void) const
Returns the torsor.
Definition: EsfBeamColumn3d.h:95
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: ElasticBeam3d.cpp:675
Base class for 3D beams.
Definition: ProtoBeam3d.h:39
const double & My2(void) const
Returns the momento y en el extremo frontal.
Definition: EsfBeamColumn3d.h:86
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticBeam3d.cpp:209
double getT(void)
Internal torsional force in the middle of the element.
Definition: ElasticBeam3d.h:253
const Vector & getVDirWeakAxisGlobalCoord(void) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ElasticBeam3d.cpp:596
double Vz(const double &L) const
Returns the cortante Vy.
Definition: EsfBeamColumn3d.h:92
const double & My1(void) const
Returns the momento y en el extremo dorsal.
Definition: EsfBeamColumn3d.h:80
const Matrix & getMass(void) const
Return the matriz de masas of the element.
Definition: ElasticBeam3d.cpp:399
double AN1(void) const
Return the fuerza axil que se ejerce sobre la barra en el extremo dorsal.
Definition: EsfBeamColumn3d.h:59
Definition: Matrix.h:82
double T1(void) const
Returns the torsor en el extremo dorsal.
Definition: EsfBeamColumn3d.h:101
double getMy1(void)
Internal bending moment at the back end.
Definition: ElasticBeam3d.h:243
const Vector & getVDirStrongAxisGlobalCoord(void) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ElasticBeam3d.cpp:579
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix expresada en coordenadas globales.
Definition: ElasticBeam3d.cpp:307
int commitState(void)
Consuma el estado of the element.
Definition: ElasticBeam3d.cpp:287
const double & Mz2(void) const
Returns the momento z en el extremo frontal.
Definition: EsfBeamColumn3d.h:71
double getVz1(void)
Internal shear force at the back end.
Definition: ElasticBeam3d.h:233
double getN2(void)
Internal axial force at the front end.
Definition: ElasticBeam3d.h:169
double getT1(void)
Internal torsional force at the back end.
Definition: ElasticBeam3d.h:258
double getMy2(void)
Internal bending moment at the front end.
Definition: ElasticBeam3d.h:248
Base class for force deformation section models. Constitutive equations of the section.
Definition: SectionForceDeformation.h:86
double getN(void)
Internal axial force at the middle of the element.
Definition: ElasticBeam3d.h:174
virtual CrdTransf * getCoordTransf(void)
Returns (if possible) a pointer to the coordinate transformation.
Definition: ElasticBeam3d.cpp:217
double getVy2(void)
Internal shear force at the front end.
Definition: ElasticBeam3d.h:215
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
double getMz2(void)
Internal bending moment at the front end.
Definition: ElasticBeam3d.h:192
double getVz(void)
Internal shear force in the middle of the element.
Definition: ElasticBeam3d.h:220
void zeroLoad(void)
Anula el load vector aplicadas of the element.
Definition: ElasticBeam3d.cpp:428
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:663
Definition: Response.h:71