XC Open source finite element analysis program
NLForceBeamColumn2dBase.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //NLForceBeamColumn2dBase.h
28 
29 #ifndef NLForceBeamColumn2dBase_h
30 #define NLForceBeamColumn2dBase_h
31 
32 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf2d.h>
33 #include <utility/matrix/Matrix.h>
34 #include <utility/matrix/Vector.h>
35 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
36 #include "domain/mesh/element/utils/coordTransformation/CrdTransf2d.h"
37 
38 namespace XC {
39 
41 //
44  {
46  protected:
47  static const size_t NDM= 2;
48  static const int NND= 3;
49  static const size_t NEGD= 6;
50  static const size_t NEBD= 3;
51 
52 
53  // internal data
54  double rho;
55  int maxIters;
56  double tol;
57 
59 
62 
65 
66  std::vector<Matrix> fs;
67  std::vector<Vector> vs;
68  std::vector<Vector> Ssr;
69  std::vector<Vector> vscommit;
70 
72  FVectorBeamColumn2d p0; // Reactions in the basic system due to element loads
73 
74  mutable Matrix Ki;
75 
76  static Matrix theMatrix;
77  static Vector theVector;
78  static double workArea[];
79 
80  void resizeMatrices(const size_t &nSections);
81  void initializeSectionHistoryVariables(void);
82 
83  int sendData(CommParameters &cp);
84  int recvData(const CommParameters &cp);
85 
86  public:
87  NLForceBeamColumn2dBase(int tag,int classTag,int numSec= 0);
88  NLForceBeamColumn2dBase(int tag,int classTag,int numSec,const Material *theSection,const CrdTransf *coordTransf);
91 
92  int getNumDOF(void) const;
93 
94  double getRho(void) const
95  { return rho; }
96  void setRho(const double &r)
97  { rho= r; }
98 
99  const Matrix &getTangentStiff(void) const;
100 
101  const Vector &getResistingForce(void) const;
102 
103  inline double getV(void) //Shear force in the middle.
104  { return (Secommit(1)+Secommit(2))/theCoordTransf->getInitialLength(); }
105  inline double getV1(void) //Shear force in the back end.
106  { return (Secommit(1)+Secommit(2))/theCoordTransf->getInitialLength()+p0[1]; }
107  inline double getV2(void) //Shear force in the front end.
108  { return -(Secommit(1)+Secommit(2))/theCoordTransf->getInitialLength()+p0[2]; }
109  inline double getN1(void) //Axial force.
110  { return -Secommit(0)+p0[0]; }
111  inline double getN2(void)
112  { return Secommit(0); }
113  inline double getM1(void)
114  { return Secommit(1); }
115  inline double getM2(void)
116  { return Secommit(2); }
117  };
118 } // end of XC namespace
119 
120 #endif
121 
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
static const size_t NEGD
number of element global dof&#39;s
Definition: NLForceBeamColumn2dBase.h:49
std::vector< Vector > vscommit
array of commited section deformation vectors
Definition: NLForceBeamColumn2dBase.h:69
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:43
Base class for materials.
Definition: Material.h:85
Vector Secommit
commited element end forces in the basic system
Definition: NLForceBeamColumn2dBase.h:64
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: NLForceBeamColumn2dBase.cc:132
Definition: Vector.h:82
int initialFlag
indicates if the element has been initialized
Definition: NLForceBeamColumn2dBase.h:58
std::vector< Vector > Ssr
array of section resisting force vectors
Definition: NLForceBeamColumn2dBase.h:68
static const int NND
number of nodal dof&#39;s
Definition: NLForceBeamColumn2dBase.h:48
Matrix kv
stiffness matrix in the basic system
Definition: NLForceBeamColumn2dBase.h:60
std::vector< Matrix > fs
array of section flexibility matrices
Definition: NLForceBeamColumn2dBase.h:66
Matrix kvcommit
commited stiffness matrix in the basic system
Definition: NLForceBeamColumn2dBase.h:63
double getInitialLength(void) const
Return the longitud inicial of the element.
Definition: CrdTransf2d.h:103
void resizeMatrices(const size_t &nSections)
alocate section flexibility matrices and section deformation vectors
Definition: NLForceBeamColumn2dBase.cc:39
double rho
mass density per unit length
Definition: NLForceBeamColumn2dBase.h:54
Definition: NLForceBeamColumn2dBase.h:43
std::vector< Vector > vs
array of section deformation vectors
Definition: NLForceBeamColumn2dBase.h:67
static const size_t NDM
dimension of the problem (2d)
Definition: NLForceBeamColumn2dBase.h:47
Definition: Matrix.h:82
Matrix sp
Applied section forces due to element loads, 5 x nSections.
Definition: NLForceBeamColumn2dBase.h:71
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:40
double tol
tolerance for relative energy norm for local iterations
Definition: NLForceBeamColumn2dBase.h:56
static const size_t NEBD
number of element dof&#39;s in the basic system
Definition: NLForceBeamColumn2dBase.h:50
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: NLForceBeamColumn2dBase.cc:151
Vector Se
element resisting forces in the basic system
Definition: NLForceBeamColumn2dBase.h:61
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
int maxIters
maximum number of local iterations
Definition: NLForceBeamColumn2dBase.h:55