OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
SpringBasedElementModifiedIMKSteelIShape Class Reference

Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retrieve the information needed. More...

Inheritance diagram for SpringBasedElementModifiedIMKSteelIShape:
SpringBasedElement MemberModel

Public Member Functions

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. More...
 
- Public Member Functions inherited from SpringBasedElement
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. More...
 
def CreateMember (self)
 Method that initialises the member by calling the OpenSeesPy commands through various functions. More...
 
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. More...
 
def RecordNodeDef (self, str name_txt, str data_dir, time_rec=True)
 Implementation of the homonym abstract method. More...
 
def ReInit (self, ele_ID=-1)
 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...
 
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. More...
 
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. More...
 

Public Attributes

 section
 
 section_name_tag
 
- Public Attributes inherited from SpringBasedElement
 A
 
 data
 
 E
 
 ele_orientation
 
 element_array
 
 element_ID
 
 geo_transf_ID
 
 Initialized
 
 iNode_ID
 
 iNode_ID_spring
 
 iSpring_ID
 
 Iy_mod
 
 jNode_ID
 
 jNode_ID_spring
 
 jSpring_ID
 
 mat_ID_i
 
 mat_ID_j
 
 section_name_tag
 

Detailed Description

Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retrieve the information needed.


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. L_b is assumed the same for top and bottom springs.

Parameters
SpringBasedElementParent class.

Definition at line 891 of file MemberModel.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
iNode_ID(int): ID of the first end node.
jNode_ID(int): ID of the second end node.
section(SteelIShape): SteelIShape section object.
geo_transf_ID(int): A geometric transformation (for more information, see OpenSeesPy documentation).
new_mat_ID_i(int, optional): New ID for the definition of the material model for the spring in the node i. If -1 is passed, the class generate no material model and no spring. If 0 is passed, no i spring. Defaults to -1.
new_mat_ID_j(int, optional): New ID for the definition of the material model for the spring in the node j. If -1 is passed, the class generate no material model and no spring. If 0 is passed, no j spring. Defaults to -1.
N_G(float, optional): Axial load. Defaults to 0.
L_0(float, optional): Distance from the maximal moment to zero. Defaults to -1, e.g. computed in init().
L_b(float, optional): Maximal unbraced lateral buckling length. Defaults to -1, e.g. computed in init().
ele_ID(int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValueID needs to be a positive integer.
NameErrorat least one spring needs to be defined.
NegativeValueID needs to be a positive integer.
ZeroLengthThe two nodes are superimposed.

Reimplemented from SpringBasedElement.

Definition at line 899 of file MemberModel.py.

900 N_G = 0, L_0 = -1, L_b = -1, ele_ID = -1):
901 """
902 Constructor of the class.
903
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.
916
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.
922 """
923 self.section = deepcopy(section)
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()
928
929 if L_0 == -1:
930 if new_mat_ID_i != 0 and new_mat_ID_j != 0:
931 L_0 = section.L/2
932 else:
933 L_0 = section.L
934 L_b = L_0 if L_b == -1 else L_b
935
936 # auto assign ID for material of springs
937 ele_orientation = NodesOrientation(iNode_ID, jNode_ID)
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:
940 new_mat_ID_i = OffsetNodeIDConvention(iNode_ID, ele_orientation, "i")
941 if new_mat_ID_j != 0 and new_mat_ID_j == -1:
942 new_mat_ID_j = OffsetNodeIDConvention(jNode_ID, ele_orientation, "j")
943
944 if new_mat_ID_i != 0:
945 # Create mat i
946 iSpring = ModifiedIMKSteelIShape(new_mat_ID_i, section, N_G, L_0 = L_0, L_b = L_b)
947 iSpring.Bilin()
948
949 if new_mat_ID_j != 0:
950 # Create mat j
951 jSpring = ModifiedIMKSteelIShape(new_mat_ID_j, section, N_G, L_0 = L_0, L_b = L_b)
952 jSpring.Bilin()
953
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
956
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)
958 self.section_name_tag = section.name_tag
959 self.UpdateStoredData()
960 # Check length
961 self._CheckL()
962
963
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.

Member Data Documentation

◆ section

section

Definition at line 923 of file MemberModel.py.

◆ section_name_tag

section_name_tag

Definition at line 958 of file MemberModel.py.


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