XC Open source finite element analysis program
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/SeccionBarraPrismatica.h>
33 #include "material/section/fiber_section/fiber/StoFibras.h"
34 #include "material/section/fiber_section/fiber/FiberSets.h"
35 #include "xc_utils/src/geom/GeomObj.h"
36 #include <material/section/KRSeccion.h>
37 
38 class Poligono2d;
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 
51 //
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 tag_fibra;
71  friend class DqFibras;
72  friend class StoFibras;
73  FiberSectionRepr *section_repres;
74 
75  void setup_repres(void);
76  inline void alloc_fibers(int numFibras,const Fiber *muestra= nullptr)
77  { fibras.allocFibers(numFibras,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 DqFibras &,const DqFibras &,const double &);
86  public:
87  FiberSectionBase(int classTag,int dim,MaterialLoader *mat_ldr= nullptr);
88  FiberSectionBase(int tag, int classTag,int dim,MaterialLoader *mat_ldr= nullptr);
89  FiberSectionBase(int tag, int classTag, int numFibers,int dim,MaterialLoader *mat_ldr= nullptr);
92  ~FiberSectionBase(void);
93 
94  virtual void setupFibers(void) = 0;
95  inline size_t getNumFibers(void) const
96  { return fibras.getNumFibers(); }
97  inline StoFibras &getFibers(void)
98  { return fibras; }
99  virtual Fiber *addFiber(Fiber &)= 0;
100  virtual Fiber *addFiber(int tag,const MaterialLoader &,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  Poligono2d getRegionsContour(void) const;
114  double getCantoMecanicoZonaComprimida(const Recta2d &) const;
115  double getCantoMecanicoZonaComprimida(void) const;
116  double getCantoMecanicoZonaTraccionada(const Recta2d &) const;
117  double getCantoMecanicoZonaTraccionada(void) const;
118  double getCantoMecanico(void) const;
119  double getNeutralAxisDepth(void) const;
120  double getDistFibraNeutra(const double &y,const double &z) const;
121  Vector getVectorBrazoMecanico(void) const;
122  Vector getVectorCantoUtil(void) const;
123  Segmento2d getSegmentoBrazoMecanico(void) const;
124  Segmento2d getSegmentoCantoUtil(void) const;
125  double getBrazoMecanico(void) const;
126  double getCantoUtil(void) const;
127  Recta2d getTrazaPlanoFlexion(void) const;
128  Recta2d getTrazaPlanoTraccion(void) const;
129  Recta2d getTrazaPlanoCompresion(void) const;
130  double getAnchoMecanico(void) const;
131  double getAnchoBielaComprimida(void) const;
132  double getRecubrimiento(const Pos2d &) const;
133  Recta2d getRectaLimiteAcEficaz(const double &) const;
134  double getAcEficazBruta(const double &) const;
135  double getAcEficazNeta(const double &,const std::string &,const double &factor= 15) const;
136  double calcAcEficazFibras(const double &hEfMax,const std::string &,const double &factor= 15) const;
137  std::list<Poligono2d> getContourAcEficazBruta(const double &) const;
138  void calcRecubrimientos(const std::string &) const;
139  void calcSeparaciones(const std::string &) const;
140  int updateCDG(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 sets_fibras; }
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 getCdgY(void) const
161  { return fibras.getYCdg(); }
162  double getArea(void) const;
163 
168  };
169 } // end of XC namespace
170 
171 #endif
FiberSectionBase & operator=(const FiberSectionBase &otro)
Assignment operator.
Definition: FiberSectionBase.cc:80
int revertToLastCommit(void)
Returns to the last commited state.
Definition: FiberSectionBase.cc:535
double getCantoMecanicoZonaTraccionada(void) const
Returns section depth from the neutral axis to the most tensioned fiber.
Definition: FiberSectionBase.cc:296
double getCantoUtil(void) const
Returns the effective depth of the section.
Definition: FiberSectionBase.cc:851
Recta2d getRectaLimiteAcEficaz(const double &) const
Returns the line that limits the concrete efficient area $A_{c,ef}$ as in article 49...
Definition: FiberSectionBase.cc:353
double getBrazoMecanico(void) const
Returns the lever arm of the section.
Definition: FiberSectionBase.cc:847
void getInteractionDiagramPointsForTheta(NMyMzPointCloud &lista_esfuerzos, const InteractionDiagramData &, const DqFibras &, const DqFibras &, const double &)
Returns the points that define the interaction diagram of the section for an angle $$ with respect to...
Definition: FiberSectionBase.cc:570
(N,M) point set
Definition: NMPointCloud.h:44
int setInitialSectionDeformation(const Vector &deforms)
Sets generalized initial strains values.
Definition: FiberSectionBase.cc:187
Definition: Vector.h:82
double getRecubrimiento(const Pos2d &) const
Returns the concrete cover for the position being passed as parameter.
Definition: FiberSectionBase.cc:837
FiberSectionRepr * getFiberSectionRepr(void)
Returns fiber section representation.
Definition: FiberSectionBase.cc:110
double getAcEficazNeta(const double &, const std::string &, const double &factor=15) const
Returns the sum of the efficient areas of rebars in tension.
Definition: FiberSectionBase.cc:421
double getCantoMecanicoZonaComprimida(void) const
Returns section depth from the neutral axis to the most compressed fiber.
Definition: FiberSectionBase.cc:275
Vector getVectorCantoUtil(void) const
Returns a vector oriented from the centroid of the area in tension to the most compressed fiber...
Definition: FiberSectionBase.cc:733
double getDistFibraNeutra(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:340
double getHomogenizedI(const double &E0) const
Moment of inertia relative to bending axis.
Definition: FiberSectionBase.cc:859
GeomSection * getGeomSection(void)
Returns a pointer to section geometry.
Definition: FiberSectionBase.cc:226
Recta2d getTrazaPlanoTraccion(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the tensi...
Definition: FiberSectionBase.cc:795
Pos3d getNMyMz(const DeformationPlane &)
Returns the section normal stresses resultant for the deformation plane being passed as parameter...
Definition: FiberSectionBase.cc:556
Segmento2d getSegmentoBrazoMecanico(void) const
Returns a segment from the centroid of the tensioned area to the centroid of the compressed area...
Definition: FiberSectionBase.cc:746
StoFibras fibras
Pointers to fibers container.
Definition: FiberSectionBase.h:68
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:502
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:816
Recta2d getTrazaPlanoCompresion(void) const
Returns the intercept of a plane perpendicular to the bending plane through the centroid of the compr...
Definition: FiberSectionBase.cc:806
Segmento2d getSegmentoCantoUtil(void) const
Returns the segment defined by the current effective depth of the section. The segment is oriented fr...
Definition: FiberSectionBase.cc:768
KRSeccion kr
Stiffness and internal forces resultant on the section.
Definition: FiberSectionBase.h:67
double getCantoMecanico(void) const
Returns current section lever arm from the position of neutral axis.
Definition: FiberSectionBase.cc:243
@ingroup MATSCCDiagInt
Definition: InteractionDiagram2d.h:43
double getArea(void) const
Returns the section area.
Definition: FiberSectionBase.cc:855
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:165
double getSPosHomogeneizada(const double &E0) const
Static moment relative to bending axis of area that rests over this axis.
Definition: FiberSectionBase.cc:868
InteractionDiagram2d GetInteractionDiagramForPlane(const InteractionDiagramData &, const double &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:703
Poligono2d getRegionsContour(void) const
Returns cross section contour.
Definition: FiberSectionBase.cc:233
void setup_repres(void)
Section representation.
Definition: FiberSectionBase.cc:100
double getNeutralAxisDepth(void) const
Returns neutral axis depth.
Definition: FiberSectionBase.cc:333
InteractionDiagram GetInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram.
Definition: FiberSectionBase.cc:686
const Vector & getSectionDeformation(void) const
Returns material&#39;s trial generalized strain.
Definition: FiberSectionBase.cc:201
Recta2d getTrazaPlanoFlexion(void) const
Returns the intercept of the bending plane with the plane that contains the cross section...
Definition: FiberSectionBase.cc:780
std::list< Poligono2d > getContourAcEficazBruta(const double &) const
Returns the contours of the concrete efficient area $A_{c,ef}$ as in article 49.2.4 from EHE-08 (hatched area in figure 49.2.4b). See also figures 47.5 y 47.6 from volume II of the book: "Proyecto y cálculo de estructuras de hormigón" author: J. Calavera.
Definition: FiberSectionBase.cc:379
Base class for beam-column cross sections. Constitutive equations of the section. ...
Definition: SeccionBarraPrismatica.h:50
InteractionDiagram2d GetNMzInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-Mz.
Definition: FiberSectionBase.cc:724
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
int revertToStart(void)
Returns to the initial state.
Definition: FiberSectionBase.cc:543
Fiber section representation.
Definition: FiberSectionRepr.h:78
FiberSets sets_fibras
Fibers sets.
Definition: FiberSectionBase.h:70
Vector getVectorBrazoMecanico(void) const
Returns a vector from the centroid of tensions to the centroid of compressions.
Definition: FiberSectionBase.cc:728
int setTrialSectionDeformation(const Vector &deforms)
Sets generalized trial strains values.
Definition: FiberSectionBase.cc:194
double calcAcEficazFibras(const double &hEfMax, const std::string &, const double &factor=15) const
Computes crack effcient areas around the fibers.
Definition: FiberSectionBase.cc:445
void create_fiber_set(const std::string &nombre)
Creare a new fiber set.
Definition: FiberSectionBase.cc:117
virtual double getCdgY(void) const
Returns the coordenada «y» del centro de gravedad of the cross-section.
Definition: FiberSectionBase.h:160
Contenedor de fibras.
Definition: DqFibras.h:66
Deformation plane for a cross-section.
Definition: DeformationPlane.h:53
Pos3d Esf2Pos3d(void) const
Returns the point (N,My,Mz) that corresponds to the resultant of normal stresses in the section...
Definition: FiberSectionBase.cc:551
int tag_fibra
Tag for next fiber.
Definition: FiberSectionBase.h:69
Definition: Matrix.h:82
Fiber sets container.
Definition: FiberSets.h:41
Contenedor de fibras.
Definition: StoFibras.h:40
const NMPointCloud & getInteractionDiagramPointsForPlane(const InteractionDiagramData &, const double &)
Returns the points that define the interaction diagram on the plane defined by the $$ angle being pas...
Definition: FiberSectionBase.cc:630
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Section fiber.
Definition: Fiber.h:89
const Vector & getStressResultant(void) const
Returns the resultant of section stresses.
Definition: FiberSectionBase.cc:518
int commitState(void)
Commits state.
Definition: FiberSectionBase.cc:527
const Matrix & getSectionTangent(void) const
Returns the tangent stiffness matrix.
Definition: FiberSectionBase.cc:514
Base class for fiber sections.
Definition: FiberSectionBase.h:57
void allocFibers(int numFibras, const Fiber *muestra=nullptr)
Allocates memory for each fiber material and for its data; two (yLoc,Area) for 2D sections (getOrder(...
Definition: StoFibras.cc:37
void calcSeparaciones(const std::string &) const
Computes spacing of the fibers.
Definition: FiberSectionBase.cc:486
InteractionDiagram2d GetNMyInteractionDiagram(const InteractionDiagramData &)
Returns the interaction diagram on plane N-My.
Definition: FiberSectionBase.cc:720
(N,My,Mz) point set
Definition: NMyMzPointCloud.h:46
~FiberSectionBase(void)
Destructor:
Definition: FiberSectionBase.cc:170
================================================================================
Definition: ContinuaReprComponent.h:34
double getAnchoBielaComprimida(void) const
Returns the ancho de la biela comprimida (en cortante).
Definition: FiberSectionBase.cc:826
Stiffness matrix and resultant vector for a section.
Definition: KRSeccion.h:40
@ingroup MATSCCDiagInt
Definition: InteractionDiagramData.h:41
Cross section geometry.
Definition: GeomSection.h:62
@ingroup MATSCCDiagInt
Definition: InteractionDiagram.h:48
const NMyMzPointCloud & getInteractionDiagramPoints(const InteractionDiagramData &)
Returns the points that define the interaction diagram of the section.
Definition: FiberSectionBase.cc:660
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:154
void calcRecubrimientos(const std::string &) const
Computes concrete cover of the fibers.
Definition: FiberSectionBase.cc:469