OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
FibersIShape Class Reference

Class that stores funcions, material properties, geometric and mechanical parameters for a steel I shape (non double symmetric) fiber section. More...

Inheritance diagram for FibersIShape:
Fibers FibersIShapeSteelIShape

Public Member Functions

def __init__ (self, int ID, d, bf_t, bf_b, tf_t, tf_b, tw, int top_flange_mat_ID, int bottom_flange_mat_ID, int web_mat_ID, list discr_top_flange, list discr_bottom_flange, list discr_web, GJ=0.0)
 Constructor of the class. More...
 
def CreateFibers (self)
 Method that initialise the fiber by calling the OpenSeesPy commands. More...
 
def ReInit (self)
 Implementation of the homonym abstract method. More...
 
def ShowInfo (self, plot=False, block=False)
 Implementation of the homonym abstract method. More...
 
def UpdateStoredData (self)
 Implementation of the homonym abstract method. More...
 

Public Attributes

 bf_b
 
 bf_t
 
 bottom_flange_mat_ID
 
 d
 
 data
 
 discr_bottom_flange
 
 discr_top_flange
 
 discr_web
 
 fib_sec
 
 GJ
 
 ID
 
 Initialized
 
 section_name_tag
 
 tf_b
 
 tf_t
 
 top_flange_mat_ID
 
 tw
 
 web_mat_ID
 

Detailed Description

Class that stores funcions, material properties, geometric and mechanical parameters for a steel I shape (non double symmetric) fiber section.

Coordinates: plotting coordinte (x, y) = fiber section coordinate (z, y) = (-x, y). For more information, see the OpenSeesPy documentation.

Parameters
FibersParent abstract class.

Definition at line 465 of file Fibers.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
int  ID,
  d,
  bf_t,
  bf_b,
  tf_t,
  tf_b,
  tw,
int  top_flange_mat_ID,
int  bottom_flange_mat_ID,
int  web_mat_ID,
list  discr_top_flange,
list  discr_bottom_flange,
list  discr_web,
  GJ = 0.0 
)

Constructor of the class.

Parameters
ID(int): Unique fiber section ID.
d(float): Depth of the section.
bf_t(float): Top flange's width of the section
bf_b(float): Bottom flange's width of the section
tf_t(float): Top flange's thickness of the section
tf_b(float): Bottom flange's thickness of the section
tw(float): Web's thickness of the section
top_flange_mat_ID(int): ID of material model that will be assigned to the top flange fibers.
bottom_flange_mat_ID(int): ID of material model that will be assigned to the bottom flange fibers.
web_mat_ID(int): ID of material model that will be assigned to the web fibers.
discr_top_flange(list): List with two entries: discretisation in IJ (x/z) and JK (y) for the top flange.
discr_bottom_flange(list): List with two entries: discretisation in IJ (x/z) and JK (y) for the bottom flange.
discr_web(list): List with two entries: discretisation in IJ (x/z) and JK (y) for the web.
GJ(float, optional): Linear-elastic torsional stiffness assigned to the section. Defaults to 0.0, assume no torsional stiffness.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValued needs to be positive.
NegativeValuebf_t needs to be positive.
NegativeValuebf_b needs to be positive.
NegativeValuetf_t needs to be positive.
NegativeValuetf_b needs to be positive.
NegativeValuetw needs to be positive.
NegativeValuetop_flange_mat_ID needs to be a positive integer.
NegativeValuebottom_flange_mat_ID needs to be a positive integer.
NegativeValueweb_mat_ID needs to be a positive integer.
WrongDimensiondiscr_top_flange has a length of 2.
WrongDimensiondiscr_bottom_flange has a length of 2.
WrongDimensiondiscr_web has a length of 2.
NegativeValueGJ needs to be positive.
InconsistentGeometryThe sum of the flanges thickness can't be bigger than d.

Reimplemented in FibersIShapeSteelIShape.

Definition at line 472 of file Fibers.py.

473 discr_top_flange: list, discr_bottom_flange: list, discr_web: list, GJ = 0.0):
474 """
475 Constructor of the class.
476
477 @param ID (int): Unique fiber section ID.
478 @param d (float): Depth of the section.
479 @param bf_t (float): Top flange's width of the section
480 @param bf_b (float): Bottom flange's width of the section
481 @param tf_t (float): Top flange's thickness of the section
482 @param tf_b (float): Bottom flange's thickness of the section
483 @param tw (float): Web's thickness of the section
484 @param top_flange_mat_ID (int): ID of material model that will be assigned to the top flange fibers.
485 @param bottom_flange_mat_ID (int): ID of material model that will be assigned to the bottom flange fibers.
486 @param web_mat_ID (int): ID of material model that will be assigned to the web fibers.
487 @param discr_top_flange (list): List with two entries: discretisation in IJ (x/z) and JK (y) for the top flange.
488 @param discr_bottom_flange (list): List with two entries: discretisation in IJ (x/z) and JK (y) for the bottom flange.
489 @param discr_web (list): List with two entries: discretisation in IJ (x/z) and JK (y) for the web.
490 @param GJ (float, optional): Linear-elastic torsional stiffness assigned to the section. Defaults to 0.0, assume no torsional stiffness.
491
492 @exception NegativeValue: ID needs to be a positive integer.
493 @exception NegativeValue: d needs to be positive.
494 @exception NegativeValue: bf_t needs to be positive.
495 @exception NegativeValue: bf_b needs to be positive.
496 @exception NegativeValue: tf_t needs to be positive.
497 @exception NegativeValue: tf_b needs to be positive.
498 @exception NegativeValue: tw needs to be positive.
499 @exception NegativeValue: top_flange_mat_ID needs to be a positive integer.
500 @exception NegativeValue: bottom_flange_mat_ID needs to be a positive integer.
501 @exception NegativeValue: web_mat_ID needs to be a positive integer.
502 @exception WrongDimension: discr_top_flange has a length of 2.
503 @exception WrongDimension: discr_bottom_flange has a length of 2.
504 @exception WrongDimension: discr_web has a length of 2.
505 @exception NegativeValue: GJ needs to be positive.
506 @exception InconsistentGeometry: The sum of the flanges thickness can't be bigger than d.
507 """
508 # Check
509 if ID < 1: raise NegativeValue()
510 if d < 0: raise NegativeValue()
511 if bf_t < 0: raise NegativeValue()
512 if bf_b < 0: raise NegativeValue()
513 if tf_b < 0: raise NegativeValue()
514 if tf_t < 0: raise NegativeValue()
515 if tw < 0: raise NegativeValue()
516 if top_flange_mat_ID < 1: raise NegativeValue()
517 if bottom_flange_mat_ID < 1: raise NegativeValue()
518 if web_mat_ID < 1: raise NegativeValue()
519 if len(discr_top_flange) != 2: raise WrongDimension()
520 if len(discr_bottom_flange) != 2: raise WrongDimension()
521 if len(discr_web) != 2: raise WrongDimension()
522 if GJ < 0: raise NegativeValue()
523 if tf_t+tf_b >= d: raise InconsistentGeometry()
524
525 # Arguments
526 self.ID = ID
527 self.d = d
528 self.bf_t = bf_t
529 self.bf_b = bf_b
530 self.tf_t = tf_t
531 self.tf_b = tf_b
532 self.tw = tw
533 self.top_flange_mat_ID = top_flange_mat_ID
534 self.bottom_flange_mat_ID = bottom_flange_mat_ID
535 self.web_mat_ID = web_mat_ID
536 self.discr_top_flange = copy(discr_top_flange)
537 self.discr_bottom_flange = copy(discr_bottom_flange)
538 self.discr_web = copy(discr_web)
539 self.GJ = GJ
540
541 # Initialized the parameters that are dependent from others
542 self.section_name_tag = "None"
543 self.Initialized = False
544 self.ReInit()
545

Member Function Documentation

◆ CreateFibers()

def CreateFibers (   self)

Method that initialise the fiber by calling the OpenSeesPy commands.

Definition at line 631 of file Fibers.py.

631 def CreateFibers(self):
632 """
633 Method that initialise the fiber by calling the OpenSeesPy commands.
634 """
635 create_fiber_section(self.fib_sec)
636 self.Initialized = True
637 self.UpdateStoredData()
638
639
def create_fiber_section(fiber_info)
Initialise fiber cross-section with OpenSeesPy commands.
Definition: Fibers.py:857

◆ ReInit()

def ReInit (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 546 of file Fibers.py.

546 def ReInit(self):
547 """
548 Implementation of the homonym abstract method.
549 See parent class DataManagement for detailed information.
550 """
551 # Memebers
552 if self.section_name_tag != "None": self.section_name_tag = self.section_name_tag + " (modified)"
553
554 # Parameters
555 z1 = self.tw/2
556 y1 = (self.d - self.tf_t - self.tf_b)/2
557
558 # Create the flange top
559 flange_top = [y1, -self.bf_t/2, y1+self.tf_t, self.bf_t/2]
560 flange_top_cmd = ['patch', 'rect', self.top_flange_mat_ID, *self.discr_top_flange, *flange_top]
561
562 # Create the flange bottom
563 flange_bottom = [-y1-self.tf_b, -self.bf_b/2, -y1, self.bf_b/2]
564 flange_bottom_cmd = ['patch', 'rect', self.bottom_flange_mat_ID, *self.discr_bottom_flange, *flange_bottom]
565
566 # Create the web
567 web = [-y1, -z1, y1, z1]
568 web_cmd = ['patch', 'rect', self.web_mat_ID, *self.discr_web, *web]
569
570 self.fib_sec = [['section', 'Fiber', self.ID, '-GJ', self.GJ],
571 flange_top_cmd, web_cmd, flange_bottom_cmd]
572
573 # Data storage for loading/saving
574 self.UpdateStoredData()
575
576
Module with the parent abstract class DataManagement.

◆ ShowInfo()

def ShowInfo (   self,
  plot = False,
  block = False 
)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Parameters
plot(bool, optional): Option to show the plot of the fiber. Defaults to False.
block(bool, optional): Option to wait the user command 'plt.show()' (avoiding the stop of the program everytime that a plot should pop up). Defaults to False.

Definition at line 602 of file Fibers.py.

602 def ShowInfo(self, plot = False, block = False):
603 """
604 Implementation of the homonym abstract method.
605 See parent class DataManagement for detailed information.
606
607 @param plot (bool, optional): Option to show the plot of the fiber. Defaults to False.
608 @param block (bool, optional): Option to wait the user command 'plt.show()' (avoiding the stop of the program everytime that a plot should pop up). Defaults to False.
609 """
610 print("")
611 print("Requested info for FibersRect, ID = {}".format(self.ID))
612 print("Section associated: {} ".format(self.section_name_tag))
613 print("Depth d = {} mm and web thickness tw = {} mm".format(self.d/mm_unit, self.tw/mm_unit))
614 print("Top flange width bf_t = {} mm and thickness tf_t = {} mm".format(self.bf_t/mm_unit, self.tf_t/mm_unit))
615 print("Bottom flange width bf_b = {} mm and thickness tf_b = {} mm".format(self.bf_b/mm_unit, self.tf_b/mm_unit))
616 print("Web material model ID = {}".format(self.web_mat_ID))
617 print("Top flange material model ID = {}".format(self.top_flange_mat_ID))
618 print("Bottom flange material model ID = {}".format(self.bottom_flange_mat_ID))
619 print("Discretisation in the web [IJ or x/z dir, JK or y dir] = {}".format(self.discr_web))
620 print("Discretisation in the top flange [IJ or x/z dir, JK or y dir] = {}".format(self.discr_top_flange))
621 print("Discretisation in the bottom flange [IJ or x/z dir, JK or y dir] = {}".format(self.discr_bottom_flange))
622 print("")
623
624 if plot:
625 plot_fiber_section(self.fib_sec, matcolor=['r', 'b', 'g', 'k'])
626
627 if block:
628 plt.show()
629
630
def plot_fiber_section(fiber_info, fill_shapes=True, matcolor=['#808080', '#D3D3D3', 'r', 'b', 'g', 'y'])
Plot fiber cross-section.
Definition: Fibers.py:673

◆ UpdateStoredData()

def UpdateStoredData (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 578 of file Fibers.py.

578 def UpdateStoredData(self):
579 """
580 Implementation of the homonym abstract method.
581 See parent class DataManagement for detailed information.
582 """
583 self.data = [["INFO_TYPE", "FibersIShape"], # Tag for differentiating different data
584 ["ID", self.ID],
585 ["section_name_tag", self.section_name_tag],
586 ["d", self.d],
587 ["bf_t", self.bf_t],
588 ["bf_b", self.bf_b],
589 ["tf_t", self.tf_t],
590 ["tf_b", self.tf_b],
591 ["tw", self.tw],
592 ["GJ", self.GJ],
593 ["top_flange_mat_ID", self.top_flange_mat_ID],
594 ["bottom_flange_mat_ID", self.bottom_flange_mat_ID],
595 ["web_mat_ID", self.web_mat_ID],
596 ["discr_top_flange", self.discr_top_flange],
597 ["discr_bottom_flange", self.discr_bottom_flange],
598 ["discr_web", self.discr_web],
599 ["Initialized", self.Initialized]]
600
601

Member Data Documentation

◆ bf_b

bf_b

Definition at line 529 of file Fibers.py.

◆ bf_t

bf_t

Definition at line 528 of file Fibers.py.

◆ bottom_flange_mat_ID

bottom_flange_mat_ID

Definition at line 534 of file Fibers.py.

◆ d

d

Definition at line 527 of file Fibers.py.

◆ data

data

Definition at line 583 of file Fibers.py.

◆ discr_bottom_flange

discr_bottom_flange

Definition at line 537 of file Fibers.py.

◆ discr_top_flange

discr_top_flange

Definition at line 536 of file Fibers.py.

◆ discr_web

discr_web

Definition at line 538 of file Fibers.py.

◆ fib_sec

fib_sec

Definition at line 570 of file Fibers.py.

◆ GJ

GJ

Definition at line 539 of file Fibers.py.

◆ ID

ID

Definition at line 526 of file Fibers.py.

◆ Initialized

Initialized

Definition at line 543 of file Fibers.py.

◆ section_name_tag

section_name_tag

Definition at line 542 of file Fibers.py.

◆ tf_b

tf_b

Definition at line 531 of file Fibers.py.

◆ tf_t

tf_t

Definition at line 530 of file Fibers.py.

◆ top_flange_mat_ID

top_flange_mat_ID

Definition at line 533 of file Fibers.py.

◆ tw

tw

Definition at line 532 of file Fibers.py.

◆ web_mat_ID

web_mat_ID

Definition at line 535 of file Fibers.py.


The documentation for this class was generated from the following file: