xc
CrossSectionProperties2d.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 //CrossSectionProperties2d.h
28 
29 #ifndef CrossSectionProperties2d_h
30 #define CrossSectionProperties2d_h
31 
32 #include "xc_utils/src/kernel/CommandEntity.h"
33 #include "utility/actor/actor/MovableObject.h"
34 
35 class PrincipalAxesOfInertia2D;
36 class Vector2d;
37 
38 namespace XC {
39 class Channel;
40 class FEM_ObjectBroker;
41 class Information;
42 class Parameter;
43 class Matrix;
44 class Vector;
45 class ID;
46 class SectionForceDeformation;
47 
49 //
52 class CrossSectionProperties2d: public CommandEntity, public MovableObject
53  {
54  private:
55  double e, g, a, i, alpha;
56  static Matrix ks2;
57  static Matrix ks3;
58  protected:
59  virtual DbTagData &getDbTagData(void) const;
60  int sendData(CommParameters &);
61  int recvData(const CommParameters &);
62 
63  public:
64  CrossSectionProperties2d(double E, double A, double I, double G= 0.0,double alpha= 0.0);
65  CrossSectionProperties2d(double EA, double EI);
67 
68  bool check_values(void);
69  inline double &E(void)
70  { return e; }
71  inline const double &E(void) const
72  { return e; }
73  inline void setE(const double &ee)
74  { e= ee; }
75  inline double &G(void)
76  { return g; }
77  inline const double &G(void) const
78  { return g; }
79  inline void setG(const double &gg)
80  { g= gg; }
81  inline double &A(void)
82  { return a; }
83  inline const double &A(void) const
84  { return a; }
85  inline void setA(const double &aa)
86  { a= aa; }
87  inline double &Alpha(void)
88  { return alpha; }
89  inline const double &Alpha(void) const
90  { return alpha; }
91  inline void setAlpha(const double &al)
92  { alpha= al; }
93  inline double &I(void)
94  { return i; }
95  inline const double &I(void) const
96  { return i; }
97  inline void setI(const double &ii)
98  { i= ii; }
100  inline double EA(void) const
101  { return e*a; }
103  inline double EI(void) const
104  { return e*i; }
106  inline double GAAlpha(void) const
107  { return g*a*alpha; }
108 
109  virtual double getTheta(void) const;
110  virtual double getI1(void) const;
111  virtual double getI2(void) const;
112  virtual PrincipalAxesOfInertia2D getInertiaAxes(void) const;
113  virtual Vector2d getAxis1VDir(void) const;
114  virtual Vector2d getVDirStrongAxis(void) const;
115  virtual Vector2d getAxis2VDir(void) const;
116  virtual Vector2d getVDirWeakAxis(void) const;
117 
118  const Matrix &getSectionTangent2x2(void) const;
119  const Matrix &getInitialTangent2x2(void) const;
120  const Matrix &getSectionFlexibility2x2(void) const;
121  const Matrix &getInitialFlexibility2x2(void) const;
122  const Matrix &getSectionTangent3x3(void) const;
123  const Matrix &getInitialTangent3x3(void) const;
124  const Matrix &getSectionFlexibility3x3(void) const;
125  const Matrix &getInitialFlexibility3x3(void) const;
126 
127  int sendSelf(CommParameters &);
128  int recvSelf(const CommParameters &);
129 
130  int setParameter(const std::vector<std::string> &,Parameter &,SectionForceDeformation *);
131  int updateParameter(int parameterID, Information &info);
132 
133  const Matrix& getInitialTangentSensitivity3x3(int gradIndex);
134 
135 
136  virtual void Print (std::ostream &s, int flag = 0) const;
137  };
138 
139 std::ostream &operator<<(std::ostream &,const CrossSectionProperties2d &);
140 
141 } // end of XC namespace
142 
143 #endif
virtual PrincipalAxesOfInertia2D getInertiaAxes(void) const
Returns the principal axis of inertia.
Definition: CrossSectionProperties2d.cc:112
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: CrossSectionProperties2d.cc:242
Base class for force deformation section models.
Definition: SectionForceDeformation.h:86
virtual Vector2d getVDirWeakAxis(void) const
Returns principal axis II (weak).
Definition: CrossSectionProperties2d.cc:127
CrossSectionProperties2d(void)
Constructor.
Definition: CrossSectionProperties2d.cc:86
Information about an element.
Definition: Information.h:80
double EI(void) const
Return z bending stiffness.
Definition: CrossSectionProperties2d.h:103
const Matrix & getSectionFlexibility2x2(void) const
Returns the flexibility matrix.
Definition: CrossSectionProperties2d.cc:143
Object that can move between processes.
Definition: MovableObject.h:99
const Matrix & getInitialFlexibility2x2(void) const
Returns the initial flexibility matrix.
Definition: CrossSectionProperties2d.cc:151
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
const Matrix & getInitialTangent3x3(void) const
Returns the initial tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:164
virtual double getTheta(void) const
Returns the angle between the principal axes and the local system.
Definition: CrossSectionProperties2d.cc:100
virtual double getI1(void) const
Returns the major principal axis of inertia.
Definition: CrossSectionProperties2d.cc:104
double EA(void) const
Return axial stiffness.
Definition: CrossSectionProperties2d.h:100
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties2d.h:52
virtual Vector2d getAxis1VDir(void) const
Returns principal axis I (strong).
Definition: CrossSectionProperties2d.cc:118
virtual Vector2d getVDirStrongAxis(void) const
Returns principal axis I (strong).
Definition: CrossSectionProperties2d.cc:121
const Matrix & getSectionFlexibility3x3(void) const
Returns the flexibility matrix.
Definition: CrossSectionProperties2d.cc:168
virtual Vector2d getAxis2VDir(void) const
Returns principal axis II (weak).
Definition: CrossSectionProperties2d.cc:124
const Matrix & getSectionTangent2x2(void) const
Returns the tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:131
const Matrix & getInitialFlexibility3x3(void) const
Returns the initial flexibility matrix.
Definition: CrossSectionProperties2d.cc:177
double GAAlpha(void) const
Returns shear stiffness.
Definition: CrossSectionProperties2d.h:106
virtual DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: CrossSectionProperties2d.cc:231
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: CrossSectionProperties2d.cc:261
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: CrossSectionProperties2d.cc:246
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
const Matrix & getInitialTangent2x2(void) const
Returns the initial tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:139
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: CrossSectionProperties2d.cc:289
Definition: Parameter.h:65
const Matrix & getSectionTangent3x3(void) const
Returns the tangent stiffness matrix.
Definition: CrossSectionProperties2d.cc:155
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: CrossSectionProperties2d.cc:238
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: CrossSectionProperties2d.cc:214
virtual double getI2(void) const
Returns the minor principal axis of inertia.
Definition: CrossSectionProperties2d.cc:108