xc
ElasticTimoshenkoBeam2d.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 ElasticTimoshenkoBeam2d_h
53 #define ElasticTimoshenkoBeam2d_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 ElasticTimoshenkoBeam2d.
60 // ElasticTimoshenkoBeam2d 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/ElasticBeam2dBase.h"
64 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
65 
66 namespace XC {
67  class Matrix;
68  class Vector;
75  {
76  private:
77  // private methods
78  void setUp();
79 
80  // parameters
81  int cMass;
82  bool nlGeo;
83  double phi;
84  double L;
85 
86  // state variables
87  mutable Vector ul;
88  mutable Vector ql;
89  Vector ql0;
90  Matrix kl;
91  Matrix klgeo;
92 
93  // constant variables
94  Matrix Tgl;
95  Matrix Ki;
96  Matrix M;
97 
98  static Matrix theMatrix;
99  static Vector theVector;
100  Vector theLoad;
101  protected:
102  DbTagData &getDbTagData(void) const;
103  int sendData(Communicator &comm);
104  int recvData(const Communicator &comm);
105  public:
106  // constructor
107  ElasticTimoshenkoBeam2d(int tag= 0);
108  ElasticTimoshenkoBeam2d(int tag,const Material *m,const CrdTransf *trf);
109  ElasticTimoshenkoBeam2d(int tag, double A, double E, double G, double Iz,
110  double Avy,
111  int Nd1, int Nd2, CrdTransf2d &theTransf,
112  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  int commitState(void);
120 
121  //Geometric non-linear flag.
122  void setGeomNonLinear(const bool &gnl)
123  { nlGeo= gnl; }
124  bool getGeomNonLinear(void) const
125  { return nlGeo; }
126 
127  // public methods to obtain stiffness, mass, damping and residual information
128  const Matrix &getTangentStiff(void) const;
129  const Matrix &getInitialStiff(void) const;
130  const Matrix &getMass(void) const;
131 
132  void zeroLoad();
133  int addLoad(ElementalLoad *, double loadFactor);
134  int addInertiaLoadToUnbalance(const Vector &accel);
135 
136  const Vector &getResistingForce(void) const;
137  const Vector &getResistingForceIncInertia(void) const;
138 
140  inline double getV1(void) const
141  { return -ql(1); }
143  inline double getV2(void) const
144  { return ql(4); }
145 
147  inline double getN1(void) const
148  { return -ql(0); }
150  inline double getN2(void) const
151  { return ql(3); }
152 
154  inline double getM1(void) const
155  { return -ql(2); }
157  inline double getM2(void) const
158  { return ql(5); }
159 
160  // public methods for element output
161  int sendSelf(Communicator &);
162  int recvSelf(const Communicator &);
163 
164  void Print(std::ostream &s, int flag = 0) const;
165 
166  // public methods for element recorder
167  Response *setResponse(const std::vector<std::string> &argv, Parameter &param);
168  int getResponse(int responseID, Information &info);
169 
170  int setParameter(const std::vector<std::string> &argv, Parameter &param);
171  int updateParameter(int parameterID, Information &info);
172 
173  };
174 } // end of XC namespace
175 
176 #endif
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ElasticTimoshenkoBeam2d.cpp:428
Float vector abstraction.
Definition: Vector.h:94
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ElasticTimoshenkoBeam2d.cpp:376
const Vector & computeCurrentStrain(void) const
Compute the current strain.
Definition: ElasticTimoshenkoBeam2d.cpp:124
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
double getN1(void) const
Internal axial force at the back end.
Definition: ElasticTimoshenkoBeam2d.h:147
double getV2(void) const
Internal shear force at the front end.
Definition: ElasticTimoshenkoBeam2d.h:143
Base class for materials.
Definition: Material.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ElasticTimoshenkoBeam2d.cpp:564
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: ElasticTimoshenkoBeam2d.cpp:340
Base class for the finite elements.
Definition: Element.h:112
void zeroLoad()
Zeroes the loads over the element.
Definition: ElasticTimoshenkoBeam2d.cpp:226
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
int recvSelf(const Communicator &)
Receive the object.
Definition: ElasticTimoshenkoBeam2d.cpp:415
int getResponse(int responseID, Information &info)
Obtain information from an analysis.
Definition: ElasticTimoshenkoBeam2d.cpp:502
int commitState(void)
Commit the current element state.
Definition: ElasticTimoshenkoBeam2d.cpp:142
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ElasticTimoshenkoBeam2d.cpp:157
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: ElasticTimoshenkoBeam2d.cpp:299
double getM2(void) const
Internal bending moment at the front end.
Definition: ElasticTimoshenkoBeam2d.h:157
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ElasticTimoshenkoBeam2d.cpp:521
double getV1(void) const
Internal shear force at the back end.
Definition: ElasticTimoshenkoBeam2d.h:140
2D elastic Timoshenko beam element.
Definition: ElasticTimoshenkoBeam2d.h:74
int sendSelf(Communicator &)
Send the object.
Definition: ElasticTimoshenkoBeam2d.cpp:402
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: ElasticTimoshenkoBeam2d.cpp:393
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
ElasticTimoshenkoBeam2d(int tag=0)
Default constructor.
Definition: ElasticTimoshenkoBeam2d.cpp:57
double getN2(void) const
Internal axial force at the front end.
Definition: ElasticTimoshenkoBeam2d.h:150
Matrix of floats.
Definition: Matrix.h:111
double getM1(void) const
Internal bending moment at the back end.
Definition: ElasticTimoshenkoBeam2d.h:154
Element * getCopy(void) const
Virtual constructor.
Definition: ElasticTimoshenkoBeam2d.cpp:120
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: ElasticTimoshenkoBeam2d.cpp:383
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ElasticTimoshenkoBeam2d.cpp:214
Base class for 2D elastic beam elements.
Definition: ElasticBeam2dBase.h:39
void setDomain(Domain *theDomain)
Set the element domain.
Definition: ElasticTimoshenkoBeam2d.cpp:133