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);
91  NLForceBeamColumn3dBase(int tag,int classTag,int numSec,const Material *theSection,const CrdTransf *coordTransf);
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 
104  inline double getAN1(void) const
105  {
106  return Secommit.AN1()+p0[0];
107  }
108 
111  inline double getAN2(void) const
112  {
113  return Secommit.AN2();
114  }
115 
118  inline double getN1(void) const
119  {
120  return -Secommit.AN1()-p0[0];
121  }
122 
125  inline double getN2(void) const
126  {
127  return Secommit.AN2();
128  }
129 
132  inline double getN(void) const
133  {
134  return (-Secommit.AN1()-p0[0]+Secommit.AN2())/2.0;
135  }
136 
139  inline double getAMz1(void) const
140  {
141  return Secommit.Mz1();
142  }
143 
146  inline double getAMz2(void) const
147  {
148  return Secommit.Mz2();
149  }
150 
153  inline double getMz1(void) const
154  {
155  return -Secommit.Mz1();
156  }
157 
160  inline double getMz2(void) const
161  {
162  return Secommit.Mz2();
163  }
164 
167  inline double getMz(void) const
168  { return (this->getMz1()+this->getMz2())/2.0; }
169 
171  inline double getVy(void) const
172  {
173  return -Secommit.Vy(theCoordTransf->getInitialLength());
174  }
175 
178  inline double getAVy1(void) const
179  {
180  return Secommit.Vy(theCoordTransf->getInitialLength())+p0[1];
181  }
182 
185  inline double getAVy2(void) const
186  {
187  return -Secommit.Vy(theCoordTransf->getInitialLength())+p0[2];
188  }
189 
192  inline double getVy1(void) const
193  {
194  return this->getVy()-p0[1];
195  }
196 
199  inline double getVy2(void) const
200  {
201  return p0[2]+this->getVy();
202  }
203 
206  inline double getVz(void) const
207  {
208  return -Secommit.Vz(theCoordTransf->getInitialLength());
209  }
210 
213  inline double getAVz1(void) const
214  { //¡Warning! call "calc_resisting_force" before calling this method.
215  return Secommit.Vz(theCoordTransf->getInitialLength())+p0[3];
216  }
217 
220  inline double getAVz2(void) const
221  {
222  return -Secommit.Vz(theCoordTransf->getInitialLength())+p0[4];
223  }
224 
227  inline double getVz1(void) const
228  {
229  return this->getVz()-p0[3];
230  }
231 
234  inline double getVz2(void) const
235  {
236  return p0[4]+this->getVz();
237  }
238 
241  inline double getMy1(void) const
242  {
243  return -Secommit.My1();
244  }
245 
248  inline double getMy2(void) const
249  {
250  return Secommit.My2();
251  }
252 
255  inline double getMy(void) const
256  { return (this->getMy1()+this->getMy2())/2.0; }
257 
260  inline double getT(void) const
261  {
262  return Secommit.T();
263  }
264 
267  inline double getT1(void) const
268  {
269  return -Secommit.T1(); //+p0[0];
270  }
271 
274  inline double getT2(void) const
275  {
276  return Secommit.T2();
277  }
278 
279  boost::python::list getValuesAtNodes(const std::string &, bool silent= false) const;
280  };
281 } // end of XC namespace
282 
283 #endif
284 
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:274
double getAVz2(void) const
z shear drived over the bar at its front end.
Definition: NLForceBeamColumn3dBase.h:220
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:255
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:146
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:104
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:50
double getN1(void) const
Axial force at the front end.
Definition: NLForceBeamColumn3dBase.h:118
double getAVy1(void) const
y shear drived over the bar at its back end.
Definition: NLForceBeamColumn3dBase.h:178
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:241
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:199
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:185
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:213
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:171
double getMz2(void) const
Moment about z axis at its front end.
Definition: NLForceBeamColumn3dBase.h:160
double getT(void) const
Element&#39;s torque.
Definition: NLForceBeamColumn3dBase.h:260
int maxIters
maximum number of local iterations
Definition: NLForceBeamColumn3dBase.h:57
double getT1(void) const
Torsor at the back end.
Definition: NLForceBeamColumn3dBase.h:267
double getVz1(void) const
z shear at its back end.
Definition: NLForceBeamColumn3dBase.h:227
double getVy1(void) const
y shear at its back end.
Definition: NLForceBeamColumn3dBase.h:192
double getN(void) const
Mean axial force.
Definition: NLForceBeamColumn3dBase.h:132
double getAMz1(void) const
Moment about z axis drived over the bar at its back end.
Definition: NLForceBeamColumn3dBase.h:139
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:248
double getMz1(void) const
Moment about z axis at its back end.
Definition: NLForceBeamColumn3dBase.h:153
double getN2(void) const
Axial force at the back end.
Definition: NLForceBeamColumn3dBase.h:125
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:206
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:111
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:167
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:234
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: NLForceBeamColumn3dBase.cc:158