xc
ProtoBeam3d.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 //ProtoBeam3d.h
29 
30 #ifndef ProtoBeam3d_h
31 #define ProtoBeam3d_h
32 
33 #include "domain/mesh/element/truss_beam_column/BeamColumn.h"
34 #include "domain/mesh/element/utils/physical_properties/ElasticSection3dPhysicalProperties.h"
35 
36 namespace XC {
38 //
40 class ProtoBeam3d: public BeamColumn
41  {
42  public:
44  protected:
46 
47  PhysProp physicalProperties;
49  int sendData(Communicator &);
50  int recvData(const Communicator &);
51  void set_material(const Material *m);
52 
53  public:
54  ProtoBeam3d(int tag, int class_tag,const Material *m= nullptr);
55  ProtoBeam3d(int tag, int class_tag, int Nd1, int Nd2);
56  ProtoBeam3d(int tag, int class_tag, double A, double E, double G, double Jx, double Iy, double Iz, int Nd1, int Nd2);
57  ProtoBeam3d(int tag, int class_tag, double A, double alpha_y, double alpha_z, double E, double G, double Jx, double Iy, double Iz, int Nd1, int Nd2);
58  int getNumDOF(void) const;
59 
60  // Element birth and death stuff.
63 
67  const PrismaticBarCrossSection *getSectionPtr(const size_t &) const;
68  void setMaterial(const Material &);
69  void setMaterial(const std::string &);
70 
71  double getRho(void) const;
72  void setRho(const double &);
73  double getLinearRho(void) const;
74 
75  inline PhysProp &getPhysicalProperties(void)
76  { return physicalProperties; }
77  inline const PhysProp &getPhysicalProperties(void) const
78  { return physicalProperties; }
79  void setPhysicalProperties(const PhysProp &);
80  inline virtual std::set<std::string> getMaterialNames(void) const
81  { return physicalProperties.getMaterialNames(); }
82 
83  int setInitialSectionDeformation(const Vector &);
84  inline const Vector &getInitialSectionDeformation(void) const
85  { return (*physicalProperties[0]).getInitialSectionDeformation(); }
86  virtual const Vector &computeCurrentStrain(void) const;
87  const Vector &getSectionDeformation(void) const;
88  inline const Vector &getInitialStrain(void) const
89  { return (*physicalProperties[0]).getInitialSectionDeformation(); }
90  inline void setInitialStrain(const Vector &e)
91  { (*physicalProperties[0]).setInitialSectionDeformation(e); }
92 
93 
94  virtual int update(void);
95  int commitState(void);
96  int revertToLastCommit(void);
97  int revertToStart(void);
98 
99  void alive(void);
100  void zeroLoad(void);
101  virtual ElementalLoad *createInertiaLoad(const Vector &);
102 
104  Vector getVDirWeakAxisLocalCoord(void) const;
105  double getStrongAxisAngle(void) const;
106  double getWeakAxisAngle(void) const;
107 
108  virtual const Matrix &getExtrapolationMatrix(void) const
109  { return extrapolation_matrix; }
110 
111  boost::python::list getValuesAtNodes(const std::string &, bool silent= false) const;
112  };
113 } // end of XC namespace
114 
115 #endif
Vector getVDirWeakAxisLocalCoord(void) const
Returns the direction vector of element weak axis expressed in the local coordinate system...
Definition: ProtoBeam3d.cc:218
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: ProtoBeam3d.cc:120
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) in a three-dimensio...
Definition: CrossSectionProperties3d.h:42
int commitState(void)
Commit the element state.
Definition: ProtoBeam3d.cc:323
Float vector abstraction.
Definition: Vector.h:94
Base class for 3D beams.
Definition: ProtoBeam3d.h:40
Three-dimensional elastic section physical properties.
Definition: ElasticSection3dPhysicalProperties.h:41
const Vector & getPersistentInitialSectionDeformation(void) const
Returns the value of the persistent (does not get wiped out by zeroLoad) initial deformation of the e...
Definition: ProtoBeam3d.cc:125
Communication parameters between processes.
Definition: Communicator.h:66
virtual int update(void)
Update element state.
Definition: ProtoBeam3d.cc:280
Base class for Beam-column elements with PrismaticBarCrossSection material.
Definition: BeamColumn.h:45
int sendData(Communicator &)
Send members through the communicator argument.
Definition: ProtoBeam3d.cc:191
PhysProp physicalProperties
pointers to the material objects and physical properties.
Definition: ProtoBeam3d.h:47
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:53
Base class for materials.
Definition: Material.h:93
double getRho(void) const
Return linear density.
Definition: ProtoBeam3d.cc:179
void setMaterial(const Material &)
Set the element material.
Definition: ProtoBeam3d.cc:165
const Vector & getSectionDeformation(void) const
Return the section generalized strain.
Definition: ProtoBeam3d.cc:258
virtual ElementalLoad * createInertiaLoad(const Vector &)
Creates the inertia load that corresponds to the acceleration argument.
Definition: ProtoBeam3d.cc:357
Vector getVDirStrongAxisLocalCoord(void) const
Returns the direction vector of element strong axis expressed in the local coordinate system...
Definition: ProtoBeam3d.cc:209
void alive(void)
Reactivates the element.
Definition: ProtoBeam3d.cc:368
void zeroLoad(void)
Removes the element loads.
Definition: ProtoBeam3d.cc:379
double getStrongAxisAngle(void) const
Returns the angle between element strong axis and local XZ plane.
Definition: ProtoBeam3d.cc:227
double getWeakAxisAngle(void) const
Returns the angle between element weak axis and local XZ plane.
Definition: ProtoBeam3d.cc:235
ProtoBeam3d(int tag, int class_tag, const Material *m=nullptr)
Default constructor.
Definition: ProtoBeam3d.cc:70
static Matrix extrapolation_matrix
Extrapolation matrix.
Definition: ProtoBeam3d.h:45
double getLinearRho(void) const
Return linear density.
Definition: ProtoBeam3d.cc:187
void setRho(const double &)
Sets linear density.
Definition: ProtoBeam3d.cc:183
void setSectionProperties(const CrossSectionProperties3d &)
Set section properties.
Definition: ProtoBeam3d.cc:150
virtual const Vector & computeCurrentStrain(void) const
Compute the current strain.
Definition: ProtoBeam3d.cc:242
const PrismaticBarCrossSection * getSectionPtr(const size_t &) const
Returns a pointer to the i-th section of the element.
Definition: ProtoBeam3d.cc:156
int revertToStart(void)
Revert the the element to the its start state.
Definition: ProtoBeam3d.cc:348
virtual std::set< std::string > getMaterialNames(void) const
Return the names of the material(s) of the element.
Definition: ProtoBeam3d.h:80
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: ProtoBeam3d.cc:200
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void set_material(const Material *m)
Set values to section mass properties.
Definition: ProtoBeam3d.cc:42
Matrix of floats.
Definition: Matrix.h:111
int revertToLastCommit(void)
Revert the element to the its last commited state.
Definition: ProtoBeam3d.cc:338
const CrossSectionProperties3d & getSectionProperties(void) const
Return section properties.
Definition: ProtoBeam3d.cc:142
Base class for loads over elements.
Definition: ElementalLoad.h:79
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: ProtoBeam3d.cc:394
Vector persistentInitialDeformation
Persistent initial strain at element level. Used to store the deformation during the inactive phase o...
Definition: ProtoBeam3d.h:48
void incrementPersistentInitialDeformationWithCurrentDeformation(void)
Increments the persistent (does not get wiped out by zeroLoad) initial deformation of the section...
Definition: ProtoBeam3d.cc:132