xc
CrossSectionProperties2d.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 //CrossSectionProperties2d.h
29 
30 #ifndef CrossSectionProperties2d_h
31 #define CrossSectionProperties2d_h
32 
33 #include "CrossSectionProperties1d.h"
34 #include "utility/kernel/CommandEntity.h"
35 #include "utility/actor/actor/MovableObject.h"
36 
38 class Vector2d;
39 
40 namespace XC {
41 class Channel;
42 class FEM_ObjectBroker;
43 class Information;
44 class Parameter;
45 class Matrix;
46 class Vector;
47 class ID;
48 class SectionForceDeformation;
49 
51 //
56  {
57  private:
58  double g;
59  double i;
60  double alpha;
61  static Matrix ks2;
62  static Matrix ks3;
63  protected:
64  virtual DbTagData &getDbTagData(void) const;
65  int sendData(Communicator &);
66  int recvData(const Communicator &);
67 
68  public:
69  CrossSectionProperties2d(double E, double A, double I, double G= 0.0,double alpha= 0.0, double rho= 0.0);
70  CrossSectionProperties2d(double EA, double EI);
73  bool check_values(void);
74  inline int getDimension(void)
75  { return 2; }
76  inline double &G(void)
77  { return g; }
78  inline const double &G(void) const
79  { return g; }
80  inline void setG(const double &gg)
81  { g= gg; }
82  inline double &Alpha(void)
83  { return alpha; }
84  inline const double &Alpha(void) const
85  { return alpha; }
86  inline void setAlpha(const double &al)
87  { alpha= al; }
89  inline double getAvy(void) const
90  { return alpha*A(); }
92  void setAvy(const double &avy)
93  { alpha= avy/A(); }
94  inline double &I(void)
95  { return i; }
96  inline const double &I(void) const
97  { return i; }
98  inline void setI(const double &ii)
99  { i= ii; }
101  inline double EI(void) const
102  { return E()*i; }
104  inline double GAAlpha(void) const
105  { return g*getAvy(); }
106  double getRadiusOfGyration(void) const;
107 
108  virtual double getTheta(void) const;
109  virtual double getI1(void) const;
110  virtual double getI2(void) const;
111  virtual PrincipalAxesOfInertia2D getInertiaAxes(void) const;
112  virtual Vector2d getAxis1VDir(void) const;
113  virtual Vector2d getVDirStrongAxis(void) const;
114  virtual Vector2d getAxis2VDir(void) const;
115  virtual Vector2d getVDirWeakAxis(void) const;
116 
117  const Matrix &getSectionTangent2x2(void) const;
118  const Matrix &getInitialTangent2x2(void) const;
119  const Matrix &getSectionFlexibility2x2(void) const;
120  const Matrix &getInitialFlexibility2x2(void) const;
121  const Matrix &getSectionTangent3x3(void) const;
122  const Matrix &getInitialTangent3x3(void) const;
123  const Matrix &getSectionFlexibility3x3(void) const;
124  const Matrix &getInitialFlexibility3x3(void) const;
125 
126  int sendSelf(Communicator &);
127  int recvSelf(const Communicator &);
128  boost::python::dict getPyDict(void) const;
129  void setPyDict(const boost::python::dict &);
130 
131  int setParameter(const std::vector<std::string> &,Parameter &,SectionForceDeformation *);
132  int updateParameter(int parameterID, Information &info);
133 
134  const Matrix& getInitialTangentSensitivity3x3(int gradIndex);
135 
136 
137  virtual void Print(std::ostream &s, int flag = 0) const;
138  };
139 
140 std::ostream &operator<<(std::ostream &,const CrossSectionProperties2d &);
141 
142 } // end of XC namespace
143 
144 #endif
virtual PrincipalAxesOfInertia2D getInertiaAxes(void) const
Returns the principal axis of inertia.
Definition: CrossSectionProperties2d.cc:123
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
virtual Vector2d getVDirWeakAxis(void) const
Returns principal axis II (weak).
Definition: CrossSectionProperties2d.cc:139
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: CrossSectionProperties2d.cc:272
CrossSectionProperties2d(void)
Constructor.
Definition: CrossSectionProperties2d.cc:73
double getRadiusOfGyration(void) const
Returns the section gyration radius.
Definition: CrossSectionProperties2d.cc:119
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
double EI(void) const
Return z bending stiffness.
Definition: CrossSectionProperties2d.h:101
const Matrix & getSectionFlexibility2x2(void) const
Returns the flexibility matrix.
Definition: CrossSectionProperties2d.cc:155
const Matrix & getInitialFlexibility2x2(void) const
Returns the initial flexibility matrix.
Definition: CrossSectionProperties2d.cc:163
int sendData(Communicator &)
Send members through the communicator argument.
Definition: CrossSectionProperties2d.cc:246
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
const Matrix & getInitialTangent3x3(void) const
Returns the initial tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:176
virtual double getTheta(void) const
Returns the angle between the principal axes and the local system.
Definition: CrossSectionProperties2d.cc:107
Vector en dos dimensiones.
Definition: Vector2d.h:40
double getAvy(void) const
get shear area.
Definition: CrossSectionProperties2d.h:89
virtual double getI1(void) const
Returns the major principal axis of inertia.
Definition: CrossSectionProperties2d.cc:111
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties2d.h:55
virtual Vector2d getAxis1VDir(void) const
Returns principal axis I (strong).
Definition: CrossSectionProperties2d.cc:130
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties1d.h:51
virtual Vector2d getVDirStrongAxis(void) const
Returns principal axis I (strong).
Definition: CrossSectionProperties2d.cc:133
const Matrix & getSectionFlexibility3x3(void) const
Returns the flexibility matrix.
Definition: CrossSectionProperties2d.cc:180
virtual Vector2d getAxis2VDir(void) const
Returns principal axis II (weak).
Definition: CrossSectionProperties2d.cc:136
const Matrix & getSectionTangent2x2(void) const
Returns the tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:143
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: CrossSectionProperties2d.cc:254
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: CrossSectionProperties2d.cc:281
Principals axes of inertia in planar geometry.
Definition: PrincipalAxesOfInertia2D.h:34
const Matrix & getInitialFlexibility3x3(void) const
Returns the initial flexibility matrix.
Definition: CrossSectionProperties2d.cc:189
double GAAlpha(void) const
Returns shear stiffness.
Definition: CrossSectionProperties2d.h:104
virtual DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: CrossSectionProperties2d.cc:239
void setAvy(const double &avy)
set shear area.
Definition: CrossSectionProperties2d.h:92
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
const Matrix & getInitialTangent2x2(void) const
Returns the initial tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:151
Matrix of floats.
Definition: Matrix.h:111
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: CrossSectionProperties2d.cc:324
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: CrossSectionProperties2d.cc:262
Parameter.
Definition: Parameter.h:68
const Matrix & getSectionTangent3x3(void) const
Returns the tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:167
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: CrossSectionProperties2d.cc:218
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: CrossSectionProperties2d.cc:296
virtual double getI2(void) const
Returns the minor principal axis of inertia.
Definition: CrossSectionProperties2d.cc:115
double EA(void) const
Return axial stiffness.
Definition: CrossSectionProperties1d.h:99