xc
FiberSectionBase.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 //FiberSectionBase.h
29 
30 #ifndef FiberSectionBase_h
31 #define FiberSectionBase_h
32 
33 #include <material/section/PrismaticBarCrossSection.h>
34 #include "material/section/fiber_section/fiber/FiberContainer.h"
35 #include "material/section/fiber_section/fiber/FiberSets.h"
36 #include "utility/geom/GeomObj.h"
37 #include <material/section/CrossSectionKR.h>
38 
39 class Polygon2d;
40 
41 namespace XC {
42 class Fiber;
43 class Response;
44 class FiberSectionRepr;
45 class InteractionDiagramData;
46 class InteractionDiagram;
47 class InteractionDiagram2d;
48 class NMPointCloud;
49 class NMyMzPointCloud;
50 
54 //
56 //
59  {
60  public:
61  typedef FiberSets::iterator fiber_set_iterator;
62  typedef FiberSets::const_iterator fiber_set_const_iterator;
63  private:
64  Vector eTrial;
65  Vector eInic;
66  Vector eCommit;
67 
68  void free_section_repres(void);
69  void alloc_section_repres(const FiberSectionRepr *);
70  protected:
73  int fiberTag;
75  friend class FiberPtrDeque;
76  friend class FiberContainer;
77  FiberSectionRepr *section_repres;
78 
79  int sendData(Communicator &);
80  int recvData(const Communicator &);
81 
82  void setup_repres(void);
83  inline void alloc_fibers(int numOfFibers,const Fiber *sample= nullptr)
84  { fibers.allocFibers(numOfFibers,sample); }
85  void create_fiber_set(const std::string &name);
86  fiber_set_iterator get_fiber_set(const std::string &set_name);
87  virtual double get_dist_to_neutral_axis(const double &,const double &) const;
88  Pos3d Esf2Pos3d(void) const;
90  void getInteractionDiagramPointsForTheta(NMyMzPointCloud &lista_esfuerzos,const InteractionDiagramData &,const FiberPtrDeque &,const FiberPtrDeque &,const double &);
93  public:
94  FiberSectionBase(int classTag,int dim,MaterialHandler *mat_ldr= nullptr);
95  FiberSectionBase(int tag, int classTag,int dim,MaterialHandler *mat_ldr= nullptr);
96  FiberSectionBase(int tag, int classTag, int numFibers,int dim,MaterialHandler *mat_ldr= nullptr);
99  ~FiberSectionBase(void);
100 
101  void clear(void);
102 
103  virtual void setupFibers(void) = 0;
104  inline size_t getNumFibers(void) const
105  { return fibers.getNumFibers(); }
106  inline FiberContainer &getFibers(void)
107  { return fibers; }
108  virtual Fiber *addFiber(Fiber &)= 0;
109  virtual Fiber *addFiber(int tag,const MaterialHandler &,const std::string &nmbMat,const double &, const Vector &position)= 0;
110  Fiber *addFiber(const std::string &nmbMat,const double &area,const Vector &coo);
111  int setInitialSectionDeformation(const Vector &deforms);
112  int setTrialSectionDeformation(const Vector &deforms);
113  inline void zeroInitialSectionDeformation(void)
114  { eInic.Zero(); }
115  inline const Vector &getInitialSectionDeformation(void) const
116  { return eInic; }
117  const Vector &getSectionDeformation(void) const;
118 
121  const SectionGeometry *getSectionGeometry(void) const;
122  Polygon2d getRegionsContour(void) const;
123  double getCompressedZoneDepth(const Line2d &) const;
124  double getCompressedZoneDepth(void) const;
125  double getTensionedZoneDepth(const Line2d &) const;
126  double getTensionedZoneDepth(void) const;
127  double getLeverArm(void) const;
128  double getNeutralAxisDepth(void) const;
129  double getNeutralAxisDist(const double &y,const double &z) const;
130  Vector getLeverArmVector(void) const;
131  Vector getVectorCantoUtil(void) const;
132  Segment2d getLeverArmSegment(void) const;
134  double getMechanicLeverArm(void) const;
135  double getEffectiveDepth(void) const;
136  Line2d getBendingPlaneTrace(void) const;
137  Line2d getTensionedPlaneTrace(void) const;
138  Line2d getCompressedPlaneTrace(void) const;
139  double getAnchoMecanico(void) const;
140  double getCompressedStrutWidth(void) const;
141  double getCover(const Pos2d &) const;
142  Line2d getEffectiveConcreteAreaLimitLine(const double &) const;
143  double getGrossEffectiveConcreteArea(const double &) const;
144  double getNetEffectiveConcreteArea(const double &,const std::string &,const double &factor= 15) const;
145  double computeFibersEffectiveConcreteArea(const double &hEfMax,const std::string &,const double &factor= 15) const;
146  std::list<Polygon2d> getGrossEffectiveConcreteAreaContour(const double &) const;
147  void computeCovers(const std::string &) const;
148  void computeSpacement(const std::string &) const;
149  int updateCenterOfMass(void);
150  double getHomogenizedI(const double &E0) const;
151  double getSPosHomogenized(const double &E0) const;
152 
153  const Vector &getStressResultant(void) const;
154  double getStressResultant(const int &) const;
155  const Matrix &getSectionTangent(void) const;
156 
157  int commitState(void);
158  int revertToLastCommit(void);
159  int revertToStart(void);
160 
161  std::string getStrClaseEsfuerzo(const double &tol= 1e-4) const;
162 
163  inline FiberSets &getFiberSets(void)
164  { return fiber_sets; }
165  //fiber_set_iterator sel(const std::string &set_name,const std::string &cond);
166  fiber_set_iterator sel_mat_tag(const std::string &set_name,const int &matTag);
167  //fiber_set_iterator resel(const std::string &set_name,const std::string &set_name_org,const std::string &cond);
168  fiber_set_iterator resel_mat_tag(const std::string &set_name,const std::string &set_name_org,const int &matTag);
169  std::set<int> getMatTags(void);
170  boost::python::list getMatTagsPy(void);
171 
172  inline virtual double getCenterOfMassY(void) const
173  { return fibers.getCenterOfMassY(); }
174  double getArea(void) const;
175 
180 
181  virtual Response *setResponse(const std::vector<std::string> &, Information &);
182 
183  // AddingSensitivity:BEGIN //////////////////////////////////////////
184  int setParameter(const std::vector<std::string> &argv, Parameter &param);
185  // AddingSensitivity:END ///////////////////////////////////////////
186  double getEnergy(void) const;
187  };
188 } // end of XC namespace
189 
190 #endif
(N,M) point set
Definition: NMPointCloud.h:45
InteractionDiagram2d GetInteractionDiagramForPlane(const InteractionDiagramData &, const double &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:839
Float vector abstraction.
Definition: Vector.h:94
int commitState(void)
Commits state.
Definition: FiberSectionBase.cc:597
double getCover(const Pos2d &) const
Returns the concrete cover for the position being passed as parameter.
Definition: FiberSectionBase.cc:977
InteractionDiagram GetInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:821
Segment2d getEffectiveDepthSegment(void) const
Returns the segment defined by the current effective depth of the section.
Definition: FiberSectionBase.cc:904
CrossSectionKR kr
Stiffness and internal forces resultant on the section.
Definition: FiberSectionBase.h:71
Base class for fiber sections.
Definition: FiberSectionBase.h:58
int setInitialSectionDeformation(const Vector &deforms)
Sets generalized initial strains values.
Definition: FiberSectionBase.cc:206
InteractionDiagram2d GetNMzInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-Mz.
Definition: FiberSectionBase.cc:861
InteractionDiagram2d GetNMyInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-My.
Definition: FiberSectionBase.cc:857
virtual Response * setResponse(const std::vector< std::string > &, Information &)
Returns the respuesta of the section.
Definition: FiberSectionBase.cc:1045
Information about an element.
Definition: Information.h:81
double getHomogenizedI(const double &E0) const
Moment of inertia relative to bending axis.
Definition: FiberSectionBase.cc:999
Communication parameters between processes.
Definition: Communicator.h:66
fiber_set_iterator sel_mat_tag(const std::string &set_name, const int &matTag)
Creates a fiber set which material has the tag being passed as parameter.
Definition: FiberSectionBase.cc:167
Base class response objects.
Definition: Response.h:81
const Matrix & getSectionTangent(void) const
Returns the tangent stiffness matrix.
Definition: FiberSectionBase.cc:585
double getCompressedZoneDepth(void) const
Returns section depth from the neutral axis to the most compressed fiber.
Definition: FiberSectionBase.cc:297
void create_fiber_set(const std::string &name)
Creare a new fiber set.
Definition: FiberSectionBase.cc:158
Posición en dos dimensiones.
Definition: Pos2d.h:41
double getEffectiveDepth(void) const
Returns the effective depth of the section.
Definition: FiberSectionBase.cc:991
fiber_set_iterator get_fiber_set(const std::string &set_name)
Creates a fiber set which name is being passed as parameter.
Definition: FiberSectionBase.cc:162
Line in a two-dimensional space.
Definition: Line2d.h:61
double getNetEffectiveConcreteArea(const double &, const std::string &, const double &factor=15) const
Returns the sum of the effective areas of rebars in tension.
Definition: FiberSectionBase.cc:485
Pos3d Esf2Pos3d(void) const
Returns the point (N,My,Mz) that corresponds to the resultant of normal stresses in the section...
Definition: FiberSectionBase.cc:621
double getCompressedStrutWidth(void) const
Returns the compressed strut width (shear analysis).
Definition: FiberSectionBase.cc:966
Base class for beam-column cross sections.
Definition: PrismaticBarCrossSection.h:50
double getLeverArm(void) const
Returns current section lever arm from the position of neutral axis.
Definition: FiberSectionBase.cc:264
Fiber sets container.
Definition: FiberSets.h:41
void Zero(void)
Zeros out the Vector, i.e.
Definition: Vector.h:263
const NMyMzPointCloud & getInteractionDiagramPoints(const InteractionDiagramData &)
Returns the points that define the interaction diagram of the section.
Definition: FiberSectionBase.cc:776
double getSPosHomogenized(const double &E0) const
Static moment relative to bending axis of area that rests over this axis.
Definition: FiberSectionBase.cc:1009
FiberSets fiber_sets
Fibers sets.
Definition: FiberSectionBase.h:74
SectionGeometry * getSectionGeometry(void)
Returns a pointer to section geometry.
Definition: FiberSectionBase.cc:247
Line2d getEffectiveConcreteAreaLimitLine(const double &) const
Returns the line that limits the concrete effective area $A_{c,ef}$ as in article 49...
Definition: FiberSectionBase.cc:377
int recvData(const Communicator &)
Receive data through the communicator argument.
Definition: FiberSectionBase.cc:127
double getNeutralAxisDist(const double &y, const double &z) const
Returns the distance from the neutral axis to the point whose coordinates are being passed as paramet...
Definition: FiberSectionBase.cc:364
@ingroup MATSCCDiagInt
Definition: InteractionDiagramData.h:42
Line2d getCompressedPlaneTrace(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the compr...
Definition: FiberSectionBase.cc:944
Deformation plane for a cross-section.
Definition: DeformationPlane.h:54
int revertToLastCommit(void)
Returns to the last committed state.
Definition: FiberSectionBase.cc:605
FiberSectionRepr * getFiberSectionRepr(void)
Returns fiber section representation.
Definition: FiberSectionBase.cc:151
Section fiber.
Definition: Fiber.h:90
const Vector & getSectionDeformation(void) const
Returns material&#39;s trial generalized strain.
Definition: FiberSectionBase.cc:220
double getTensionedZoneDepth(void) const
Returns section depth from the neutral axis to the most tensioned fiber.
Definition: FiberSectionBase.cc:319
Line2d getTensionedPlaneTrace(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the tensi...
Definition: FiberSectionBase.cc:931
Stiffness matrix and resultant vector for a section.
Definition: CrossSectionKR.h:42
void allocFibers(int numOfFibers, const Fiber *sample=nullptr)
Allocates memory for each fiber material and for its data; two (yLoc,Area) for 2D sections (getOrder(...
Definition: FiberContainer.cc:37
Polígono en dos dimensiones.
Definition: Polygon2d.h:38
Fiber pointers container.
Definition: FiberPtrDeque.h:68
std::list< Polygon2d > getGrossEffectiveConcreteAreaContour(const double &) const
Returns the contours of the concrete effective area the area that CAN "collaborate" with rebars to r...
Definition: FiberSectionBase.cc:408
fiber_set_iterator resel_mat_tag(const std::string &set_name, const std::string &set_name_org, const int &matTag)
Creates a fiber set with those that belongs to the set with the name set_name_org, and have the material indetified with the tag being passed as parameter.
Definition: FiberSectionBase.cc:178
Segment in a two-dimensional space.
Definition: Segment2d.h:38
double getEnergy(void) const
Return the energy stored in the material.
Definition: FiberSectionBase.cc:1021
Segment2d getLeverArmSegment(void) const
Returns a segment from the centroid of the tensioned area to the centroid of the compressed area...
Definition: FiberSectionBase.cc:883
void computeSpacement(const std::string &) const
Computes spacing of the fibers.
Definition: FiberSectionBase.cc:556
void computeCovers(const std::string &) const
Computes concrete cover of the fibers.
Definition: FiberSectionBase.cc:538
Line2d getBendingPlaneTrace(void) const
Returns the intercept of the bending plane with the plane that contains the cross section...
Definition: FiberSectionBase.cc:916
Polygon2d getRegionsContour(void) const
Returns cross section contour.
Definition: FiberSectionBase.cc:254
double getMechanicLeverArm(void) const
Returns the lever arm of the section.
Definition: FiberSectionBase.cc:987
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: FiberSectionBase.cc:1139
void setup_repres(void)
Creates a new fiber section representation.
Definition: FiberSectionBase.cc:141
Vector getVectorCantoUtil(void) const
Returns a vector oriented from the centroid of the area in tension to the most compressed fiber...
Definition: FiberSectionBase.cc:870
@ingroup MATSCCDiagInt
Definition: InteractionDiagram.h:49
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
boost::python::list getMatTagsPy(void)
Return the material tags of the fibers in a Python list.
Definition: FiberSectionBase.cc:704
const NMPointCloud & getInteractionDiagramPointsForPlane(const InteractionDiagramData &, const double &)
Returns the points that define the interaction diagram on the plane defined by the angle being passe...
Definition: FiberSectionBase.cc:709
int fiberTag
Tag for next fiber.
Definition: FiberSectionBase.h:73
int sendData(Communicator &)
Section representation.
Definition: FiberSectionBase.cc:113
FiberSectionBase & operator=(const FiberSectionBase &)
Assignment operator.
Definition: FiberSectionBase.cc:96
Fiber container.
Definition: FiberContainer.h:41
double getArea(void) const
Returns the section area.
Definition: FiberSectionBase.cc:995
Posición en tres dimensiones.
Definition: Pos3d.h:44
Fiber section representation.
Definition: FiberSectionRepr.h:79
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Vector getLeverArmVector(void) const
Returns a vector from the centroid of tensions to the centroid of compressions.
Definition: FiberSectionBase.cc:865
~FiberSectionBase(void)
Destructor:
Definition: FiberSectionBase.cc:183
Matrix of floats.
Definition: Matrix.h:111
const Vector & getStressResultant(void) const
Returns the resultant of section stresses.
Definition: FiberSectionBase.cc:589
virtual double getCenterOfMassY(void) const
Returns the y coordinate of the center of gravity of the cross-section.
Definition: FiberSectionBase.h:172
Parameter.
Definition: Parameter.h:68
@ingroup MATSCCDiagInt
Definition: InteractionDiagram2d.h:45
FiberContainer fibers
Pointers to fibers container.
Definition: FiberSectionBase.h:72
int revertToStart(void)
Returns to the initial state.
Definition: FiberSectionBase.cc:613
void getInteractionDiagramPointsForTheta(NMyMzPointCloud &lista_esfuerzos, const InteractionDiagramData &, const FiberPtrDeque &, const FiberPtrDeque &, const double &)
Returns the points that define the interaction diagram of the section for an angle with respect to t...
Definition: FiberSectionBase.cc:640
Cross section geometry.
Definition: SectionGeometry.h:65
Pos3d getNMyMz(const DeformationPlane &)
Returns the section normal stresses resultant for the deformation plane being passed as parameter...
Definition: FiberSectionBase.cc:626
double computeFibersEffectiveConcreteArea(const double &hEfMax, const std::string &, const double &factor=15) const
Computes crack effective concrete areas around the fibers.
Definition: FiberSectionBase.cc:512
(N,My,Mz) point set
Definition: NMyMzPointCloud.h:45
std::set< int > getMatTags(void)
Return the material tags of the fibers.
Definition: FiberSectionBase.cc:700
virtual double get_dist_to_neutral_axis(const double &, const double &) const
Returns the signed distance from the neutral axis to the point whose coordinates are being passed as ...
Definition: FiberSectionBase.cc:573
int setTrialSectionDeformation(const Vector &deforms)
Sets generalized trial strains values.
Definition: FiberSectionBase.cc:213
double getNeutralAxisDepth(void) const
Returns neutral axis depth.
Definition: FiberSectionBase.cc:357
double getAnchoMecanico(void) const
Returns the width of the section for shear checking see (figure 44.2.1.a in article 44 of EHE-08)...
Definition: FiberSectionBase.cc:956