xc
NLForceBeamColumn3dBase.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 //NLForceBeamColumn3dBase.h
29 
30 #ifndef NLForceBeamColumn3dBase_h
31 #define NLForceBeamColumn3dBase_h
32 
33 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf3d.h>
34 #include <utility/matrix/Matrix.h>
35 #include <utility/matrix/Vector.h>
36 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
37 #include "domain/mesh/element/truss_beam_column/EsfBeamColumn3d.h"
38 #include "domain/mesh/element/utils/coordTransformation/CrdTransf3d.h"
39 
40 namespace XC {
41 
43 //
46  {
48  protected:
49  static const size_t NDM;
50  static const int NND;
51  static const size_t NEGD;
52  static const size_t NEBD;
53  static const double DefaultLoverGJ;
54 
55 
56  // internal data
57  int maxIters;
58  double tol;
59 
61  bool isTorsion;
62 
65 
68 
69  std::vector<Matrix> fs;
70  std::vector<Vector> vs;
71  std::vector<Vector> Ssr;
72  std::vector<Vector> vscommit;
73 
76 
77  mutable Matrix Ki;
78 
79  static Matrix theMatrix;
80  static Vector theVector;
81  static double workArea[];
82 
83  void resizeMatrices(const size_t &nSections);
84  void initializeSectionHistoryVariables(void);
85 
86  int sendData(Communicator &comm);
87  int recvData(const Communicator &comm);
88 
89  public:
90  NLForceBeamColumn3dBase(int tag,int classTag,int numSec= 0, const double &tolerance= 1e-8);
91  NLForceBeamColumn3dBase(int tag,int classTag,int numSec,const Material *theSection,const CrdTransf *coordTransf, const double &tolerance= 1e-8);
93 
94  void setSection(const PrismaticBarCrossSection *sccModel);
95 
96  int getNumDOF(void) const;
97 
98  const Matrix &getTangentStiff(void) const;
99 
100  const Vector &getResistingForce(void) const;
101 
102  inline double getTol(void) const // Get tolerance for relative energy norm.
103  { return this->tol; }
104  inline void setTol(const double &d) // Get tolerance for relative energy norm.
105  { this->tol= d; }
106 
109  inline double getAN1(void) const
110  {
111  return Secommit.AN1()+p0[0];
112  }
113 
116  inline double getAN2(void) const
117  {
118  return Secommit.AN2();
119  }
120 
123  inline double getN1(void) const
124  {
125  return -Secommit.AN1()-p0[0];
126  }
127 
130  inline double getN2(void) const
131  {
132  return Secommit.AN2();
133  }
134 
137  inline double getN(void) const
138  {
139  return (-Secommit.AN1()-p0[0]+Secommit.AN2())/2.0;
140  }
141 
144  inline double getAMz1(void) const
145  {
146  return Secommit.Mz1();
147  }
148 
151  inline double getAMz2(void) const
152  {
153  return Secommit.Mz2();
154  }
155 
158  inline double getMz1(void) const
159  {
160  return -Secommit.Mz1();
161  }
162 
165  inline double getMz2(void) const
166  {
167  return Secommit.Mz2();
168  }
169 
172  inline double getMz(void) const
173  { return (this->getMz1()+this->getMz2())/2.0; }
174 
176  inline double getVy(void) const
177  {
178  return -Secommit.Vy(theCoordTransf->getInitialLength());
179  }
180 
183  inline double getAVy1(void) const
184  {
185  return Secommit.Vy(theCoordTransf->getInitialLength())+p0[1];
186  }
187 
190  inline double getAVy2(void) const
191  {
192  return -Secommit.Vy(theCoordTransf->getInitialLength())+p0[2];
193  }
194 
197  inline double getVy1(void) const
198  {
199  return this->getVy()-p0[1];
200  }
201 
204  inline double getVy2(void) const
205  {
206  return p0[2]+this->getVy();
207  }
208 
211  inline double getVz(void) const
212  {
213  return -Secommit.Vz(theCoordTransf->getInitialLength());
214  }
215 
218  inline double getAVz1(void) const
219  { //¡Warning! call "calc_resisting_force" before calling this method.
220  return Secommit.Vz(theCoordTransf->getInitialLength())+p0[3];
221  }
222 
225  inline double getAVz2(void) const
226  {
227  return -Secommit.Vz(theCoordTransf->getInitialLength())+p0[4];
228  }
229 
232  inline double getVz1(void) const
233  {
234  return this->getVz()-p0[3];
235  }
236 
239  inline double getVz2(void) const
240  {
241  return p0[4]+this->getVz();
242  }
243 
246  inline double getMy1(void) const
247  {
248  return -Secommit.My1();
249  }
250 
253  inline double getMy2(void) const
254  {
255  return Secommit.My2();
256  }
257 
260  inline double getMy(void) const
261  { return (this->getMy1()+this->getMy2())/2.0; }
262 
265  inline double getT(void) const
266  {
267  return Secommit.T();
268  }
269 
272  inline double getT1(void) const
273  {
274  return -Secommit.T1(); //+p0[0];
275  }
276 
279  inline double getT2(void) const
280  {
281  return Secommit.T2();
282  }
283 
284  boost::python::list getValuesAtNodes(const std::string &, bool silent= false) const;
285  };
286 } // end of XC namespace
287 
288 #endif
289 
double Vy(const double &L) const
Returns shear along y axis.
Definition: EsfBeamColumn3d.h:78
Matrix kvcommit
committed stiffness matrix in the basic system
Definition: NLForceBeamColumn3dBase.h:66
const double & T(void) const
Returns the torsor.
Definition: EsfBeamColumn3d.h:96
Float vector abstraction.
Definition: Vector.h:94
double getT2(void) const
Torsor at the front end.
Definition: NLForceBeamColumn3dBase.h:279
double getAVz2(void) const
z shear drived over the bar at its front end.
Definition: NLForceBeamColumn3dBase.h:225
const double & My1(void) const
Returns the moment about y in the back end.
Definition: EsfBeamColumn3d.h:81
const double & Mz2(void) const
Returns the moment about z in the front end.
Definition: EsfBeamColumn3d.h:72
Communication parameters between processes.
Definition: Communicator.h:66
EsfBeamColumn3d Secommit
committed element end forces in the basic system
Definition: NLForceBeamColumn3dBase.h:67
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: NLForceBeamColumn3dBase.cc:111
double getMy(void) const
Mean bending moment.
Definition: NLForceBeamColumn3dBase.h:260
FVectorBeamColumn3d p0
Reactions in the basic system due to element loads.
Definition: NLForceBeamColumn3dBase.h:75
double getAMz2(void) const
Moment about z axis drived over the bar at its front end.
Definition: NLForceBeamColumn3dBase.h:151
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: NLForceBeamColumn3dBase.cc:138
Base class for 3D force beam column elements with PrismaticBarCrossSection type material.
Definition: NLForceBeamColumn3dBase.h:45
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
Matrix sp
Applied section forces due to element loads, 5 x nSections.
Definition: NLForceBeamColumn3dBase.h:74
double getAN1(void) const
Axial force which acts over the element at its back end.
Definition: NLForceBeamColumn3dBase.h:109
boost::python::list getValuesAtNodes(const std::string &, bool silent=false) const
Return a python list with the values of the argument property at element nodes.
Definition: NLForceBeamColumn3dBase.cc:186
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:53
double getN1(void) const
Axial force at the front end.
Definition: NLForceBeamColumn3dBase.h:123
double getAVy1(void) const
y shear drived over the bar at its back end.
Definition: NLForceBeamColumn3dBase.h:183
Base class for materials.
Definition: Material.h:93
double tol
tolerance for relative energy norm for local iterations
Definition: NLForceBeamColumn3dBase.h:58
double getMy1(void) const
Moment about y axis at the back end.
Definition: NLForceBeamColumn3dBase.h:246
std::vector< Vector > Ssr
array of section resisting force vectors
Definition: NLForceBeamColumn3dBase.h:71
double Vz(const double &L) const
Returns the shear along z.
Definition: EsfBeamColumn3d.h:93
static const size_t NEBD
number of element dof&#39;s in the basic system
Definition: NLForceBeamColumn3dBase.h:52
double getVy2(void) const
y shear at its front end.
Definition: NLForceBeamColumn3dBase.h:204
static const size_t NDM
dimension of the problem (3d)
Definition: NLForceBeamColumn3dBase.h:49
EsfBeamColumn3d Se
element resisting forces in the basic system
Definition: NLForceBeamColumn3dBase.h:64
static const int NND
number of nodal dof&#39;s
Definition: NLForceBeamColumn3dBase.h:50
double getAVy2(void) const
y shear drived over the bar at its front end.
Definition: NLForceBeamColumn3dBase.h:190
std::vector< Vector > vscommit
array of committed section deformation vectors
Definition: NLForceBeamColumn3dBase.h:72
static const size_t NEGD
number of element global dof&#39;s
Definition: NLForceBeamColumn3dBase.h:51
double getAVz1(void) const
z shear drived over the bar at its back end.
Definition: NLForceBeamColumn3dBase.h:218
std::vector< Vector > vs
array of section deformation vectors
Definition: NLForceBeamColumn3dBase.h:70
3D beam column internal forces.
Definition: EsfBeamColumn3d.h:46
3D beam colun element with PrismaticBarCrossSection material type.
Definition: BeamColumnWithSectionFDTrf3d.h:66
double getVy(void) const
y shear.
Definition: NLForceBeamColumn3dBase.h:176
double getMz2(void) const
Moment about z axis at its front end.
Definition: NLForceBeamColumn3dBase.h:165
double getT(void) const
Element&#39;s torque.
Definition: NLForceBeamColumn3dBase.h:265
int maxIters
maximum number of local iterations
Definition: NLForceBeamColumn3dBase.h:57
double getT1(void) const
Torsor at the back end.
Definition: NLForceBeamColumn3dBase.h:272
double getVz1(void) const
z shear at its back end.
Definition: NLForceBeamColumn3dBase.h:232
double getVy1(void) const
y shear at its back end.
Definition: NLForceBeamColumn3dBase.h:197
double getN(void) const
Mean axial force.
Definition: NLForceBeamColumn3dBase.h:137
double getAMz1(void) const
Moment about z axis drived over the bar at its back end.
Definition: NLForceBeamColumn3dBase.h:144
int initialFlag
indicates if the element has been initialized
Definition: NLForceBeamColumn3dBase.h:60
void resizeMatrices(const size_t &nSections)
Allocate section flexibility matrices and section deformation vectors.
Definition: NLForceBeamColumn3dBase.cc:44
double AN1(void) const
Return the axial force in the back end.
Definition: EsfBeamColumn3d.h:60
double getMy2(void) const
Moment about y axis at the front end.
Definition: NLForceBeamColumn3dBase.h:253
double getMz1(void) const
Moment about z axis at its back end.
Definition: NLForceBeamColumn3dBase.h:158
double getN2(void) const
Axial force at the back end.
Definition: NLForceBeamColumn3dBase.h:130
double AN2(void) const
Return the axial force in the front end.
Definition: EsfBeamColumn3d.h:63
double getVz(void) const
z shear.
Definition: NLForceBeamColumn3dBase.h:211
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: NLForceBeamColumn3dBase.cc:95
Matrix of floats.
Definition: Matrix.h:111
double getAN2(void) const
Axial force which acts over the element at its front end.
Definition: NLForceBeamColumn3dBase.h:116
double T2(void) const
Returns the torsor in the front end.
Definition: EsfBeamColumn3d.h:105
Matrix kv
stiffness matrix in the basic system
Definition: NLForceBeamColumn3dBase.h:63
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: NLForceBeamColumn3dBase.cc:99
std::vector< Matrix > fs
array of section flexibility matrices
Definition: NLForceBeamColumn3dBase.h:69
const double & Mz1(void) const
Returns the moment about z in the back end.
Definition: EsfBeamColumn3d.h:66
const double & My2(void) const
Returns the moment about y in the front end.
Definition: EsfBeamColumn3d.h:87
double getMz(void) const
Mean bending moment.
Definition: NLForceBeamColumn3dBase.h:172
double T1(void) const
Returns the torsor in the back end.
Definition: EsfBeamColumn3d.h:102
double getVz2(void) const
z shear at its front end.
Definition: NLForceBeamColumn3dBase.h:239
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: NLForceBeamColumn3dBase.cc:158