2Module for the member model.
7import matplotlib.pyplot
as plt
11from abc
import abstractmethod
12from copy
import copy, deepcopy
24 Parent abstract class for the storage and manipulation of a member
's information (mechanical and geometrical parameters, etc) and the initialisation in the model.
26 @param DataManagement: Parent abstract
class.
29 def Record(self, ele_ID, name_txt: str, data_dir: str, force_rec =
True, def_rec =
True, time_rec =
True):
31 Abstract method that records the forces, deformation and time of the member associated
with the
class.
33 @param ele_ID (int): The ID of the element that will be recorded.
34 @param name_txt (str): Name of the recorded data (no .txt).
35 @param data_dir (str): Directory
for the storage of data.
36 @param force_rec (bool, optional): Option to record the forces (Fx, Fy, Mz). Defaults to
True.
37 @param def_rec (bool, optional): Option to record the deformation (theta)
for ZeroLength element. Defaults to
True.
38 @param time_rec (bool, optional): Option to record time. Defaults to
True.
41 if not os.path.exists(data_dir):
42 print(
"Folder {} not found in this directory; creating one".format(data_dir))
47 recorder(
"Element",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-time",
"-ele", ele_ID,
"force")
49 recorder(
"Element",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-time",
"-ele", ele_ID,
"deformation")
52 recorder(
"Element",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-ele", ele_ID,
"force")
54 recorder(
"Element",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-ele", ele_ID,
"deformation")
56 print(
"The element is not initialized (node and/or elements not created), ID = {}".format(ele_ID))
59 def RecordNodeDef(self, iNode_ID: int, jNode_ID: int, name_txt: str, data_dir: str, time_rec =
True):
61 Abstract method that records the deformation and time of the member
's nodes associated with the class.
63 @param iNode_ID (int): ID of the node i.
64 @param jNode_ID (int): ID of the node j.
65 @param name_txt (str): Name of the recorded data (no .txt).
66 @param data_dir (str): Directory
for the storage of data.
67 @param time_rec (bool, optional): Option to record time. Defaults to
True.
70 if not os.path.exists(data_dir):
71 print(
"Folder {} not found in this directory; creating one".format(data_dir))
75 recorder(
"Node",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-time",
"-node", iNode_ID, jNode_ID,
"-dof", 1, 2, 3,
"disp")
77 recorder(
"Node",
"-file",
'{}/{}.txt'.format(data_dir, name_txt),
"-node", iNode_ID, jNode_ID,
"-dof", 1, 2, 3,
"disp")
79 print(
"The element is not initialized (node and/or elements not created), iNode ID = {}, jNode ID = {}".format(iNode_ID, jNode_ID))
84 Private abstract method to check if the length of the line member
is the same (
with 1 cm of tolerance)
with the length defined
in the section used.
86 iNode = np.array(nodeCoord(self.iNode_ID))
87 jNode = np.array(nodeCoord(self.jNode_ID))
88 L = np.linalg.norm(iNode-jNode)
89 if abs(L-self.section.L) > 1*cm_unit:
90 print(
"!!!!!!! WARNING !!!!!!! The length declared in the section name '{}' (L={} m) is different from thelength of the element associated (ID={}, L ={}m)".format(
91 self.section.name_tag, L/m_unit, self.element_ID, self.section.L/m_unit))
96 Class that handles the storage and manipulation of a panel zone's information (mechanical and geometrical parameters, etc) and the initialisation in the model.
98 @param MemberModel: Parent abstract
class.
100 def __init__(self, master_node_ID: int, mid_panel_zone_width, mid_panel_zone_height, E, A_rigid, I_rigid, geo_transf_ID: int, mat_ID: int, pin_corners =
True):
102 Constructor of the class.
104 @param master_node_ID (int): ID of the master node (central top node that should be a grid node).
105 @param mid_panel_zone_width (float): Mid panel zone width.
106 @param mid_panel_zone_height (float): Mid panel zone height.
107 @param E (float): Young modulus.
108 @param A_rigid (float): A very rigid area.
109 @param I_rigid (float): A very rigid moment of inertia.
110 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
111 @param mat_ID (int): ID of the material model
for the panel zone spring.
112 @param pin_corners (bool, optional): Option to pin the corners (xy03/xy04, xy06/xy07, xy09/xy10)
or not. Used
for RCS models. Defaults to
True.
114 @exception NegativeValue: ID needs to be a positive integer.
115 @exception NegativeValue: mid_panel_zone_width needs to be positive.
116 @exception NegativeValue: mid_panel_zone_height needs to be positive.
117 @exception NegativeValue: E needs to be positive.
118 @exception NegativeValue: A_rigid needs to be positive.
119 @exception NegativeValue: I_rigid needs to be positive.
120 @exception NegativeValue: geo_tranf_ID needs to be a positive integer.
121 @exception NegativeValue: mat_ID needs to be a positive integer.
124 if master_node_ID < 1:
raise NegativeValue()
126 if mid_panel_zone_width < 0:
raise NegativeValue()
127 if mid_panel_zone_height < 0:
raise NegativeValue()
128 if E < 0:
raise NegativeValue()
129 if A_rigid < 0:
raise NegativeValue()
130 if I_rigid < 0:
raise NegativeValue()
131 if geo_transf_ID > 1:
raise NegativeValue()
132 if mat_ID < 0:
raise NegativeValue()
154 Implementation of the homonym abstract method.
171 Implementation of the homonym abstract method.
174 self.datadata = [["INFO_TYPE",
"PanelZone"],
178 [
"mat_ID", self.
mat_IDmat_ID],
183 [
"A_rigid", self.
A_rigidA_rigid],
184 [
"I_rigid", self.
I_rigidI_rigid],
191 Implementation of the homonym abstract method.
194 @param plot (bool, optional): Option to show the plot of the material model. Defaults to
False.
195 @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.
198 print(
"Requested info for Panel Zone member model, master node ID = {}".format(self.
master_node_IDmaster_node_ID))
201 print(
"Material model of the panel zone ID = {}".format(self.
mat_IDmat_ID))
202 print(
"Spring ID = {} (if -1, not defined yet)".format(self.
spring_IDspring_ID))
203 print(
"Mid panel zone width = {} mm".format(self.
mid_panel_zone_widthmid_panel_zone_width/mm_unit))
204 print(
"Mid panel zone height = {} mm".format(self.
mid_panel_zone_heightmid_panel_zone_height/mm_unit))
205 print(
"Young modulus E = {} GPa".format(self.
EE/GPa_unit))
206 print(
"Area of the elements (rigid) = {} mm2".format(self.
A_rigidA_rigid/mm2_unit))
207 print(
"Moment of inetia of the elements (strong axis, rigid) = {} mm4".format(self.
I_rigidI_rigid/mm4_unit))
208 print(
"Geometric transformation = {}".format(self.
geo_transf_IDgeo_transf_ID))
217 print(
"The panel zone is not initialized (node and elements not created) for master node ID = {}".format(self.
master_node_IDmaster_node_ID))
222 Method that initialises the member by calling the OpenSeesPy commands through various functions.
256 def Record(self, name_txt: str, data_dir: str, force_rec=
True, def_rec=
True, time_rec=
True):
258 Implementation of the homonym abstract method.
259 See parent class MemberModel for detailed information.
261 super().Record(self.spring_IDspring_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
266 Implementation of the homonym abstract method.
267 See parent class MemberModel for detailed information.
274 (placeholder). No applicable for the panel zone.
276 print("No length check for panel zone")
281 Class that is the children of PanelZone
and combine the
class SteelIShape (section) to retrieve the information needed.
283 @param PanelZone: Parent
class.
285 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, mat_ID: int, rigid = RIGID):
287 Constructor of the class.
289 @param master_node_ID (int): ID of the master node (central top node that should be a grid node).
290 @param col (SteelIShape): SteelIShape column section object.
291 @param beam (SteelIShape): SteelIShape beam section object.
292 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
293 @param mat_ID (int): ID of the material model
for the panel zone spring.
294 @param rigid (float, optional): Parameter
with a value enough big to assure rigidity of one element
295 but enough small to avoid convergence problem. Defaults to RIGID.
297 self.colcol = deepcopy(col)
299 super().__init__(master_node_ID, col.d/2.0, beam.d/2.0, col.E, max(col.A, beam.A)*rigid, max(col.Iy, beam.Iy)*rigid, geo_transf_ID, mat_ID)
308 WIP: Class that is the children of PanelZone
and it
's used for the panel zone in a RCS (RC column continous, Steel beam).
309 Note that the corners are not pinned (do it manually).
311 @param PanelZone: Parent
class.
313 def __init__(self, master_node_ID: int, col: RCRectShape, beam: SteelIShape, geo_transf_ID: int, mat_ID: int, rigid = RIGID):
315 Constructor of the class.
317 @param master_node_ID (int): ID of the master node (central top node that should be a grid node).
318 @param col (RCRectShape): RCRectShape column section object.
319 @param beam (SteelIShape): SteelIShape beam section object.
320 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
321 @param mat_ID (int): ID of the material model
for the panel zone spring.
322 @param rigid (float, optional): Parameter
with a value enough big to assure rigidity of one element
323 but enough small to avoid convergence problem. Defaults to RIGID.
325 self.colcol = deepcopy(col)
327 super().__init__(master_node_ID, col.d/2.0, beam.d/2.0, beam.E, max(col.A, beam.A)*rigid, max(col.Iy, beam.Iy)*rigid, geo_transf_ID, mat_ID, False)
336 Class that is the children of PanelZoneSteelIShape
and automatically create the spring material model Gupta 1999 (ID = master_node_ID).
338 @param PanelZoneSteelIShape: Parent
class.
340 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, t_dp = 0, rigid=RIGID):
342 Constructor of the class.
344 @param master_node_ID (int): ID of the master node (central top node that should be a grid node).
345 @param col (SteelIShape): SteelIShape column section object.
346 @param beam (SteelIShape): SteelIShape beam section object.
347 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
348 @param t_dp (float, optional): Doubler plate thickness. Defaults to 0.
349 @param rigid (float, optional): Parameter
with a value enough big to assure rigidity of one element
350 but enough small to avoid convergence problem. Defaults to RIGID.
354 mat_ID = master_node_ID
355 pz_spring = Gupta1999SteelIShape(mat_ID, col, beam, t_dp)
356 pz_spring.Hysteretic()
358 super().__init__(master_node_ID, col, beam, geo_transf_ID, mat_ID, rigid)
363 Class that is the children of PanelZoneSteelIShape
and automatically create the spring material model Skiadopoulos 2021 (ID = master_node_ID).
365 @param PanelZoneSteelIShape: Parent
class.
367 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, t_dp = 0, rigid=RIGID):
369 Constructor of the class.
371 @param master_node_ID (int): ID of the master node (central top node that should be a grid node).
372 @param col (SteelIShape): SteelIShape column section object.
373 @param beam (SteelIShape): SteelIShape beam section object.
374 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
375 @param t_dp (float, optional): Doubler plate thickness. Defaults to 0.
376 @param rigid (float, optional): Parameter
with a value enough big to assure rigidity of one element
377 but enough small to avoid convergence problem. Defaults to RIGID.
381 mat_ID = master_node_ID
382 pz_spring = Skiadopoulos2021SteelIShape(mat_ID, col, beam, t_dp)
383 pz_spring.Hysteretic()
385 super().__init__(master_node_ID, col, beam, geo_transf_ID, mat_ID, rigid)
390 Function that defines the remaining 10 nodes of a panel zone given the dimensions and the master node (top center one).
391 ID convention
for the panel zone: \n
392 PZNodeID: 12 nodes: top right 1xy (master), 1xy1 top right, 1xy09,1xy10 1xy 1xy1,1xy01 \n
393 clockwise 10 nodes xy01-xy10 (
with double node at corners) o-----------o-----------o \n
394 Spring at node 1xy1 | | \n
395 PZElemeneID: 8 elements: starting at node 1xy, clockwise | | \n
396 (see function DefinePanelZoneElements
for more info) | | \n
403 o-----------o-----------o \n
404 1xy06,1xy07 1xy05 1xy03,1xy04 \n
405 Note that the top right node
is defined differently because
is where the spring
is.
407 @param MasterNodeID (int): ID of the master node (central top node that should be a grid node).
408 @param MidPanelZoneWidth (float): Mid panel zone width.
409 @param MidPanelZoneHeight (float): Mid panel zone height.
413 m_node = np.array(nodeCoord(MasterNodeID))
415 FloorCL = m_node[1] - MidPanelZoneHeight
418 node(
IDConvention(MasterNodeID, 1), AxisCL+MidPanelZoneWidth, FloorCL+MidPanelZoneHeight)
420 node(
IDConvention(MasterNodeID, 1, 1), AxisCL+MidPanelZoneWidth, FloorCL+MidPanelZoneHeight)
421 node(
IDConvention(MasterNodeID, 2, 1), AxisCL+MidPanelZoneWidth, FloorCL)
422 node(
IDConvention(MasterNodeID, 3, 1), AxisCL+MidPanelZoneWidth, FloorCL-MidPanelZoneHeight)
423 node(
IDConvention(MasterNodeID, 4, 1), AxisCL+MidPanelZoneWidth, FloorCL-MidPanelZoneHeight)
424 node(
IDConvention(MasterNodeID, 5, 1), AxisCL, FloorCL-MidPanelZoneHeight)
425 node(
IDConvention(MasterNodeID, 6, 1), AxisCL-MidPanelZoneWidth, FloorCL-MidPanelZoneHeight)
426 node(
IDConvention(MasterNodeID, 7, 1), AxisCL-MidPanelZoneWidth, FloorCL-MidPanelZoneHeight)
427 node(
IDConvention(MasterNodeID, 8, 1), AxisCL-MidPanelZoneWidth, FloorCL)
428 node(
IDConvention(MasterNodeID, 9, 1), AxisCL-MidPanelZoneWidth, FloorCL+MidPanelZoneHeight)
429 node(
IDConvention(MasterNodeID, 10), AxisCL-MidPanelZoneWidth, FloorCL+MidPanelZoneHeight)
434 Function that defines the 8 panel zone elements. For the ID convention, see DefinePanelZoneNodes.
436 @param MasterNodeID (int): ID of the master node (central top node that should be a grid node).
437 @param E (float): Young modulus.
438 @param RigidA (float): A very rigid area.
439 @param RigidI (float): A very rigid moment of inertia.
440 @param TransfID (int): The geometric transformation (
for more information, see OpenSeesPy documentation).
442 @returns list: List of lists, wth each list containing the ID of the element, of node i
and node j.
474 element(
"elasticBeamColumn", ele1, xy, xy1, RigidA, E, RigidI, TransfID)
475 element(
"elasticBeamColumn", ele2, xy01, xy02, RigidA, E, RigidI, TransfID)
476 element(
"elasticBeamColumn", ele3, xy02, xy03, RigidA, E, RigidI, TransfID)
477 element(
"elasticBeamColumn", ele4, xy04, xy05, RigidA, E, RigidI, TransfID)
478 element(
"elasticBeamColumn", ele5, xy05, xy06, RigidA, E, RigidI, TransfID)
479 element(
"elasticBeamColumn", ele6, xy07, xy08, RigidA, E, RigidI, TransfID)
480 element(
"elasticBeamColumn", ele7, xy08, xy09, RigidA, E, RigidI, TransfID)
481 element(
"elasticBeamColumn", ele8, xy10, xy, RigidA, E, RigidI, TransfID)
484 element_array = [[ele1, xy, xy1],
498 Class that handles the storage and manipulation of a elastic element's information (mechanical and geometrical parameters, etc) and the initialisation in the model.
500 @param MemberModel: Parent abstract
class.
502 def __init__(self, iNode_ID: int, jNode_ID: int, A, E, Iy, geo_transf_ID: int, ele_ID = -1):
504 Constructor of the class.
506 @param iNode_ID (int): ID of the first end node.
507 @param jNode_ID (int): ID of the second end node.
508 @param A (float): Area of the member.
509 @param E (float): Young modulus.
510 @param Iy (float): Second moment of inertia (strong axis).
511 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
512 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
514 @exception NegativeValue: ID needs to be a positive integer.
515 @exception NegativeValue: ID needs to be a positive integer.
516 @exception NegativeValue: A needs to be positive.
517 @exception NegativeValue: E needs to be positive.
518 @exception NegativeValue: Iy needs to be positive.
519 @exception NegativeValue: ID needs to be a positive integer.
520 @exception NegativeValue: ID needs to be a positive integer.
523 if iNode_ID < 1:
raise NegativeValue()
524 if jNode_ID < 1:
raise NegativeValue()
525 if A < 0:
raise NegativeValue()
526 if E < 0:
raise NegativeValue()
527 if Iy < 0:
raise NegativeValue()
528 if geo_transf_ID < 1:
raise NegativeValue()
529 if ele_ID != -1
and ele_ID < 1:
raise NegativeValue()
542 self.
ReInitReInit(ele_ID = -1)
546 Implementation of the homonym abstract method.
549 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
564 Implementation of the homonym abstract method.
567 self.datadata = [["INFO_TYPE",
"ElasticElement"],
573 [
"iNode_ID", self.
iNode_IDiNode_ID],
574 [
"jNode_ID", self.
jNode_IDjNode_ID],
581 Implementation of the homonym abstract method.
584 @param plot (bool, optional): Option to show the plot of the material model. Defaults to
False.
585 @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.
588 print(
"Requested info for ElasticElement member model, ID = {}".format(self.
element_IDelement_ID))
589 print(
"Section associated {} ".format(self.
section_name_tagsection_name_tag))
590 print(
"Area A = {} mm2".format(self.
AA/mm2_unit))
591 print(
"Young modulus E = {} GPa".format(self.
EE/GPa_unit))
592 print(
"Moment of inertia Iy = {} mm4".format(self.
IyIy/mm4_unit))
593 print(
"Geometric transformation = {}".format(self.
geo_transf_IDgeo_transf_ID))
602 print(
"The ElasticElement is not initialized (node and elements not created), ID = {}".format(self.
element_IDelement_ID))
607 Method that initialises the member by calling the OpenSeesPy commands through various functions.
619 def Record(self, name_txt: str, data_dir: str, force_rec=
True, def_rec=
True, time_rec=
True):
621 Implementation of the homonym abstract method.
622 See parent class MemberModel for detailed information.
624 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
629 Implementation of the homonym abstract method.
630 See parent class MemberModel for detailed information.
637 Class that is the children of ElasticElement
and combine the
class SteelIShape (
section) to retrieve the information needed.
639 @param ElasticElement: Parent
class.
641 def __init__(self, iNode_ID: int, jNode_ID: int, section: SteelIShape, geo_transf_ID: int, ele_ID = -1):
643 Constructor of the class.
645 @param iNode_ID (int): ID of the first end node.
646 @param jNode_ID (int): ID of the second end node.
647 @param section (SteelIShape): SteelIShape section object.
648 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
649 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
652 super().__init__(iNode_ID, jNode_ID, section.A, section.E, section.Iy, geo_transf_ID, ele_ID)
661 Class that handles the storage and manipulation of a spring-based element's information (mechanical and geometrical parameters, etc) and the initialisation in the model.
663 @param MemberModel: Parent abstract
class.
665 def __init__(self, iNode_ID: int, jNode_ID: int, A, E, Iy_mod, geo_transf_ID: int, mat_ID_i = -1, mat_ID_j = -1, ele_ID = -1):
667 Constructor of the class.
669 @param iNode_ID (int): ID of the first end node.
670 @param jNode_ID (int): ID of the second end node.
671 @param A (float): Area of the member.
672 @param E (float): Young modulus.
673 @param Iy_mod (float): Second moment of inertia (strong axis).
674 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
675 @param mat_ID_i (int, optional): ID of the material model
for the spring
in the node i (
if present). Defaults to -1.
676 @param mat_ID_j (int, optional): ID of the material model
for the spring
in the node j (
if present). Defaults to -1.
677 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
679 @exception NegativeValue: ID needs to be a positive integer.
680 @exception NegativeValue: ID needs to be a positive integer.
681 @exception NegativeValue: A needs to be positive.
682 @exception NegativeValue: E needs to be positive.
683 @exception NegativeValue: Iy_mod needs to be positive.
684 @exception NegativeValue: ID needs to be a positive integer.
685 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
686 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
687 @exception NameError: at least one spring needs to be defined.
688 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
691 if iNode_ID < 1:
raise NegativeValue()
692 if jNode_ID < 1:
raise NegativeValue()
693 if A < 0:
raise NegativeValue()
694 if E < 0:
raise NegativeValue()
695 if Iy_mod < 0:
raise NegativeValue()
696 if geo_transf_ID < 1:
raise NegativeValue()
697 if mat_ID_i != -1
and mat_ID_i < 0:
raise NegativeValue()
698 if mat_ID_j != -1
and mat_ID_j < 0:
raise NegativeValue()
699 if mat_ID_i == -1
and mat_ID_j == -1:
raise NameError(
"No springs defined for element ID = {}".format(
IDConvention(iNode_ID, jNode_ID)))
700 if ele_ID != -1
and ele_ID < 0:
raise NegativeValue()
720 Implementation of the homonym abstract method.
723 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
751 Implementation of the homonym abstract method.
754 self.datadata = [["INFO_TYPE",
"SpringBasedElement"],
759 [
"Iy_mod", self.
Iy_modIy_mod],
760 [
"iNode_ID", self.
iNode_IDiNode_ID],
762 [
"mat_ID_i", self.
mat_ID_imat_ID_i],
763 [
"jNode_ID", self.
jNode_IDjNode_ID],
765 [
"mat_ID_j", self.
mat_ID_jmat_ID_j],
773 Implementation of the homonym abstract method.
776 @param plot (bool, optional): Option to show the plot of the material model. Defaults to
False.
777 @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.
780 print(
"Requested info for SpringBasedElement member model, ID = {}".format(self.
element_IDelement_ID))
781 print(
"Section associated {} ".format(self.
section_name_tagsection_name_tag))
782 print(
"Material model of the spring i, ID = {}".format(self.
mat_ID_imat_ID_i))
783 print(
"Material model of the spring j, ID = {}".format(self.
mat_ID_jmat_ID_j))
784 print(
"Area A = {} mm2".format(self.
AA/mm2_unit))
785 print(
"Young modulus E = {} GPa".format(self.
EE/GPa_unit))
786 print(
"n modified moment of inertia Iy_mod = {} mm4".format(self.
Iy_modIy_mod/mm4_unit))
787 print(
"Geometric transformation = {}".format(self.
geo_transf_IDgeo_transf_ID))
796 print(
"The SpringBasedElement is not initialized (node and elements not created), ID = {}".format(self.
element_IDelement_ID))
801 Method that initialises the member by calling the OpenSeesPy commands through various functions.
825 def Record(self, spring_or_element: str, name_txt: str, data_dir: str, force_rec=
True, def_rec=
True, time_rec=
True):
827 Implementation of the homonym abstract method.
828 See parent class MemberModel for detailed information.
830 if spring_or_element ==
"element":
831 super().
Record(self.
element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
832 elif spring_or_element ==
"spring_i":
834 print(
"Spring i recorded not present in element ID = {}".format(self.
element_IDelement_ID))
836 super().
Record(self.
iSpring_IDiSpring_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
837 elif spring_or_element ==
"spring_j":
839 print(
"Spring j recorded not present in element ID = {}".format(self.
element_IDelement_ID))
841 super().
Record(self.
jSpring_IDjSpring_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
843 print(
"No recording option with: '{}' with element ID: {}".format(spring_or_element, self.
element_IDelement_ID))
848 Implementation of the homonym abstract method.
849 See parent class MemberModel for detailed information.
856 Class that is the children of SpringBasedElement
and combine the
class SteelIShape (
section) to retrieve the information needed.
857 L_b
is assumed the same
for top
and bottom springs.
859 @param SpringBasedElement: Parent
class.
861 def __init__(self, iNode_ID: int, jNode_ID: int, section: SteelIShape, geo_transf_ID: int, mat_ID_i=-1, mat_ID_j=-1, ele_ID = -1):
863 Constructor of the class.
865 @param iNode_ID (int): ID of the first end node.
866 @param jNode_ID (int): ID of the second end node.
867 @param section (SteelIShape): SteelIShape section object.
868 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
869 @param mat_ID_i (int, optional): ID of the material model
for the spring
in the node i (
if present). Defaults to -1.
870 @param mat_ID_j (int, optional): ID of the material model
for the spring
in the node j (
if present). Defaults to -1.
871 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
873 @exception NegativeValue: ID needs to be a positive integer.
874 @exception NegativeValue: ID needs to be a positive integer.
875 @exception NameError: at least one spring needs to be defined.
876 @exception NegativeValue: ID needs to be a positive integer.
879 if mat_ID_i != -1
and mat_ID_i < 0:
raise NegativeValue()
880 if mat_ID_j != -1
and mat_ID_j < 0:
raise NegativeValue()
881 if mat_ID_i == -1
and mat_ID_j == -1:
raise NameError(
"No springs defined for element ID = {}".format(
IDConvention(iNode_ID, jNode_ID)))
882 if ele_ID != -1
and ele_ID < 0:
raise NegativeValue()
884 super().
__init__(iNode_ID, jNode_ID, section.A, section.E, section.Iy_mod, geo_transf_ID, mat_ID_i=mat_ID_i, mat_ID_j=mat_ID_j, ele_ID=ele_ID)
893 Class that is the children of SpringBasedElement
and combine the
class SteelIShape (
section) to retrieve the information needed.
894 If there are two springs
and the inflection point
not in the middle, use two spring elements, connect them rigidly
in the inflection point
with one spring each
in the extremes.
895 L_b
is assumed the same
for top
and bottom springs.
897 @param SpringBasedElement: Parent
class.
899 def __init__(self, iNode_ID: int, jNode_ID: int, section: SteelIShape, geo_transf_ID: int, new_mat_ID_i=-1, new_mat_ID_j=-1,
900 N_G = 0, L_0 = -1, L_b = -1, ele_ID = -1):
902 Constructor of the class.
904 @param iNode_ID (int): ID of the first end node.
905 @param jNode_ID (int): ID of the second end node.
906 @param section (SteelIShape): SteelIShape section object.
907 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
908 @param new_mat_ID_i (int, optional): New ID
for the definition of the material model
for the spring
in the node i.
909 If -1
is passed, the
class generate no material model and no spring. If 0
is passed, no i spring. Defaults to -1.
910 @param new_mat_ID_j (int, optional): New ID
for the definition of the material model
for the spring
in the node j.
911 If -1
is passed, the
class generate no material model and no spring. If 0
is passed, no j spring. Defaults to -1.
912 @param N_G (float, optional): Axial load. Defaults to 0.
913 @param L_0 (float, optional): Distance
from the maximal moment to zero. Defaults to -1, e.g. computed
in __init__().
914 @param L_b (float, optional): Maximal unbraced lateral buckling length. Defaults to -1, e.g. computed
in __init__().
915 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
917 @exception NegativeValue: ID needs to be a positive integer.
918 @exception NegativeValue: ID needs to be a positive integer.
919 @exception NameError: at least one spring needs to be defined.
920 @exception NegativeValue: ID needs to be a positive integer.
921 @exception ZeroLength: The two nodes are superimposed.
924 if new_mat_ID_i != -1
and new_mat_ID_i < 0:
raise NegativeValue()
925 if new_mat_ID_j != -1
and new_mat_ID_j < 0:
raise NegativeValue()
926 if new_mat_ID_i == 0
and new_mat_ID_j == 0:
raise NameError(
"No springs imposed for element ID = {}. Use ElasticElement instead".format(
IDConvention(iNode_ID, jNode_ID)))
927 if ele_ID != -1
and ele_ID < 0:
raise NegativeValue()
930 if new_mat_ID_i != 0
and new_mat_ID_j != 0:
934 L_b = L_0
if L_b == -1
else L_b
938 if ele_orientation ==
"zero_length":
raise ZeroLength(
IDConvention(iNode_ID, jNode_ID))
939 if new_mat_ID_i != 0
and new_mat_ID_i == -1:
941 if new_mat_ID_j != 0
and new_mat_ID_j == -1:
944 if new_mat_ID_i != 0:
946 iSpring = ModifiedIMKSteelIShape(new_mat_ID_i, section, N_G, L_0 = L_0, L_b = L_b)
949 if new_mat_ID_j != 0:
951 jSpring = ModifiedIMKSteelIShape(new_mat_ID_j, section, N_G, L_0 = L_0, L_b = L_b)
954 new_mat_ID_i = -1
if new_mat_ID_i == 0
else new_mat_ID_i
955 new_mat_ID_j = -1
if new_mat_ID_j == 0
else new_mat_ID_j
957 super().
__init__(iNode_ID, jNode_ID, section.A, section.E, section.Iy_mod, geo_transf_ID, mat_ID_i=new_mat_ID_i, mat_ID_j=new_mat_ID_j, ele_ID=ele_ID)
966 Class that handles the storage and manipulation of a force-based element's information (mechanical and geometrical parameters, etc) and the initialisation in the model.
968 @param MemberModel: Parent abstract
class.
970 def __init__(self, iNode_ID: int, jNode_ID: int, fiber_ID: int, geo_transf_ID: int,
971 new_integration_ID = -1, Ip = 5, integration_type =
"Lobatto", max_iter = MAX_ITER_INTEGRATION, tol = TOL_INTEGRATION, ele_ID = -1):
973 Constructor of the class.
975 @param iNode_ID (int): ID of the first end node.
976 @param jNode_ID (int): ID of the second end node.
977 @param fiber_ID (int): ID of the fiber section.
978 @param geo_transf_ID (int): The geometric transformation (
for more information, see OpenSeesPy documentation).
979 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
980 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
981 @param integration_type (str, optional): Integration type. FOr more information, see OpenSeesPy documentation.
982 Defaults to
"Lobatto".
983 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
984 @param tol (float, optional): Tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
985 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
987 @exception NegativeValue: ID needs to be a positive integer.
988 @exception NegativeValue: ID needs to be a positive integer.
989 @exception NegativeValue: ID needs to be a positive integer.
990 @exception NegativeValue: ID needs to be a positive integer.
991 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
992 @exception NegativeValue: Ip needs to be a positive integer bigger than 3,
if different
from -1.
993 @exception NegativeValue: max_iter needs to be a positive integer.
994 @exception NegativeValue: tol needs to be positive.
995 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
998 if iNode_ID < 1:
raise NegativeValue()
999 if jNode_ID < 1:
raise NegativeValue()
1000 if fiber_ID < 1:
raise NegativeValue()
1001 if geo_transf_ID < 1:
raise NegativeValue()
1002 if new_integration_ID != -1
and new_integration_ID < 1:
raise NegativeValue()
1003 if Ip != -1
and Ip < 3:
raise NegativeValue()
1004 if max_iter < 0:
raise NegativeValue()
1005 if tol < 0:
raise NegativeValue()
1006 if ele_ID != -1
and ele_ID < 1:
raise NegativeValue()
1021 self.
ReInitReInit(new_integration_ID, ele_ID)
1024 def ReInit(self, new_integration_ID, ele_ID = -1):
1026 Implementation of the homonym abstract method.
1029 @param new_integration_ID (int): ID of the integration technique.
1030 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1048 Implementation of the homonym abstract method.
1051 self.datadata = [["INFO_TYPE",
"ForceBasedElement"],
1055 [
"iNode_ID", self.
iNode_IDiNode_ID],
1056 [
"jNode_ID", self.
jNode_IDjNode_ID],
1057 [
"fiber_ID", self.
fiber_IDfiber_ID],
1060 [
"tol", self.
toltol],
1061 [
"max_iter", self.
max_itermax_iter],
1068 Implementation of the homonym abstract method.
1071 @param plot (bool, optional): Option to show the plot of the material model. Defaults to
False.
1072 @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.
1075 print(
"Requested info for ForceBasedElement member model, ID = {}".format(self.
element_IDelement_ID))
1076 print(
"Fiber associated, ID = {} ".format(self.
fiber_IDfiber_ID))
1078 print(
"Section associated {} ".format(self.
section_name_tagsection_name_tag))
1079 print(
"Number of integration points along the element Ip = {}, max iter = {}, tol = {}".format(self.
IpIp, self.
max_itermax_iter, self.
toltol))
1080 print(
"Geometric transformation = {}".format(self.
geo_transf_IDgeo_transf_ID))
1089 print(
"The ForceBasedElement is not initialized (element not created), ID = {}".format(self.
element_IDelement_ID))
1094 Method that initialises the member by calling the OpenSeesPy commands through various functions.
1109 def Record(self, name_txt: str, data_dir: str, force_rec=
True, def_rec=
True, time_rec=
True):
1111 Implementation of the homonym abstract method.
1112 See parent class MemberModel for detailed information.
1114 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
1119 Implementation of the homonym abstract method.
1120 See parent class MemberModel for detailed information.
1127 Class that is the children of ForceBasedElement
and combine the
class FibersRectRCRectShape (fiber
section) to retrieve the information needed.
1129 @param ForceBasedElement: Parent
class.
1131 def __init__(self, iNode_ID: int, jNode_ID: int, fiber: FibersRectRCRectShape, geo_transf_ID: int,
1132 new_integration_ID=-1, Ip=5, integration_type=
"Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID = -1):
1134 Constructor of the class.
1136 @param iNode_ID (int): ID of the first end node.
1137 @param jNode_ID (int): ID of the second end node.
1138 @param fiber (FibersRectRCRectShape): FibersRectRCRectShape fiber section object.
1139 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1140 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1141 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1142 @param integration_type (str, optional): Integration type. FOr more information, see OpenSeesPy documentation.
1143 Defaults to
"Lobatto".
1144 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1145 @param tol (float, optional): Tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1146 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1149 super().__init__(iNode_ID, jNode_ID, fiber.ID, geo_transf_ID,
1150 new_integration_ID=new_integration_ID, Ip=Ip, integration_type=integration_type, max_iter=max_iter, tol=tol, ele_ID= ele_ID)
1159 Class that is the children of ForceBasedElement
and combine the
class FibersCircRCCircShape (fiber
section) to retrieve the information needed.
1161 @param ForceBasedElement: Parent
class.
1163 def __init__(self, iNode_ID: int, jNode_ID: int, fiber: FibersCircRCCircShape, geo_transf_ID: int,
1164 new_integration_ID=-1, Ip=5, integration_type=
"Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID = -1):
1166 Constructor of the class.
1168 @param iNode_ID (int): ID of the first end node.
1169 @param jNode_ID (int): ID of the second end node.
1170 @param fiber (FibersCircRCCircShape): FibersCircRCCircShape fiber section object.
1171 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1172 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1173 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1174 @param integration_type (str, optional): Integration type. FOr more information, see OpenSeesPy documentation.
1175 Defaults to
"Lobatto".
1176 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1177 @param tol (float, optional): Tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1178 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1181 super().__init__(iNode_ID, jNode_ID, fiber.ID, geo_transf_ID,
1182 new_integration_ID=new_integration_ID, Ip=Ip, integration_type=integration_type, max_iter=max_iter, tol=tol, ele_ID=ele_ID)
1191 Class that is the children of ForceBasedElement
and combine the
class FibersIShapeSteelIShape (fiber
section) to retrieve the information needed.
1193 @param ForceBasedElement: Parent
class.
1195 def __init__(self, iNode_ID: int, jNode_ID: int, fiber: FibersIShapeSteelIShape, geo_transf_ID: int,
1196 new_integration_ID=-1, Ip=5, integration_type=
"Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID = -1):
1198 Constructor of the class.
1200 @param iNode_ID (int): ID of the first end node.
1201 @param jNode_ID (int): ID of the second end node.
1202 @param fiber (FibersIShapeSteelIShape): FibersIShapeSteelIShape fiber section object.
1203 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1204 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1205 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1206 @param integration_type (str, optional): Integration type. FOr more information, see OpenSeesPy documentation.
1207 Defaults to
"Lobatto".
1208 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1209 @param tol (float, optional): Tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1210 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1213 super().__init__(iNode_ID, jNode_ID, fiber.ID, geo_transf_ID,
1214 new_integration_ID=new_integration_ID, Ip=Ip, integration_type=integration_type, max_iter=max_iter, tol=tol, ele_ID=ele_ID)
1223 Class that handles the storage and manipulation of a Gradient-Inelastic Flexibility-based element's information
1224 (mechanical and geometrical parameters, etc)
and the initialisation
in the model.
1225 The integration technique
is Simpson. For more information, see Sideris
and Salehi 2016, 2017
and 2020.
1227 @param MemberModel: Parent abstract
class.
1229 def __init__(self, iNode_ID: int, jNode_ID: int, fiber_ID: int, D_bars, fy, geo_transf_ID: int,
1230 lambda_i = -1, lambda_j = -1, Lp = -1, Ip = -1, new_integration_ID = -1,
1231 min_tol = TOL_INTEGRATION, max_tol = TOL_INTEGRATION*1e4, max_iter = MAX_ITER_INTEGRATION, ele_ID = -1):
1233 Constructor of the class.
1235 @param iNode_ID (int): ID of the first end node.
1236 @param jNode_ID (int): ID of the second end node.
1237 @param fiber_ID (int): ID of the fiber section.
1238 @param D_bars (float): Diameter of the vertical reinforcing bars.
1239 @param fy (float): Yield stress of the reinforcing bars.
1240 @param geo_transf_ID (int): The geometric transformation (
for more information, see OpenSeesPy documentation).
1241 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1242 Defaults to -1, e.g. plastic hinge
in the end i.
1243 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1244 Defaults to -1, e.g. plastic hinge
in the end j.
1245 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed
in ReInit().
1246 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1247 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1248 @param min_tol (float, optional): Minimal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1249 @param max_tol (float, optional): Maximal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
1250 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1251 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1253 @exception NegativeValue: ID needs to be a positive integer.
1254 @exception NegativeValue: ID needs to be a positive integer.
1255 @exception NegativeValue: ID needs to be a positive integer.
1256 @exception NegativeValue: D_bars needs to be positive.
1257 @exception NegativeValue: fy needs to be positive.
1258 @exception NegativeValue: ID needs to be a positive integer.
1259 @exception NegativeValue: lambda_i needs to be positive.
1260 @exception NegativeValue: lambda_j needs to be positive.
1261 @exception NegativeValue: No plastic length defined.
1262 @exception NegativeValue: Lp needs to be positive,
if different
from -1.
1263 @exception NegativeValue: Ip needs to be a positive integer bigger than 3,
if different
from -1.
1264 @exception NegativeValue: ID needs to be a positive integer.
1265 @exception NegativeValue: min_tol needs to be positive.
1266 @exception NegativeValue: max_tol needs to be positive.
1267 @exception NegativeValue: max_iter needs to be a positive integer.
1268 @exception NegativeValue: ID needs to be a positive integer,
if different
from -1.
1271 if iNode_ID < 1:
raise NegativeValue()
1272 if jNode_ID < 1:
raise NegativeValue()
1273 if fiber_ID < 1:
raise NegativeValue()
1274 if D_bars < 0:
raise NegativeValue()
1275 if fy < 0:
raise NegativeValue()
1276 if geo_transf_ID < 1:
raise NegativeValue()
1277 if lambda_i != -1
and lambda_i < 0:
raise NegativeValue()
1278 if lambda_j != -1
and lambda_j < 0:
raise NegativeValue()
1279 if lambda_i == 0
and lambda_j == 0: print(
"!!!!!!! WARNING !!!!!!! No plastic length defined for element ID = {}".format(
IDConvention(iNode_ID, jNode_ID)))
1280 if Lp != -1
and Lp < 0:
raise NegativeValue()
1281 if Ip != -1
and Ip < 3:
raise NegativeValue()
1282 if new_integration_ID != -1
and new_integration_ID < 1:
raise NegativeValue()
1283 if min_tol < 0:
raise NegativeValue()
1284 if max_tol < 0:
raise NegativeValue()
1285 if max_iter < 0:
raise NegativeValue()
1286 if ele_ID != -1
and ele_ID < 0:
raise NegativeValue()
1302 self.
ReInitReInit(lambda_i, lambda_j, Lp, Ip, new_integration_ID, ele_ID)
1304 def ReInit(self, lambda_i = -1, lambda_j = -1, Lp = -1, Ip = 5, new_integration_ID = -1, ele_ID = -1):
1306 Implementation of the homonym abstract method.
1309 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1310 Defaults to -1, e.g. plastic hinge
in the end i.
1311 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1312 Defaults to -1, e.g. plastic hinge
in the end j.
1313 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed here.
1314 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1315 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1316 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1319 iNode = np.array(nodeCoord(self.
iNode_IDiNode_ID))
1320 jNode = np.array(nodeCoord(self.
jNode_IDjNode_ID))
1321 self.
LL = np.linalg.norm(iNode-jNode)
1327 self.
lambda_ilambda_i = self.
LpLp/self.
LL
if lambda_i == -1
else lambda_i
1328 self.
lambda_jlambda_j = self.
LpLp/self.
LL
if lambda_j == -1
else lambda_j
1341 Implementation of the homonym abstract method.
1344 self.datadata = [["INFO_TYPE",
"GIFBElement"],
1348 [
"D_bars", self.
D_barsD_bars],
1352 [
"iNode_ID", self.
iNode_IDiNode_ID],
1353 [
"lambda_i", self.
lambda_ilambda_i],
1354 [
"jNode_ID", self.
jNode_IDjNode_ID],
1355 [
"lambda_j", self.
lambda_jlambda_j],
1356 [
"fiber_ID", self.
fiber_IDfiber_ID],
1358 [
"min_tol", self.
min_tolmin_tol],
1359 [
"max_tol", self.
max_tolmax_tol],
1360 [
"max_iter", self.
max_itermax_iter],
1367 Implementation of the homonym abstract method.
1370 @param plot (bool, optional): Option to show the plot of the material model. Defaults to
False.
1371 @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.
1374 print(
"Requested info for GIFBElement member model, ID = {}".format(self.
element_IDelement_ID))
1375 print(
"Fiber associated, ID = {} ".format(self.
fiber_IDfiber_ID))
1376 print(
"Integration type 'Simpson', ID = {}".format(self.
new_integration_IDnew_integration_ID))
1377 print(
"Section associated {} ".format(self.
section_name_tagsection_name_tag))
1378 print(
"Length L = {} m".format(self.
LL/m_unit))
1379 print(
"Diameter of the reinforcing bars D_bars = {} mm2".format(self.
D_barsD_bars/mm2_unit))
1380 print(
"Reinforcing bar steel strength fy = {} MPa".format(self.
fyfy/MPa_unit))
1381 print(
"Plastic length Lp = {} mm".format(self.
LpLp/mm_unit))
1382 print(
"Number of integration points along the element Ip = {}, max iter = {}, (min, max tol) = ({},{})".format(self.
IpIp, self.
max_itermax_iter, self.
min_tolmin_tol, self.
max_tolmax_tol))
1383 print(
"Lambda_i = {} and lambda_j = {}".format(self.
lambda_ilambda_i, self.
lambda_jlambda_j))
1384 print(
"Geometric transformation = {}".format(self.
geo_transf_IDgeo_transf_ID))
1393 print(
"The GIFBElement is not initialized (element not created), ID = {}".format(self.
element_IDelement_ID))
1398 Method that initialises the member by calling the OpenSeesPy commands through various functions.
1414 def Record(self, name_txt: str, data_dir: str, force_rec=
True, def_rec=
True, time_rec=
True):
1416 Implementation of the homonym abstract method.
1417 See parent class MemberModel for detailed information.
1419 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
1424 Implementation of the homonym abstract method.
1425 See parent class MemberModel for detailed information.
1432 Method that computes the plastic length using Paulay 1992.
1434 @returns double: Plastic length
1436 return (0.08*self.
LL/m_unit + 0.022*self.
D_barsD_bars/m_unit*self.
fyfy/MPa_unit)*m_unit
1441 Compute the number of integration points with equal distance along the element. For more information, see Salehi
and Sideris 2020.
1443 @returns int: Number of integration points
1445 tmp = math.ceil(1.5*self.LL/self.LpLp + 1)
1454 Class that is the children of GIFBElement
and combine the
class RCRectShape (
section) to retrieve the information needed.
1456 @param GIFBElement: Parent
class.
1458 def __init__(self, iNode_ID: int, jNode_ID: int, fiber_ID: int, section: RCRectShape, geo_transf_ID: int,
1459 lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1,
1460 min_tol = TOL_INTEGRATION, max_tol = TOL_INTEGRATION*1e4, max_iter = MAX_ITER_INTEGRATION, ele_ID = -1):
1462 Constructor of the class.
1464 @param iNode_ID (int): ID of the first end node.
1465 @param jNode_ID (int): ID of the second end node.
1466 @param fiber_ID (int): ID of the fiber section.
1467 @param section (RCRectShape): RCRectShape section object.
1468 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1469 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1470 Defaults to -1, e.g. plastic hinge
in the end i.
1471 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1472 Defaults to -1, e.g. plastic hinge
in the end j.
1473 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed
in ReInit().
1474 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1475 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1476 @param min_tol (float, optional): Minimal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1477 @param max_tol (float, optional): Maximal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
1478 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1479 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1482 super().__init__(iNode_ID, jNode_ID, fiber_ID, section.D_bars, section.fy, geo_transf_ID,
1483 lambda_i=lambda_i, lambda_j=lambda_j, Lp=Lp, Ip=Ip, new_integration_ID=new_integration_ID,
1484 min_tol=min_tol, max_tol=max_tol, max_iter=max_iter, ele_ID = ele_ID)
1493 Class that is the children of GIFBElement
and combine the
class FibersRectRCRectShape (fiber
section) to retrieve the information needed.
1495 @param GIFBElement: Parent
class.
1497 def __init__(self, iNode_ID: int, jNode_ID: int, fib: FibersRectRCRectShape, geo_transf_ID: int,
1498 lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1,
1499 min_tol = TOL_INTEGRATION, max_tol = TOL_INTEGRATION*1e4, max_iter = MAX_ITER_INTEGRATION, ele_ID = -1):
1501 Constructor of the class.
1503 @param iNode_ID (int): ID of the first end node.
1504 @param jNode_ID (int): ID of the second end node.
1505 @param fib (FibersRectRCRectShape): FibersRectRCRectShape fiber section object.
1506 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1507 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1508 Defaults to -1, e.g. plastic hinge
in the end i.
1509 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1510 Defaults to -1, e.g. plastic hinge
in the end j.
1511 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed
in ReInit().
1512 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1513 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1514 @param min_tol (float, optional): Minimal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1515 @param max_tol (float, optional): Maximal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
1516 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1517 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1520 super().__init__(iNode_ID, jNode_ID, fib.ID, self.sectionsection.D_bars, self.sectionsection.fy, geo_transf_ID,
1521 lambda_i=lambda_i, lambda_j=lambda_j, Lp=Lp, Ip=Ip, new_integration_ID=new_integration_ID,
1522 min_tol=min_tol, max_tol=max_tol, max_iter=max_iter, ele_ID = ele_ID)
1531 Class that is the children of GIFBElement
and combine the
class RCCircShape (
section) to retrieve the information needed.
1533 @param GIFBElement: Parent
class.
1535 def __init__(self, iNode_ID: int, jNode_ID: int, fiber_ID: int, section: RCCircShape, geo_transf_ID: int,
1536 lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1,
1537 min_tol = TOL_INTEGRATION, max_tol = TOL_INTEGRATION*1e4, max_iter = MAX_ITER_INTEGRATION, ele_ID = -1):
1539 Constructor of the class.
1541 @param iNode_ID (int): ID of the first end node.
1542 @param jNode_ID (int): ID of the second end node.
1543 @param fiber_ID (int): ID of the fiber section.
1544 @param section (RCCircShape): RCCircShape section object.
1545 @param geo_transf_ID (int): The geometric transformation (
for more information, see OpenSeesPy documentation).
1546 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1547 Defaults to -1, e.g. plastic hinge
in the end i.
1548 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1549 Defaults to -1, e.g. plastic hinge
in the end j.
1550 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed
in ReInit().
1551 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1552 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1553 @param min_tol (float, optional): Minimal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1554 @param max_tol (float, optional): Maximal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
1555 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1556 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1559 super().__init__(iNode_ID, jNode_ID, fiber_ID, section.D_bars, section.fy, geo_transf_ID,
1560 lambda_i=lambda_i, lambda_j=lambda_j, Lp=Lp, Ip=Ip, new_integration_ID=new_integration_ID,
1561 min_tol=min_tol, max_tol=max_tol, max_iter=max_iter, ele_ID = ele_ID)
1570 Class that is the children of GIFBElement
and combine the
class FibersCircRCCircShape (fiber
section) to retrieve the information needed.
1572 @param GIFBElement: Parent
class.
1574 def __init__(self, iNode_ID: int, jNode_ID: int, fib: FibersCircRCCircShape, geo_transf_ID: int,
1575 lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1,
1576 min_tol = TOL_INTEGRATION, max_tol = TOL_INTEGRATION*1e4, max_iter = MAX_ITER_INTEGRATION, ele_ID = -1):
1578 Constructor of the class.
1580 @param iNode_ID (int): ID of the first end node.
1581 @param jNode_ID (int): ID of the second end node.
1582 @param fib (FibersCircRCCircShape): FibersCircRCCircShape fiber section object.
1583 @param geo_transf_ID (int): A geometric transformation (
for more information, see OpenSeesPy documentation).
1584 @param lambda_i (float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge).
1585 Defaults to -1, e.g. plastic hinge
in the end i.
1586 @param lambda_j (float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge).
1587 Defaults to -1, e.g. plastic hinge
in the end j.
1588 @param Lp (float, optional): Plastic hinge length. Defaults to -1, e.g. computed
in ReInit().
1589 @param Ip (int, optional): Number of integration points (min. 3). Defaults to 5.
1590 @param new_integration_ID (int, optional): ID of the integration technique. Defaults to -1, e.g. computed
in ReInit().
1591 @param min_tol (float, optional): Minimal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION (Units).
1592 @param max_tol (float, optional): Maximal tolerance
for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
1593 @param max_iter (int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
1594 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
1597 super().__init__(iNode_ID, jNode_ID, fib.ID, self.sectionsection.D_bars, self.sectionsection.fy, geo_transf_ID,
1598 lambda_i=lambda_i, lambda_j=lambda_j, Lp=Lp, Ip=Ip, new_integration_ID=new_integration_ID,
1599 min_tol=min_tol, max_tol=max_tol, max_iter=max_iter, ele_ID = ele_ID)
Class that is the children of ElasticElement and combine the class SteelIShape (section) to retrieve ...
def __init__(self, int iNode_ID, int jNode_ID, SteelIShape section, int geo_transf_ID, ele_ID=-1)
Constructor of the class.
Class that handles the storage and manipulation of a elastic element's information (mechanical and ge...
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
def UpdateStoredData(self)
Implementation of the homonym abstract method.
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
def __init__(self, int iNode_ID, int jNode_ID, A, E, Iy, int geo_transf_ID, ele_ID=-1)
Constructor of the class.
def ReInit(self, ele_ID=-1)
Implementation of the homonym abstract method.
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Class that is the children of ForceBasedElement and combine the class FibersCircRCCircShape (fiber se...
def __init__(self, int iNode_ID, int jNode_ID, FibersCircRCCircShape fiber, int geo_transf_ID, new_integration_ID=-1, Ip=5, integration_type="Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that is the children of ForceBasedElement and combine the class FibersIShapeSteelIShape (fiber ...
def __init__(self, int iNode_ID, int jNode_ID, FibersIShapeSteelIShape fiber, int geo_transf_ID, new_integration_ID=-1, Ip=5, integration_type="Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that is the children of ForceBasedElement and combine the class FibersRectRCRectShape (fiber se...
def __init__(self, int iNode_ID, int jNode_ID, FibersRectRCRectShape fiber, int geo_transf_ID, new_integration_ID=-1, Ip=5, integration_type="Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that handles the storage and manipulation of a force-based element's information (mechanical an...
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
def ReInit(self, new_integration_ID, ele_ID=-1)
Implementation of the homonym abstract method.
def UpdateStoredData(self)
Implementation of the homonym abstract method.
def __init__(self, int iNode_ID, int jNode_ID, int fiber_ID, int geo_transf_ID, new_integration_ID=-1, Ip=5, integration_type="Lobatto", max_iter=MAX_ITER_INTEGRATION, tol=TOL_INTEGRATION, ele_ID=-1)
Constructor of the class.
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Class that is the children of GIFBElement and combine the class FibersCircRCCircShape (fiber section)...
def __init__(self, int iNode_ID, int jNode_ID, FibersCircRCCircShape fib, int geo_transf_ID, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1, min_tol=TOL_INTEGRATION, max_tol=TOL_INTEGRATION *1e4, max_iter=MAX_ITER_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that is the children of GIFBElement and combine the class FibersRectRCRectShape (fiber section)...
def __init__(self, int iNode_ID, int jNode_ID, FibersRectRCRectShape fib, int geo_transf_ID, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1, min_tol=TOL_INTEGRATION, max_tol=TOL_INTEGRATION *1e4, max_iter=MAX_ITER_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that is the children of GIFBElement and combine the class RCCircShape (section) to retrieve the...
def __init__(self, int iNode_ID, int jNode_ID, int fiber_ID, RCCircShape section, int geo_transf_ID, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1, min_tol=TOL_INTEGRATION, max_tol=TOL_INTEGRATION *1e4, max_iter=MAX_ITER_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that is the children of GIFBElement and combine the class RCRectShape (section) to retrieve the...
def __init__(self, int iNode_ID, int jNode_ID, int fiber_ID, RCRectShape section, int geo_transf_ID, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1, min_tol=TOL_INTEGRATION, max_tol=TOL_INTEGRATION *1e4, max_iter=MAX_ITER_INTEGRATION, ele_ID=-1)
Constructor of the class.
Class that handles the storage and manipulation of a Gradient-Inelastic Flexibility-based element's i...
def ComputeIp(self)
Compute the number of integration points with equal distance along the element.
def ComputeLp(self)
Method that computes the plastic length using Paulay 1992.
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
def __init__(self, int iNode_ID, int jNode_ID, int fiber_ID, D_bars, fy, int geo_transf_ID, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=-1, new_integration_ID=-1, min_tol=TOL_INTEGRATION, max_tol=TOL_INTEGRATION *1e4, max_iter=MAX_ITER_INTEGRATION, ele_ID=-1)
Constructor of the class.
def UpdateStoredData(self)
Implementation of the homonym abstract method.
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
def ReInit(self, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=5, new_integration_ID=-1, ele_ID=-1)
Implementation of the homonym abstract method.
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Parent abstract class for the storage and manipulation of a member's information (mechanical and geom...
def RecordNodeDef(self, int iNode_ID, int jNode_ID, str name_txt, str data_dir, time_rec=True)
Abstract method that records the deformation and time of the member's nodes associated with the class...
def Record(self, ele_ID, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Abstract method that records the forces, deformation and time of the member associated with the class...
WIP: Class that is the children of PanelZone and it's used for the panel zone in a RCS (RC column con...
def __init__(self, int master_node_ID, RCRectShape col, SteelIShape beam, int geo_transf_ID, int mat_ID, rigid=RIGID)
Constructor of the class.
Class that is the children of PanelZoneSteelIShape and automatically create the spring material model...
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, t_dp=0, rigid=RIGID)
Constructor of the class.
Class that is the children of PanelZoneSteelIShape and automatically create the spring material model...
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, t_dp=0, rigid=RIGID)
Constructor of the class.
Class that is the children of PanelZone and combine the class SteelIShape (section) to retrieve the i...
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, int mat_ID, rigid=RIGID)
Constructor of the class.
Class that handles the storage and manipulation of a panel zone's information (mechanical and geometr...
def __init__(self, int master_node_ID, mid_panel_zone_width, mid_panel_zone_height, E, A_rigid, I_rigid, int geo_transf_ID, int mat_ID, pin_corners=True)
Constructor of the class.
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
def UpdateStoredData(self)
Implementation of the homonym abstract method.
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
def ReInit(self)
Implementation of the homonym abstract method.
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retri...
def __init__(self, int iNode_ID, int jNode_ID, SteelIShape section, int geo_transf_ID, new_mat_ID_i=-1, new_mat_ID_j=-1, N_G=0, L_0=-1, L_b=-1, ele_ID=-1)
Constructor of the class.
Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retri...
def __init__(self, int iNode_ID, int jNode_ID, SteelIShape section, int geo_transf_ID, mat_ID_i=-1, mat_ID_j=-1, ele_ID=-1)
Constructor of the class.
Class that handles the storage and manipulation of a spring-based element's information (mechanical a...
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
def UpdateStoredData(self)
Implementation of the homonym abstract method.
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
def ReInit(self, ele_ID=-1)
Implementation of the homonym abstract method.
def Record(self, str spring_or_element, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
def __init__(self, int iNode_ID, int jNode_ID, A, E, Iy_mod, int geo_transf_ID, mat_ID_i=-1, mat_ID_j=-1, ele_ID=-1)
Constructor of the class.
def Pin(int NodeRID, int NodeCID)
Function that constrains the translational DOF with a multi-point constraint.
def RotationalSpring(int ElementID, int NodeRID, int NodeCID, int MatID, Rigid=False)
Function that defines a zero-length spring and constrains the translations DOFs of the spring.
Module with the parent abstract class DataManagement.
def OffsetNodeIDConvention(int node_ID, str orientation, str position_i_or_j)
Function used to add node on top of existing ones in the extremes of memebers with springs.
def NodesOrientation(int iNode_ID, int jNode_ID)
Function that finds the orientation of the vector with direction 'jNode_ID''iNode_ID'.
def IDConvention(int prefix, int suffix, n_zeros_between=0)
Function used to construct IDs for elements and offgrid nodes.
def plot_member(list element_array, member_name="Member name not defined", show_element_ID=True, show_node_ID=True)
Function that plots a set of elements.
def DefinePanelZoneElements(MasterNodeID, E, RigidA, RigidI, TransfID)
Function that defines the 8 panel zone elements.
def DefinePanelZoneNodes(int MasterNodeID, MidPanelZoneWidth, MidPanelZoneHeight)
Function that defines the remaining 10 nodes of a panel zone given the dimensions and the master node...