xc
NLForceBeamColumn2dBase.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 //NLForceBeamColumn2dBase.h
29 
30 #ifndef NLForceBeamColumn2dBase_h
31 #define NLForceBeamColumn2dBase_h
32 
33 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf2d.h>
34 #include <utility/matrix/Matrix.h>
35 #include <utility/matrix/Vector.h>
36 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
37 #include "domain/mesh/element/utils/coordTransformation/CrdTransf2d.h"
38 
39 namespace XC {
40 
42 //
45  {
47  protected:
48  static const size_t NDM= 2;
49  static const int NND= 3;
50  static const size_t NEGD= 6;
51  static const size_t NEBD= 3;
52 
53 
54  // internal data
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(Communicator &comm);
84  int recvData(const Communicator &comm);
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  const Matrix &getTangentStiff(void) const;
95 
96  const Vector &getResistingForce(void) const;
97 
98  inline double getV(void) const //Shear force in the middle.
99  { return -(Secommit(1)+Secommit(2))/theCoordTransf->getInitialLength(); }
100  inline double getV1(void) const //Shear force in the back end.
101  { return getV()-p0[1]; }
102  inline double getV2(void) const //Shear force in the front end.
103  { return getV()+p0[2]; }
105  inline double getN1(void) const
106  { return Secommit(0)-p0[0]; }
108  inline double getN2(void) const
109  { return Secommit(0); }
111  inline double getM1(void) const
112  { return -Secommit(1); }
114  inline double getM2(void) const
115  { return Secommit(2); }
118  inline double getM(void) const
119  { return (this->getM1()+this->getM2())/2.0; }
120 
121  boost::python::list getValuesAtNodes(const std::string &, bool silent= false) const;
122  };
123 } // end of XC namespace
124 
125 #endif
126 
Float vector abstraction.
Definition: Vector.h:94
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:44
Communication parameters between processes.
Definition: Communicator.h:66
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
Vector Se
element resisting forces in the basic system
Definition: NLForceBeamColumn2dBase.h:61
Base class for materials.
Definition: Material.h:93
Matrix kv
stiffness matrix in the basic system
Definition: NLForceBeamColumn2dBase.h:60
double getN2(void) const
Internal axial force at the front end.
Definition: NLForceBeamColumn2dBase.h:108
std::vector< Matrix > fs
array of section flexibility matrices
Definition: NLForceBeamColumn2dBase.h:66
double getN1(void) const
Internal axial force at the back end.
Definition: NLForceBeamColumn2dBase.h:105
std::vector< Vector > Ssr
array of section resisting force vectors
Definition: NLForceBeamColumn2dBase.h:68
double getM1(void) const
Internal bending moment at the back end.
Definition: NLForceBeamColumn2dBase.h:111
int maxIters
maximum number of local iterations
Definition: NLForceBeamColumn2dBase.h:55
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: NLForceBeamColumn2dBase.cc:87
std::vector< Vector > vs
array of section deformation vectors
Definition: NLForceBeamColumn2dBase.h:67
int initialFlag
indicates if the element has been initialized
Definition: NLForceBeamColumn2dBase.h:58
double getInitialLength(void) const
Return the initial length of the element.
Definition: CrdTransf2d.h:106
static const int NND
number of nodal dof&#39;s
Definition: NLForceBeamColumn2dBase.h:49
Definition: NLForceBeamColumn2dBase.h:44
Matrix kvcommit
committed stiffness matrix in the basic system
Definition: NLForceBeamColumn2dBase.h:63
double getM(void) const
Mean bending moment.
Definition: NLForceBeamColumn2dBase.h:118
double tol
tolerance for relative energy norm for local iterations
Definition: NLForceBeamColumn2dBase.h:56
static const size_t NDM
dimension of the problem (2d)
Definition: NLForceBeamColumn2dBase.h:48
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:41
void resizeMatrices(const size_t &nSections)
Allocate section flexibility matrices and section deformation vectors.
Definition: NLForceBeamColumn2dBase.cc:39
static const size_t NEBD
number of element dof&#39;s in the basic system
Definition: NLForceBeamColumn2dBase.h:51
double getM2(void) const
Internal bending moment at the front end.
Definition: NLForceBeamColumn2dBase.h:114
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
std::vector< Vector > vscommit
array of committed section deformation vectors
Definition: NLForceBeamColumn2dBase.h:69
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: NLForceBeamColumn2dBase.cc:91
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: NLForceBeamColumn2dBase.cc:103
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: NLForceBeamColumn2dBase.cc:132
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: NLForceBeamColumn2dBase.cc:178
Matrix sp
Applied section forces due to element loads, 5 x nSections.
Definition: NLForceBeamColumn2dBase.h:71
static const size_t NEGD
number of element global dof&#39;s
Definition: NLForceBeamColumn2dBase.h:50
Vector Secommit
committed element end forces in the basic system
Definition: NLForceBeamColumn2dBase.h:64
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: NLForceBeamColumn2dBase.cc:151