xc
ElasticTimoshenkoBeam3d.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$
49 // $Date$
50 // $URL$
51 
52 #ifndef ElasticTimoshenkoBeam3d_h
53 #define ElasticTimoshenkoBeam3d_h
54 
55 // Written: Andreas Schellenberg (andreas.schellenberg@gmail.com)
56 // Created: 03/13
57 // Revision: A
58 //
59 // Purpose: This file contains the class definition for ElasticTimoshenkoBeam3d.
60 // ElasticTimoshenkoBeam3d is a frame member that takes shearing deformations
61 // and rotational inertia effects into account.
62 
63 #include "domain/mesh/element/truss_beam_column/elasticBeamColumn/ElasticBeam3dBase.h"
64 
65 namespace XC {
66 
73  {
74  private:
75  // private methods
76  void setUp(void);
77 
78  // parameters
79  double Avy;
80  double Avz;
81  int cMass;
82  bool nlGeo;
83  double phiY;
84  double phiZ;
85  double L;
86 
87  // state variables
88  mutable Vector ul;
89  mutable Vector ql;
90  Vector ql0;
91  Matrix kl;
92  Matrix klgeo;
93 
94  // constant variables
95  Matrix Tgl;
96  Matrix Ki;
97  Matrix M;
98 
99  static Matrix theMatrix;
100  static Vector theVector;
101  Vector theLoad;
102  protected:
103  DbTagData &getDbTagData(void) const;
104  int sendData(Communicator &comm);
105  int recvData(const Communicator &comm);
106  public:
107  // constructor
108  ElasticTimoshenkoBeam3d(int tag= 0);
109  ElasticTimoshenkoBeam3d(int tag,const Material *m,const CrdTransf *trf);
110  ElasticTimoshenkoBeam3d(int tag, int Nd1, int Nd2, double E, double G,
111  double A, double Jx, double Iy, double Iz, double Avy, double Avz,
112  CrdTransf3d &theTransf, double rho = 0.0, int cMass = 0);
113  Element *getCopy(void) const;
114 
115  const Vector &computeCurrentStrain(void) const;
116 
117  void setDomain(Domain *theDomain);
118 
119  // public methods to set the state of the element
120  int commitState();
121 
122  //Geometric non-linear flag.
123  void setGeomNonLinear(const bool &gnl)
124  { nlGeo= gnl; }
125  bool getGeomNonLinear(void) const
126  { return nlGeo; }
127 
128  // public methods to obtain stiffness, mass, damping and residual information
129  const Matrix &getTangentStiff(void) const;
130  const Matrix &getInitialStiff(void) const;
131  const Matrix &getMass(void) const;
132 
133  void zeroLoad(void);
134  int addLoad(ElementalLoad *theLoad, double loadFactor);
135  int addInertiaLoadToUnbalance(const Vector &accel);
136 
137  const Vector &getResistingForce(void) const;
138  const Vector &getResistingForceIncInertia(void) const;
139 
141  inline double getVy1(void) const
142  { return -ql(1); }
144  inline double getVy2(void) const
145  { return ql(7); }
146 
148  inline double getVz1(void) const
149  { return -ql(2); }
151  inline double getVz2(void) const
152  { return ql(8); }
153 
155  inline double getN1(void) const
156  { return -ql(0); }
158  inline double getN2(void) const
159  { return ql(6); }
160 
162  inline double getMy1(void) const
163  { return -ql(4); }
165  inline double getMy2(void) const
166  { return ql(10); }
167 
169  inline double getMz1(void) const
170  { return -ql(5); }
172  inline double getMz2(void) const
173  { return ql(11); }
174 
176  inline double getT1(void) const
177  {
178  std::cerr << getClassName() << "::" << __FUNCTION__
179  << "; not implemented yet." << std::endl;
180  return 0.0;
181  }
183  inline double getT2(void) const
184  {
185  std::cerr << getClassName() << "::" << __FUNCTION__
186  << "; not implemented yet." << std::endl;
187  return 0.0;
188  }
189 
190  // public methods for element output
191  int sendSelf(Communicator &);
192  int recvSelf(const Communicator &);
193 
194  void Print(std::ostream &s, int flag = 0) const;
195 
196  // public methods for element recorder
197  Response *setResponse(const std::vector<std::string> &argv, Parameter &param);
198  int getResponse(int responseID, Information &info);
199 
200  int setParameter(const std::vector<std::string> &argv, Parameter &param);
201  int updateParameter(int parameterID, Information &info);
202  };
203 } // end of XC namespace
204 
205 #endif
void zeroLoad(void)
Zero the loads on the element.
Definition: ElasticTimoshenkoBeam3d.cpp:244
int recvSelf(const Communicator &)
Receive the object.
Definition: ElasticTimoshenkoBeam3d.cpp:436
double getN2(void) const
Internal axial force at the front end.
Definition: ElasticTimoshenkoBeam3d.h:158
double getT1(void) const
Internal torsional force at the back end.
Definition: ElasticTimoshenkoBeam3d.h:176
double getVy2(void) const
Internal shear force at the front end.
Definition: ElasticTimoshenkoBeam3d.h:144
Float vector abstraction.
Definition: Vector.h:94
double getMz2(void) const
Internal bending moment at the front end.
Definition: ElasticTimoshenkoBeam3d.h:172
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: ElasticTimoshenkoBeam3d.cpp:404
3D elastic Timoshenko beam element.
Definition: ElasticTimoshenkoBeam3d.h:72
Information about an element.
Definition: Information.h:81
int commitState()
Commit the current element state.
Definition: ElasticTimoshenkoBeam3d.cpp:160
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
double getVy1(void) const
Internal shear force at the back end.
Definition: ElasticTimoshenkoBeam3d.h:141
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
double getMy1(void) const
Internal bending moment at the back end.
Definition: ElasticTimoshenkoBeam3d.h:162
double getVz1(void) const
Internal shear force at the back end.
Definition: ElasticTimoshenkoBeam3d.h:148
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: ElasticTimoshenkoBeam3d.cpp:414
double getN1(void) const
Internal axial force at the back end.
Definition: ElasticTimoshenkoBeam3d.h:155
Base class for materials.
Definition: Material.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
double getVz2(void) const
Internal shear force at the front end.
Definition: ElasticTimoshenkoBeam3d.h:151
Base class for 3D elastic beam elements.
Definition: ElasticBeam3dBase.h:42
Base class for the finite elements.
Definition: Element.h:112
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ElasticTimoshenkoBeam3d.cpp:232
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticTimoshenkoBeam3d.cpp:139
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: ElasticTimoshenkoBeam3d.cpp:321
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ElasticTimoshenkoBeam3d.cpp:397
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ElasticTimoshenkoBeam3d.cpp:622
virtual std::string getClassName(void) const
Returns demangled class name.
Definition: EntityWithOwner.cc:90
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ElasticTimoshenkoBeam3d.cpp:450
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: ElasticTimoshenkoBeam3d.cpp:361
double getMz1(void) const
Internal bending moment at the back end.
Definition: ElasticTimoshenkoBeam3d.h:169
double getMy2(void) const
Internal bending moment at the front end.
Definition: ElasticTimoshenkoBeam3d.h:165
int sendSelf(Communicator &)
Send the object.
Definition: ElasticTimoshenkoBeam3d.cpp:423
ElasticTimoshenkoBeam3d(int tag=0)
Default constructor.
Definition: ElasticTimoshenkoBeam3d.cpp:77
const Vector & computeCurrentStrain(void) const
Compute the current strain.
Definition: ElasticTimoshenkoBeam3d.cpp:143
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
void setDomain(Domain *theDomain)
Set the element domain.
Definition: ElasticTimoshenkoBeam3d.cpp:152
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: ElasticTimoshenkoBeam3d.cpp:539
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ElasticTimoshenkoBeam3d.cpp:175
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
double getT2(void) const
Internal torsional force at the front end.
Definition: ElasticTimoshenkoBeam3d.h:183
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ElasticTimoshenkoBeam3d.cpp:559