xc
FiberSectionBase.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 //FiberSectionBase.h
28 
29 #ifndef FiberSectionBase_h
30 #define FiberSectionBase_h
31 
32 #include <material/section/PrismaticBarCrossSection.h>
33 #include "material/section/fiber_section/fiber/FiberContainer.h"
34 #include "material/section/fiber_section/fiber/FiberSets.h"
35 #include "xc_utils/src/geom/GeomObj.h"
36 #include <material/section/CrossSectionKR.h>
37 
38 class Polygon2d;
39 
40 namespace XC {
41 class Fiber;
42 class Response;
43 class FiberSectionRepr;
44 class InteractionDiagramData;
45 class InteractionDiagram;
46 class InteractionDiagram2d;
47 class NMPointCloud;
48 class NMyMzPointCloud;
49 
53 //
55 //
58  {
59  public:
60  typedef FiberSets::iterator fiber_set_iterator;
61  typedef FiberSets::const_iterator fiber_set_const_iterator;
62  private:
63  Vector eTrial;
64  Vector eInic;
65  Vector eCommit;
66  protected:
69  int fiberTag;
71  friend class FiberPtrDeque;
72  friend class FiberContainer;
73  FiberSectionRepr *section_repres;
74 
75  void setup_repres(void);
76  inline void alloc_fibers(int numOfFibers,const Fiber *muestra= nullptr)
77  { fibers.allocFibers(numOfFibers,muestra); }
78  void create_fiber_set(const std::string &nombre);
79  fiber_set_iterator get_fiber_set(const std::string &nmb_set);
80  virtual double get_dist_to_neutral_axis(const double &,const double &) const;
81  Pos3d Esf2Pos3d(void) const;
82  Pos3d getNMyMz(const DeformationPlane &);
83  void getInteractionDiagramPointsForTheta(NMyMzPointCloud &lista_esfuerzos,const InteractionDiagramData &,const FiberPtrDeque &,const FiberPtrDeque &,const double &);
86  public:
87  FiberSectionBase(int classTag,int dim,MaterialHandler *mat_ldr= nullptr);
88  FiberSectionBase(int tag, int classTag,int dim,MaterialHandler *mat_ldr= nullptr);
89  FiberSectionBase(int tag, int classTag, int numFibers,int dim,MaterialHandler *mat_ldr= nullptr);
92  ~FiberSectionBase(void);
93 
94  virtual void setupFibers(void) = 0;
95  inline size_t getNumFibers(void) const
96  { return fibers.getNumFibers(); }
97  inline FiberContainer &getFibers(void)
98  { return fibers; }
99  virtual Fiber *addFiber(Fiber &)= 0;
100  virtual Fiber *addFiber(int tag,const MaterialHandler &,const std::string &nmbMat,const double &, const Vector &position)= 0;
101  Fiber *addFiber(const std::string &nmbMat,const double &area,const Vector &coo);
102  int setInitialSectionDeformation(const Vector &deforms);
103  int setTrialSectionDeformation(const Vector &deforms);
104  inline void zeroInitialSectionDeformation(void)
105  { eInic.Zero(); }
106  inline const Vector &getInitialSectionDeformation(void) const
107  { return eInic; }
108  const Vector &getSectionDeformation(void) const;
109 
112  const GeomSection *getGeomSection(void) const;
113  Polygon2d getRegionsContour(void) const;
114  double getCompressedZoneDepth(const Line2d &) const;
115  double getCompressedZoneDepth(void) const;
116  double getTensionedZoneDepth(const Line2d &) const;
117  double getTensionedZoneDepth(void) const;
118  double getLeverArm(void) const;
119  double getNeutralAxisDepth(void) const;
120  double getNeutralAxisDist(const double &y,const double &z) const;
121  Vector getLeverArmVector(void) const;
122  Vector getVectorCantoUtil(void) const;
123  Segment2d getLeverArmSegment(void) const;
124  Segment2d getEffectiveDepthSegment(void) const;
125  double getMechanicLeverArm(void) const;
126  double getEffectiveDepth(void) const;
127  Line2d getBendingPlaneTrace(void) const;
128  Line2d getTensionedPlaneTrace(void) const;
129  Line2d getCompressedPlaneTrace(void) const;
130  double getAnchoMecanico(void) const;
131  double getCompressedStrutWidth(void) const;
132  double getCover(const Pos2d &) const;
133  Line2d getEffectiveConcreteAreaLimitLine(const double &) const;
134  double getGrossEffectiveConcreteArea(const double &) const;
135  double getNetEffectiveConcreteArea(const double &,const std::string &,const double &factor= 15) const;
136  double computeFibersEffectiveConcreteArea(const double &hEfMax,const std::string &,const double &factor= 15) const;
137  std::list<Polygon2d> getGrossEffectiveConcreteAreaContour(const double &) const;
138  void computeCovers(const std::string &) const;
139  void computeSpacement(const std::string &) const;
140  int updateCenterOfMass(void);
141  double getHomogenizedI(const double &E0) const;
142  double getSPosHomogeneizada(const double &E0) const;
143 
144  const Vector &getStressResultant(void) const;
145  double getStressResultant(const int &) const;
146  const Matrix &getSectionTangent(void) const;
147 
148  int commitState(void);
149  int revertToLastCommit(void);
150  int revertToStart(void);
151 
152  std::string getStrClaseEsfuerzo(const double &tol= 1e-4) const;
153 
154  inline FiberSets &getFiberSets(void)
155  { return fiber_sets; }
156  //fiber_set_iterator sel(const std::string &nmb_set,const std::string &cond);
157  fiber_set_iterator sel_mat_tag(const std::string &nmb_set,const int &matTag);
158  //fiber_set_iterator resel(const std::string &nmb_set,const std::string &nmb_set_org,const std::string &cond);
159  fiber_set_iterator resel_mat_tag(const std::string &nmb_set,const std::string &nmb_set_org,const int &matTag);
160  inline virtual double getCenterOfMassY(void) const
161  { return fibers.getCenterOfMassY(); }
162  double getArea(void) const;
163 
168  };
169 } // end of XC namespace
170 
171 #endif
(N,M) point set
Definition: NMPointCloud.h:44
void create_fiber_set(const std::string &nombre)
Creare a new fiber set.
Definition: FiberSectionBase.cc:117
Cross section geometry.
Definition: GeomSection.h:63
InteractionDiagram2d GetInteractionDiagramForPlane(const InteractionDiagramData &, const double &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:727
Float vector abstraction.
Definition: Vector.h:93
int commitState(void)
Commits state.
Definition: FiberSectionBase.cc:543
double getCover(const Pos2d &) const
Returns the concrete cover for the position being passed as parameter.
Definition: FiberSectionBase.cc:863
InteractionDiagram GetInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:710
Segment2d getEffectiveDepthSegment(void) const
Returns the segment defined by the current effective depth of the section.
Definition: FiberSectionBase.cc:791
CrossSectionKR kr
Stiffness and internal forces resultant on the section.
Definition: FiberSectionBase.h:67
Base class for fiber sections.
Definition: FiberSectionBase.h:57
int setInitialSectionDeformation(const Vector &deforms)
Sets generalized initial strains values.
Definition: FiberSectionBase.cc:159
InteractionDiagram2d GetNMzInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-Mz.
Definition: FiberSectionBase.cc:748
InteractionDiagram2d GetNMyInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-My.
Definition: FiberSectionBase.cc:744
double getHomogenizedI(const double &E0) const
Moment of inertia relative to bending axis.
Definition: FiberSectionBase.cc:885
const Matrix & getSectionTangent(void) const
Returns the tangent stiffness matrix.
Definition: FiberSectionBase.cc:530
double getCompressedZoneDepth(void) const
Returns section depth from the neutral axis to the most compressed fiber.
Definition: FiberSectionBase.cc:250
double getEffectiveDepth(void) const
Returns the effective depth of the section.
Definition: FiberSectionBase.cc:877
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:436
Pos3d Esf2Pos3d(void) const
Returns the point (N,My,Mz) that corresponds to the resultant of normal stresses in the section...
Definition: FiberSectionBase.cc:567
double getCompressedStrutWidth(void) const
Returns the compressed strut width (shear analysis).
Definition: FiberSectionBase.cc:852
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:217
Fiber sets container.
Definition: FiberSets.h:39
void Zero(void)
Zeros out the Vector, i.e.
Definition: Vector.h:256
const NMyMzPointCloud & getInteractionDiagramPoints(const InteractionDiagramData &)
Returns the points that define the interaction diagram of the section.
Definition: FiberSectionBase.cc:680
FiberSets fiber_sets
Fibers sets.
Definition: FiberSectionBase.h:70
fiber_set_iterator resel_mat_tag(const std::string &nmb_set, const std::string &nmb_set_org, const int &matTag)
Creates a fiber set with those that belongs to the set with the name nmb_set_org, and have the materi...
Definition: FiberSectionBase.cc:137
Line2d getEffectiveConcreteAreaLimitLine(const double &) const
Returns the line that limits the concrete effective area $A_{c,ef}$ as in article 49...
Definition: FiberSectionBase.cc:330
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:317
@ingroup MATSCCDiagInt
Definition: InteractionDiagramData.h:41
Line2d getCompressedPlaneTrace(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the compr...
Definition: FiberSectionBase.cc:830
Deformation plane for a cross-section.
Definition: DeformationPlane.h:53
int revertToLastCommit(void)
Returns to the last commited state.
Definition: FiberSectionBase.cc:551
FiberSectionRepr * getFiberSectionRepr(void)
Returns fiber section representation.
Definition: FiberSectionBase.cc:110
Section fiber.
Definition: Fiber.h:89
const Vector & getSectionDeformation(void) const
Returns material&#39;s trial generalized strain.
Definition: FiberSectionBase.cc:173
double getTensionedZoneDepth(void) const
Returns section depth from the neutral axis to the most tensioned fiber.
Definition: FiberSectionBase.cc:272
Line2d getTensionedPlaneTrace(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the tensi...
Definition: FiberSectionBase.cc:818
Stiffness matrix and resultant vector for a section.
Definition: CrossSectionKR.h:40
Fiber pointers container.
Definition: FiberPtrDeque.h:66
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:361
fiber_set_iterator sel_mat_tag(const std::string &nmb_set, const int &matTag)
Creates a fiber set which material has the tag being passed as parameter.
Definition: FiberSectionBase.cc:126
Segment2d getLeverArmSegment(void) const
Returns a segment from the centroid of the tensioned area to the centroid of the compressed area...
Definition: FiberSectionBase.cc:770
void computeSpacement(const std::string &) const
Computes spacing of the fibers.
Definition: FiberSectionBase.cc:502
void computeCovers(const std::string &) const
Computes concrete cover of the fibers.
Definition: FiberSectionBase.cc:485
Line2d getBendingPlaneTrace(void) const
Returns the intercept of the bending plane with the plane that contains the cross section...
Definition: FiberSectionBase.cc:803
Polygon2d getRegionsContour(void) const
Returns cross section contour.
Definition: FiberSectionBase.cc:207
double getMechanicLeverArm(void) const
Returns the lever arm of the section.
Definition: FiberSectionBase.cc:873
void setup_repres(void)
Section representation.
Definition: FiberSectionBase.cc:100
Vector getVectorCantoUtil(void) const
Returns a vector oriented from the centroid of the area in tension to the most compressed fiber...
Definition: FiberSectionBase.cc:757
@ingroup MATSCCDiagInt
Definition: InteractionDiagram.h:48
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
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:646
int fiberTag
Tag for next fiber.
Definition: FiberSectionBase.h:69
FiberSectionBase & operator=(const FiberSectionBase &)
Assignment operator.
Definition: FiberSectionBase.cc:80
Fiber container.
Definition: FiberContainer.h:40
double getArea(void) const
Returns the section area.
Definition: FiberSectionBase.cc:881
Fiber section representation.
Definition: FiberSectionRepr.h:78
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
GeomSection * getGeomSection(void)
Returns a pointer to section geometry.
Definition: FiberSectionBase.cc:200
void allocFibers(int numOfFibers, const Fiber *muestra=nullptr)
Allocates memory for each fiber material and for its data; two (yLoc,Area) for 2D sections (getOrder(...
Definition: FiberContainer.cc:37
Vector getLeverArmVector(void) const
Returns a vector from the centroid of tensions to the centroid of compressions.
Definition: FiberSectionBase.cc:752
~FiberSectionBase(void)
Destructor:
Definition: FiberSectionBase.cc:142
Matrix of floats.
Definition: Matrix.h:108
const Vector & getStressResultant(void) const
Returns the resultant of section stresses.
Definition: FiberSectionBase.cc:534
virtual double getCenterOfMassY(void) const
Returns the coordenada «y» del centro de gravedad of the cross-section.
Definition: FiberSectionBase.h:160
@ingroup MATSCCDiagInt
Definition: InteractionDiagram2d.h:43
FiberContainer fibers
Pointers to fibers container.
Definition: FiberSectionBase.h:68
int revertToStart(void)
Returns to the initial state.
Definition: FiberSectionBase.cc:559
double getSPosHomogeneizada(const double &E0) const
Static moment relative to bending axis of area that rests over this axis.
Definition: FiberSectionBase.cc:894
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:586
Pos3d getNMyMz(const DeformationPlane &)
Returns the section normal stresses resultant for the deformation plane being passed as parameter...
Definition: FiberSectionBase.cc:572
double computeFibersEffectiveConcreteArea(const double &hEfMax, const std::string &, const double &factor=15) const
Computes crack effective concrete areas around the fibers.
Definition: FiberSectionBase.cc:461
(N,My,Mz) point set
Definition: NMyMzPointCloud.h:46
fiber_set_iterator get_fiber_set(const std::string &nmb_set)
Creates a fiber set which name is being passed as parameter.
Definition: FiberSectionBase.cc:121
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:518
int setTrialSectionDeformation(const Vector &deforms)
Sets generalized trial strains values.
Definition: FiberSectionBase.cc:166
double getNeutralAxisDepth(void) const
Returns neutral axis depth.
Definition: FiberSectionBase.cc:310
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:842