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  virtual int update(void);
108  int commitState(void);
109  int revertToLastCommit(void);
110  int revertToStart(void);
111 
112  const Matrix &getTangentStiff(void) const;
113  const Matrix &getInitialStiff(void) const;
114  const Matrix &getMass(void) const;
115 
116  void zeroLoad(void);
117  int addLoad(ElementalLoad *, double loadFactor);
118  int addInertiaLoadToUnbalance(const Vector &accel);
119 
120  const Vector &getResistingForce(void) const;
121  const Vector &getResistingForceIncInertia(void) const;
122 
123  int sendSelf(Communicator &);
124  int recvSelf(const Communicator &);
125 
126  void Print(std::ostream &s, int flag =0) const;
127 
130  inline double getAN1(void) const
131  {
132  return q.AN1()+p0[0];
133  }
136  inline double getAN2(void) const
137  {
138  return q.AN2();
139  }
142  inline double getN1(void) const
143  {
144  return -q.AN1()-p0[0];
145  }
148  inline double getN2(void) const
149  {
150  return q.AN2();
151  }
154  inline double getN(void) const //Mean axial force.
155  {
156  return (-q.AN1()-p0[0]+q.AN2())/2.0;
157  }
158 
161  inline double getAMz1(void) const
162  {
163  return q.Mz1();
164  }
167  inline double getAMz2(void) const
168  {
169  return q.Mz2();
170  }
173  inline double getMz1(void) const
174  {
175  return -q.Mz1();
176  }
179  inline double getMz2(void) const
180  {
181  return q.Mz2();
182  }
183 
186  inline double getAVy1(void) const
187  {
188  return q.Vy(theCoordTransf->getInitialLength())+p0[1];
189  }
192  inline double getAVy2(void) const
193  {
194  return -q.Vy(theCoordTransf->getInitialLength())+p0[2];
195  }
198  inline double getVy1(void) const
199  {
200  return this->getVy()-p0[1];
201  }
204  inline double getVy2(void) const
205  {
206  return p0[2]+this->getVy();
207  }
210  inline double getVy(void) const
211  {
212  return -q.Vy(theCoordTransf->getInitialLength()); //Shear along y.
213  }
214 
217  inline double getAVz1(void) const
218  {
219  return q.Vz(theCoordTransf->getInitialLength())+p0[3];
220  }
223  inline double getAVz2(void) const
224  {
225  return -q.Vz(theCoordTransf->getInitialLength())+p0[4];
226  }
229  inline double getVz1(void) const
230  {
231  return this->getVz()-p0[3];
232  }
235  inline double getVz2(void) const
236  {
237  return p0[4]+this->getVz();
238  }
241  inline double getVz(void) const
242  {
243  return -q.Vz(theCoordTransf->getInitialLength());
244  }
245 
248  inline double getMy1(void) const
249  {
250  return -q.My1();
251  }
254  inline double getMy2(void) const
255  {
256  return q.My2();
257  }
258 
261  inline double getT(void) const
262  {
263  return q.T();
264  }
267  inline double getT1(void) const
268  {
269  return -q.T1(); //+p0[0];
270  }
273  inline double getT2(void) const
274  {
275  return q.T2();
276  }
277 
278  Response *setResponse(const std::vector<std::string> &argv, Information &info);
279  int getResponse(int responseID, Information &info);
280  };
281 } // end of XC namespace
282 
283 #endif
284 
285 
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:273
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: ElasticBeam3d.cpp:763
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:217
Float vector abstraction.
Definition: Vector.h:94
double getVy(void) const
Internal shear force in the middle of the element.
Definition: ElasticBeam3d.h:210
double getVy1(void) const
Internal y shear force at the back end.
Definition: ElasticBeam3d.h:198
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:614
double getAVz2(void) const
z shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:223
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ElasticBeam3d.cpp:667
double getAVy2(void) const
y shear drived over the bar in its front end.
Definition: ElasticBeam3d.h:192
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:571
double getVz(void) const
Internal z shear force in the middle of the element.
Definition: ElasticBeam3d.h:241
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:204
double getAMz2(void) const
Moment about z axis applied over the bar in its front end.
Definition: ElasticBeam3d.h:167
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:136
double getMz1(void) const
Internal bending moment about z axis at the back end.
Definition: ElasticBeam3d.h:173
double getN(void) const
Internal axial force at the middle of the element.
Definition: ElasticBeam3d.h:154
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:248
double getMy2(void) const
Internal bending moment about y axis at the front end.
Definition: ElasticBeam3d.h:254
double getAN1(void) const
Axial force which acts over the element in his back end.
Definition: ElasticBeam3d.h:130
3D beam column internal forces.
Definition: EsfBeamColumn3d.h:46
double getVz2(void) const
Internal z shear force at the front end.
Definition: ElasticBeam3d.h:235
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:229
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:607
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:186
double getT(void) const
Internal torsional force in the middle of the element.
Definition: ElasticBeam3d.h:261
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: ElasticBeam3d.cpp:627
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:148
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ElasticBeam3d.cpp:654
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ElasticBeam3d.cpp:640
double getMz2(void) const
Internal bending moment about z axis at the front end.
Definition: ElasticBeam3d.h:179
double getN1(void) const
Internal axial force at the back end.
Definition: ElasticBeam3d.h:142
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:161
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:267
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:744
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