xc
ElasticBeam3d.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.8 $
49 // $Date: 2003/03/11 20:42:40 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/elasticBeamColumn/ElasticBeam3d.h,v $
51 
52 
53 // File: ~/model/ElasticBeam3d.h
54 //
55 // Written: fmk 11/95
56 // Revised:
57 //
58 // Purpose: This file contains the class definition for ElasticBeam3d.
59 // ElasticBeam3d is a plane frame member.
60 
61 #ifndef ElasticBeam3d_h
62 #define ElasticBeam3d_h
63 
64 #include "domain/mesh/element/truss_beam_column/elasticBeamColumn/ElasticBeam3dBase.h"
65 #include "utility/matrix/Matrix.h"
66 #include "domain/mesh/element/truss_beam_column/EsfBeamColumn3d.h"
67 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
68 #include "domain/mesh/element/utils/coordTransformation/CrdTransf3d.h"
69 
70 namespace XC {
71 class Channel;
72 class Information;
73 class Response;
74 class SectionForceDeformation;
75 
77 //
80  {
81  private:
82  int releasez;
83  int releasey;
84  mutable EsfBeamColumn3d q;
87 
88  static Matrix K;
89  static Vector P;
90 
91  static Matrix kb;
92 
93  protected:
94  DbTagData &getDbTagData(void) const;
95  int sendData(Communicator &comm);
96  int recvData(const Communicator &comm);
97  public:
98  ElasticBeam3d(int tag= 0);
99  ElasticBeam3d(int tag, const Material *m,const CrdTransf *trf);
100  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 releasez= 0, int releasey= 0);
101 
102  ElasticBeam3d(int tag, int Nd1, int Nd2, SectionForceDeformation *section, CrdTransf3d &theTransf, double rho = 0.0, int releasez= 0, int releasey= 0);
103  Element *getCopy(void) const;
104 
105  const Vector &computeCurrentStrain(void) const;
106 
107  inline int getReleaseCodeZ(void) const
108  { return releasez; }
109  inline void setReleaseCodeZ(const int &rc)
110  { releasez= rc; }
111 
112  inline int getReleaseCodeY(void) const
113  { return releasey; }
114  inline void setReleaseCodeY(const int &rc)
115  { releasey= rc; }
116 
117  virtual int update(void);
118  int commitState(void);
119  int revertToLastCommit(void);
120  int revertToStart(void);
121 
122  const Matrix &getTangentStiff(void) const;
123  const Matrix &getInitialStiff(void) const;
124  const Matrix &getMass(void) const;
125 
126  void zeroLoad(void);
127  int addLoad(ElementalLoad *, double loadFactor);
128  int addInertiaLoadToUnbalance(const Vector &accel);
129 
130  const Vector &getResistingForce(void) const;
131  const Vector &getResistingForceIncInertia(void) const;
132 
133  int sendSelf(Communicator &);
134  int recvSelf(const Communicator &);
135 
136  void Print(std::ostream &s, int flag =0) const;
137 
140  inline double getAN1(void) const
141  {
142  return q.AN1()+p0[0];
143  }
146  inline double getAN2(void) const
147  {
148  return q.AN2();
149  }
152  inline double getN1(void) const
153  {
154  return -q.AN1()-p0[0];
155  }
158  inline double getN2(void) const
159  {
160  return q.AN2();
161  }
164  inline double getN(void) const //Mean axial force.
165  {
166  return (-q.AN1()-p0[0]+q.AN2())/2.0;
167  }
168 
171  inline double getAMz1(void) const
172  {
173  return q.Mz1();
174  }
177  inline double getAMz2(void) const
178  {
179  return q.Mz2();
180  }
183  inline double getMz1(void) const
184  {
185  return -q.Mz1();
186  }
189  inline double getMz2(void) const
190  {
191  return q.Mz2();
192  }
193 
196  inline double getAVy1(void) const
197  {
198  return q.Vy(theCoordTransf->getInitialLength())+p0[1];
199  }
202  inline double getAVy2(void) const
203  {
204  return -q.Vy(theCoordTransf->getInitialLength())+p0[2];
205  }
208  inline double getVy1(void) const
209  {
210  return this->getVy()-p0[1];
211  }
214  inline double getVy2(void) const
215  {
216  return p0[2]+this->getVy();
217  }
220  inline double getVy(void) const
221  {
222  return -q.Vy(theCoordTransf->getInitialLength()); //Shear along y.
223  }
224 
227  inline double getAVz1(void) const
228  {
229  return q.Vz(theCoordTransf->getInitialLength())+p0[3];
230  }
233  inline double getAVz2(void) const
234  {
235  return -q.Vz(theCoordTransf->getInitialLength())+p0[4];
236  }
239  inline double getVz1(void) const
240  {
241  return this->getVz()-p0[3];
242  }
245  inline double getVz2(void) const
246  {
247  return p0[4]+this->getVz();
248  }
251  inline double getVz(void) const
252  {
253  return -q.Vz(theCoordTransf->getInitialLength());
254  }
255 
258  inline double getMy1(void) const
259  {
260  return -q.My1();
261  }
264  inline double getMy2(void) const
265  {
266  return q.My2();
267  }
268 
271  inline double getT(void) const
272  {
273  return q.T();
274  }
277  inline double getT1(void) const
278  {
279  return -q.T1(); //+p0[0];
280  }
283  inline double getT2(void) const
284  {
285  return q.T2();
286  }
287 
288  Response *setResponse(const std::vector<std::string> &argv, Information &info);
289  int getResponse(int responseID, Information &info);
290  };
291 } // end of XC namespace
292 
293 #endif
294 
295 
double Vy(const double &L) const
Returns shear along y axis.
Definition: EsfBeamColumn3d.h:78
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
double getT2(void) const
Internal torsional force at the front end.
Definition: ElasticBeam3d.h:283
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: ElasticBeam3d.cpp:767
const double & T(void) const
Returns the torsor.
Definition: EsfBeamColumn3d.h:96
double getAVz1(void) const
z shear drived over the bar in its back end.
Definition: ElasticBeam3d.h:227
Float vector abstraction.
Definition: Vector.h:94
double getVy(void) const
Internal shear force in the middle of the element.
Definition: ElasticBeam3d.h:220
double getVy1(void) const
Internal y shear force at the back end.
Definition: ElasticBeam3d.h:208
const double & My1(void) const
Returns the moment about y in the back end.
Definition: EsfBeamColumn3d.h:81
void zeroLoad(void)
Zeroes the loads over the element.
Definition: ElasticBeam3d.cpp:406
const double & Mz2(void) const
Returns the moment about z in the front end.
Definition: EsfBeamColumn3d.h:72
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:41
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
ElasticBeam3d(int tag=0)
Default constructor.
Definition: ElasticBeam3d.cpp:83
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: ElasticBeam3d.cpp:618
double getAVz2(void) const
z shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:233
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ElasticBeam3d.cpp:671
double getAVy2(void) const
y shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:202
Base class for materials.
Definition: Material.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const Vector & getResistingForceIncInertia(void) const
Return the element resisting force.
Definition: ElasticBeam3d.cpp:575
double getVz(void) const
Internal z shear force in the middle of the element.
Definition: ElasticBeam3d.h:251
double Vz(const double &L) const
Returns the shear along z.
Definition: EsfBeamColumn3d.h:93
Base class for 3D elastic beam elements.
Definition: ElasticBeam3dBase.h:42
double getVy2(void) const
Internal y shear force at the front end.
Definition: ElasticBeam3d.h:214
double getAMz2(void) const
Moment about z axis applied over the bar in its front end.
Definition: ElasticBeam3d.h:177
Base class for the finite elements.
Definition: Element.h:112
int revertToLastCommit(void)
Revert the element to the its last commited state.
Definition: ElasticBeam3d.cpp:182
double getAN2(void) const
Axial force which acts over the element in his front end.
Definition: ElasticBeam3d.h:146
double getMz1(void) const
Internal bending moment about z axis at the back end.
Definition: ElasticBeam3d.h:183
double getN(void) const
Internal axial force at the middle of the element.
Definition: ElasticBeam3d.h:164
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticBeam3d.cpp:147
double getMy1(void) const
Internal bending moment about y axis at the back end.
Definition: ElasticBeam3d.h:258
double getMy2(void) const
Internal bending moment about y axis at the front end.
Definition: ElasticBeam3d.h:264
double getAN1(void) const
Axial force which acts over the element in his back end.
Definition: ElasticBeam3d.h:140
3D beam column internal forces.
Definition: EsfBeamColumn3d.h:46
double getVz2(void) const
Internal z shear force at the front end.
Definition: ElasticBeam3d.h:245
const Matrix & getMass(void) const
Return the mass matrix of the element.
Definition: ElasticBeam3d.cpp:376
double getVz1(void) const
Internal z shear force at the back end.
Definition: ElasticBeam3d.h:239
const Matrix & getInitialStiff(void) const
Return the initial stiffness matrix.
Definition: ElasticBeam3d.cpp:309
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ElasticBeam3d.cpp:611
CrdTransf3d * theCoordTransf
Coordinate transformation.
Definition: ElasticBeam3dBase.h:45
double AN1(void) const
Return the axial force in the back end.
Definition: EsfBeamColumn3d.h:60
double getAVy1(void) const
y shear drived over the bar in its back end.
Definition: ElasticBeam3d.h:196
double getT(void) const
Internal torsional force in the middle of the element.
Definition: ElasticBeam3d.h:271
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: ElasticBeam3d.cpp:631
double AN2(void) const
Return the axial force in the front end.
Definition: EsfBeamColumn3d.h:63
const Vector & computeCurrentStrain(void) const
Compute the current strain.
Definition: ElasticBeam3d.cpp:152
double getN2(void) const
Internal axial force at the front end.
Definition: ElasticBeam3d.h:158
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ElasticBeam3d.cpp:658
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ElasticBeam3d.cpp:644
double getMz2(void) const
Internal bending moment about z axis at the front end.
Definition: ElasticBeam3d.h:189
double getN1(void) const
Internal axial force at the back end.
Definition: ElasticBeam3d.h:152
Matrix of floats.
Definition: Matrix.h:111
double T2(void) const
Returns the torsor in the front end.
Definition: EsfBeamColumn3d.h:105
double getAMz1(void) const
Moment about z axis that is applied over the bar in its back end.
Definition: ElasticBeam3d.h:171
Base class for loads over elements.
Definition: ElementalLoad.h:79
const double & Mz1(void) const
Returns the moment about z in the back end.
Definition: EsfBeamColumn3d.h:66
int commitState(void)
Commit the element state.
Definition: ElasticBeam3d.cpp:170
double getT1(void) const
Internal torsional force at the back end.
Definition: ElasticBeam3d.h:277
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:748
const double & My2(void) const
Returns the moment about y in the front end.
Definition: EsfBeamColumn3d.h:87
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix in global coordinates.
Definition: ElasticBeam3d.cpp:198
const Vector & getResistingForce(void) const
Return the element resisting force.
Definition: ElasticBeam3d.cpp:483
virtual int update(void)
Update element state.
Definition: ElasticBeam3d.cpp:162
double T1(void) const
Returns the torsor in the back end.
Definition: EsfBeamColumn3d.h:102
int revertToStart(void)
Revert the the element to the its start state.
Definition: ElasticBeam3d.cpp:190
3D elastic beam element.
Definition: ElasticBeam3d.h:79
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81