xc
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, CrdTransf3d &theTransf, double rho = 0.0, int sectionTag = 0);
104 
105  ElasticBeam3d(int tag, int Nd1, int Nd2, SectionForceDeformation *section, CrdTransf3d &theTransf, double rho = 0.0);
106  ElasticBeam3d(const ElasticBeam3d &);
108  Element *getCopy(void) const;
109  ~ElasticBeam3d(void);
110 
111  int setInitialSectionDeformation(const Vector&);
112  inline const Vector &getInitialSectionDeformation(void) const
113  { return eInic; }
114  const Vector &getSectionDeformation(void) const;
115 
116  void setDomain(Domain *theDomain);
117 
118  virtual CrdTransf *getCoordTransf(void);
119  virtual const CrdTransf *getCoordTransf(void) const;
120 
121  int commitState(void);
122  int revertToLastCommit(void);
123  int revertToStart(void);
124 
125  double getRho(void) const
126  { return rho; }
127  void setRho(const double &r)
128  { rho= r; }
129  const Vector &getInitialStrain(void) const
130  { return eInic; }
131  void setInitialStrain(const Vector &e)
132  { eInic= e; }
133 
134  int update(void);
135  const Matrix &getTangentStiff(void) const;
136  const Matrix &getInitialStiff(void) const;
137  const Matrix &getMass(void) const;
138 
139  void zeroLoad(void);
140  int addLoad(ElementalLoad *theLoad, double loadFactor);
141  int addInertiaLoadToUnbalance(const Vector &accel);
142 
143  const Vector &getResistingForce(void) const;
144  const Vector &getResistingForceIncInertia(void) const;
145 
146  const Vector &getVDirStrongAxisGlobalCoord(bool initialGeometry) const;
147  const Vector &getVDirWeakAxisGlobalCoord(bool initialGeometry) const;
148 
149  int sendSelf(CommParameters &);
150  int recvSelf(const CommParameters &);
151 
152  void Print(std::ostream &s, int flag =0);
153 
156  inline double getAN1(void)
157  {
158  return q.AN1()+p0[0];
159  }
162  inline double getAN2(void)
163  {
164  return q.AN2();
165  }
168  inline double getN1(void)
169  {
170  return -q.AN1()-p0[0];
171  }
174  inline double getN2(void)
175  {
176  return q.AN2();
177  }
180  inline double getN(void) //Mean axial force.
181  {
182  return (-q.AN1()-p0[0]+q.AN2())/2.0;
183  }
186  inline double getAMz1(void)
187  {
188  return q.Mz1();
189  }
192  inline double getAMz2(void)
193  {
194  return q.Mz2();
195  }
198  inline double getMz1(void)
199  {
200  return -q.Mz1();
201  }
204  inline double getMz2(void)
205  {
206  return q.Mz2();
207  }
210  inline double getVy(void)
211  {
212  return q.Vy(theCoordTransf->getInitialLength()); //Shear along y.
213  }
216  inline double getAVy1(void)
217  {
218  return q.Vy(theCoordTransf->getInitialLength())+p0[1];
219  }
222  inline double getAVy2(void)
223  {
224  return -q.Vy(theCoordTransf->getInitialLength())+p0[2];
225  }
228  inline double getVy1(void)
229  {
230  return -q.Vy(theCoordTransf->getInitialLength())-p0[1];
231  }
234  inline double getVy2(void)
235  {
236  return p0[2]-q.Vy(theCoordTransf->getInitialLength());
237  }
240  inline double getVz(void)
241  {
242  return q.Vz(theCoordTransf->getInitialLength());
243  }
246  inline double getAVz1(void)
247  {
248  return q.Vz(theCoordTransf->getInitialLength())+p0[3];
249  }
252  inline double getAVz2(void)
253  {
254  return -q.Vz(theCoordTransf->getInitialLength())+p0[4];
255  }
258  inline double getVz1(void)
259  {
260  return -q.Vz(theCoordTransf->getInitialLength())-p0[3];
261  }
264  inline double getVz2(void)
265  {
266  return p0[4]-q.Vz(theCoordTransf->getInitialLength());
267  }
270  inline double getMy1(void)
271  {
272  return -q.My1();
273  }
276  inline double getMy2(void)
277  {
278  return q.My2();
279  }
282  inline double getT(void)
283  {
284  return q.T();
285  }
288  inline double getT1(void)
289  {
290  return -q.T1(); //+p0[0];
291  }
294  inline double getT2(void)
295  {
296  return q.T2();
297  }
298 
299  Response *setResponse(const std::vector<std::string> &argv, Information &info);
300  int getResponse(int responseID, Information &info);
301  };
302 } // end of XC namespace
303 
304 #endif
305 
306 
double getAN2(void)
Axial force which acts over the element in his front end.
Definition: ElasticBeam3d.h:162
double getVz(void)
Internal z shear force in the middle of the element.
Definition: ElasticBeam3d.h:240
double getVy1(void)
Internal y shear force at the back end.
Definition: ElasticBeam3d.h:228
double Vy(const double &L) const
Returns shear along y axis.
Definition: EsfBeamColumn3d.h:77
Base class for force deformation section models.
Definition: SectionForceDeformation.h:86
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: ElasticBeam3d.cpp:777
const double & T(void) const
Returns the torsor.
Definition: EsfBeamColumn3d.h:95
Float vector abstraction.
Definition: Vector.h:93
double getMy1(void)
Internal bending moment about y axis at the back end.
Definition: ElasticBeam3d.h:270
Base class for 3D beams.
Definition: ProtoBeam3d.h:39
const double & My1(void) const
Returns the moment about y in the back end.
Definition: EsfBeamColumn3d.h:80
void zeroLoad(void)
Zeroes the loads over the element.
Definition: ElasticBeam3d.cpp:428
const double & Mz2(void) const
Returns the moment about z in the front end.
Definition: EsfBeamColumn3d.h:71
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
double getMz1(void)
Internal bending moment about z axis at the back end.
Definition: ElasticBeam3d.h:198
const Vector & getVDirStrongAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ElasticBeam3d.cpp:579
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:40
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:87
ElasticBeam3d(int tag=0)
Default constructor.
Definition: ElasticBeam3d.cpp:104
double getN1(void)
Internal axial force at the back end.
Definition: ElasticBeam3d.h:168
double getVz2(void)
Internal z shear force at the front end.
Definition: ElasticBeam3d.h:264
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:643
double getAMz2(void)
Moment about z axis applied over the bar in its front end.
Definition: ElasticBeam3d.h:192
Base class for materials.
Definition: Material.h:91
double getVz1(void)
Internal z shear force at the back end.
Definition: ElasticBeam3d.h:258
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: ElasticBeam3d.cpp:683
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: ElasticBeam3d.cpp:503
const Vector & getVDirWeakAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ElasticBeam3d.cpp:600
double Vz(const double &L) const
Returns the shear along z.
Definition: EsfBeamColumn3d.h:92
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:671
double getN2(void)
Internal axial force at the front end.
Definition: ElasticBeam3d.h:174
double getAVz1(void)
z shear drived over the bar in its back end.
Definition: ElasticBeam3d.h:246
Base class for the finite elements.
Definition: Element.h:109
double getMy2(void)
Internal bending moment about y axis at the front end.
Definition: ElasticBeam3d.h:276
int revertToLastCommit(void)
Revert to the last commited state.
Definition: ElasticBeam3d.cpp:297
const Vector & getSectionDeformation(void) const
Return the section generalized strain.
Definition: ElasticBeam3d.cpp:266
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticBeam3d.cpp:209
double getN(void)
Internal axial force at the middle of the element.
Definition: ElasticBeam3d.h:180
double getT(void)
Internal torsional force in the middle of the element.
Definition: ElasticBeam3d.h:282
double getAMz1(void)
Moment about z axis that is applied over the bar in its back end.
Definition: ElasticBeam3d.h:186
3D beam column internal forces.
Definition: EsfBeamColumn3d.h:45
const Matrix & getMass(void) const
Return the mass matrix of the element.
Definition: ElasticBeam3d.cpp:399
virtual CrdTransf * getCoordTransf(void)
Returns (if possible) a pointer to the coordinate transformation.
Definition: ElasticBeam3d.cpp:217
ElasticBeam3d & operator=(const ElasticBeam3d &)
Assignment operator.
Definition: ElasticBeam3d.cpp:194
double getAVy1(void)
y shear drived over the bar in its back end.
Definition: ElasticBeam3d.h:216
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ElasticBeam3d.cpp:621
double getMz2(void)
Internal bending moment about z axis at the front end.
Definition: ElasticBeam3d.h:204
double AN1(void) const
Return the axial force in the back end.
Definition: EsfBeamColumn3d.h:59
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:658
double AN2(void) const
Return the axial force in the front end.
Definition: EsfBeamColumn3d.h:62
double getT2(void)
Internal torsional force at the front end.
Definition: ElasticBeam3d.h:294
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
double T2(void) const
Returns the torsor in the front end.
Definition: EsfBeamColumn3d.h:104
double getVy2(void)
Internal y shear force at the front end.
Definition: ElasticBeam3d.h:234
~ElasticBeam3d(void)
Constructor.
Definition: ElasticBeam3d.cpp:213
Base class for loads over elements.
Definition: ElementalLoad.h:77
double getT1(void)
Internal torsional force at the back end.
Definition: ElasticBeam3d.h:288
double getAN1(void)
Axial force which acts over the element in his back end.
Definition: ElasticBeam3d.h:156
const double & Mz1(void) const
Returns the moment about z in the back end.
Definition: EsfBeamColumn3d.h:65
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: ElasticBeam3d.cpp:628
double getAVz2(void)
z shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:252
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
int commitState(void)
Commit the current element state.
Definition: ElasticBeam3d.cpp:287
double getVy(void)
Internal shear force in the middle of the element.
Definition: ElasticBeam3d.h:210
Response * setResponse(const std::vector< std::string > &argv, Information &info)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: ElasticBeam3d.cpp:758
const double & My2(void) const
Returns the moment about y in the front end.
Definition: EsfBeamColumn3d.h:86
double getAVy2(void)
y shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:222
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix expresada en coordenadas globales.
Definition: ElasticBeam3d.cpp:307
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: ElasticBeam3d.cpp:534
int update(void)
Updates the element state.
Definition: ElasticBeam3d.cpp:303
double T1(void) const
Returns the torsor in the back end.
Definition: EsfBeamColumn3d.h:101
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ElasticBeam3d.cpp:224
int revertToStart(void)
Reverts the element to its initial state.
Definition: ElasticBeam3d.cpp:300
3D elastic beam element.
Definition: ElasticBeam3d.h:78
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:80