OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
MemberModel.py
Go to the documentation of this file.
1"""
2Module for the member model.
3Carmine Schipani, 2021
4"""
5
6from openseespy.opensees import *
7import matplotlib.pyplot as plt
8import numpy as np
9import os
10import math
11from abc import abstractmethod
12from copy import copy, deepcopy
16from OpenSeesPyAssistant.Units import *
21
23 """
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.
25
26 @param DataManagement: Parent abstract class.
27 """
28 @abstractmethod
29 def Record(self, ele_ID, name_txt: str, data_dir: str, force_rec = True, def_rec = True, time_rec = True):
30 """
31 Abstract method that records the forces, deformation and time of the member associated with the class.
32
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.
39 """
40 if self.Initialized:
41 if not os.path.exists(data_dir):
42 print("Folder {} not found in this directory; creating one".format(data_dir))
43 os.makedirs(data_dir)
44
45 if time_rec:
46 if force_rec:
47 recorder("Element", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-time", "-ele", ele_ID, "force")
48 if def_rec:
49 recorder("Element", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-time", "-ele", ele_ID, "deformation")
50 else:
51 if force_rec:
52 recorder("Element", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-ele", ele_ID, "force")
53 if def_rec:
54 recorder("Element", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-ele", ele_ID, "deformation")
55 else:
56 print("The element is not initialized (node and/or elements not created), ID = {}".format(ele_ID))
57
58 @abstractmethod
59 def RecordNodeDef(self, iNode_ID: int, jNode_ID: int, name_txt: str, data_dir: str, time_rec = True):
60 """
61 Abstract method that records the deformation and time of the member's nodes associated with the class.
62
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.
68 """
69 if self.Initialized:
70 if not os.path.exists(data_dir):
71 print("Folder {} not found in this directory; creating one".format(data_dir))
72 os.makedirs(data_dir)
73
74 if time_rec:
75 recorder("Node", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-time", "-node", iNode_ID, jNode_ID, "-dof", 1, 2, 3, "disp")
76 else:
77 recorder("Node", "-file", '{}/{}.txt'.format(data_dir, name_txt), "-node", iNode_ID, jNode_ID, "-dof", 1, 2, 3, "disp")
78 else:
79 print("The element is not initialized (node and/or elements not created), iNode ID = {}, jNode ID = {}".format(iNode_ID, jNode_ID))
80
81
82 def _CheckL(self):
83 """
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.
85 """
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))
92
93
95 """
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.
97
98 @param MemberModel: Parent abstract class.
99 """
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):
101 """
102 Constructor of the class.
103
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.
113
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.
122 """
123 # Check
124 if master_node_ID < 1: raise NegativeValue()
125 # if master_node_ID > 99: raise WrongNodeIDConvention(master_node_ID)
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()
133
134 # Arguments
135 self.master_node_IDmaster_node_ID = master_node_ID
136 self.mid_panel_zone_widthmid_panel_zone_width = mid_panel_zone_width
137 self.mid_panel_zone_heightmid_panel_zone_height = mid_panel_zone_height
138 self.EE = E
139 self.A_rigidA_rigid = A_rigid
140 self.I_rigidI_rigid = I_rigid
141 self.geo_transf_IDgeo_transf_ID = geo_transf_ID
142 self.mat_IDmat_ID = mat_ID
143 self.pin_cornerspin_corners = pin_corners
144
145 # Initialized the parameters that are dependent from others
146 self.col_section_name_tagcol_section_name_tag = "None"
147 self.beam_section_name_tagbeam_section_name_tag = "None"
148 self.InitializedInitialized = False
149 self.ReInitReInit()
150
151
152 def ReInit(self):
153 """
154 Implementation of the homonym abstract method.
155 See parent class DataManagement for detailed information.
156 """
157 # Arguments
158 self.spring_IDspring_ID = -1
159
160 # Members
161 if self.col_section_name_tagcol_section_name_tag != "None": self.col_section_name_tagcol_section_name_tag = self.col_section_name_tagcol_section_name_tag + " (modified)"
162 if self.beam_section_name_tagbeam_section_name_tag != "None": self.beam_section_name_tagbeam_section_name_tag = self.beam_section_name_tagbeam_section_name_tag + " (modified)"
163
164 # Data storage for loading/saving
165 self.UpdateStoredDataUpdateStoredData()
166
167
168 # Methods
170 """
171 Implementation of the homonym abstract method.
172 See parent class DataManagement for detailed information.
173 """
174 self.datadata = [["INFO_TYPE", "PanelZone"], # Tag for differentiating different data
175 ["master_node_ID", self.master_node_IDmaster_node_ID],
176 ["col_section_name_tag", self.col_section_name_tagcol_section_name_tag],
177 ["beam_section_name_tag", self.beam_section_name_tagbeam_section_name_tag],
178 ["mat_ID", self.mat_IDmat_ID],
179 ["spring_ID", self.spring_IDspring_ID],
180 ["mid_panel_zone_width", self.mid_panel_zone_widthmid_panel_zone_width],
181 ["mid_panel_zone_height", self.mid_panel_zone_heightmid_panel_zone_height],
182 ["E", self.EE],
183 ["A_rigid", self.A_rigidA_rigid],
184 ["I_rigid", self.I_rigidI_rigid],
185 ["tranf_ID", self.geo_transf_IDgeo_transf_ID],
186 ["Initialized", self.InitializedInitialized]]
187
188
189 def ShowInfo(self, plot = False, block = False):
190 """
191 Implementation of the homonym abstract method.
192 See parent class DataManagement for detailed information.
193
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.
196 """
197 print("")
198 print("Requested info for Panel Zone member model, master node ID = {}".format(self.master_node_IDmaster_node_ID))
199 print("Section associated, column: {} ".format(self.col_section_name_tagcol_section_name_tag))
200 print("Section associated, beam: {} ".format(self.beam_section_name_tagbeam_section_name_tag))
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))
209 print("")
210
211 if plot:
212 if self.InitializedInitialized:
213 plot_member(self.element_arrayelement_array, "Panel zone, ID = {}".format(self.master_node_IDmaster_node_ID))
214 if block:
215 plt.show()
216 else:
217 print("The panel zone is not initialized (node and elements not created) for master node ID = {}".format(self.master_node_IDmaster_node_ID))
218
219
220 def CreateMember(self):
221 """
222 Method that initialises the member by calling the OpenSeesPy commands through various functions.
223 """
224 # Define nodes
225 DefinePanelZoneNodes(self.master_node_IDmaster_node_ID, self.mid_panel_zone_widthmid_panel_zone_width, self.mid_panel_zone_heightmid_panel_zone_height)
226 xy1 = IDConvention(self.master_node_IDmaster_node_ID, 1)
227 xy01 = IDConvention(self.master_node_IDmaster_node_ID, 1, 1)
228 xy03 = IDConvention(self.master_node_IDmaster_node_ID, 3, 1)
229 xy04 = IDConvention(self.master_node_IDmaster_node_ID, 4, 1)
230 xy06 = IDConvention(self.master_node_IDmaster_node_ID, 6, 1)
231 xy07 = IDConvention(self.master_node_IDmaster_node_ID, 7, 1)
232 xy09 = IDConvention(self.master_node_IDmaster_node_ID, 9, 1)
233 xy10 = IDConvention(self.master_node_IDmaster_node_ID, 10)
234
235 # Define rigid elements
236 self.element_arrayelement_array = DefinePanelZoneElements(self.master_node_IDmaster_node_ID, self.EE, self.A_rigidA_rigid, self.I_rigidI_rigid, self.geo_transf_IDgeo_transf_ID)
237
238 # Define zero length element
239 self.spring_IDspring_ID = IDConvention(xy1, xy01)
240 RotationalSpring(self.spring_IDspring_ID, xy1, xy01, self.mat_IDmat_ID)
241 self.element_arrayelement_array.append([self.spring_IDspring_ID, xy1, xy01])
242 self.iNode_IDiNode_ID = xy1
243 self.jNode_IDjNode_ID = xy01
244
245 # Pin connections
246 if self.pin_cornerspin_corners:
247 Pin(xy03, xy04)
248 Pin(xy06, xy07)
249 Pin(xy09, xy10)
250
251 # Update class
252 self.InitializedInitialized = True
253 self.UpdateStoredDataUpdateStoredData()
254
255
256 def Record(self, name_txt: str, data_dir: str, force_rec=True, def_rec=True, time_rec=True):
257 """
258 Implementation of the homonym abstract method.
259 See parent class MemberModel for detailed information.
260 """
261 super().Record(self.spring_IDspring_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
262
263
264 def RecordNodeDef(self, name_txt: str, data_dir: str, time_rec=True):
265 """
266 Implementation of the homonym abstract method.
267 See parent class MemberModel for detailed information.
268 """
269 super().RecordNodeDef(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, name_txt, data_dir, time_rec=time_rec)
270
271
272 def _CheckL(self):
273 """
274 (placeholder). No applicable for the panel zone.
275 """
276 print("No length check for panel zone")
277
278
280 """
281 Class that is the children of PanelZone and combine the class SteelIShape (section) to retrieve the information needed.
282
283 @param PanelZone: Parent class.
284 """
285 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, mat_ID: int, rigid = RIGID):
286 """
287 Constructor of the class.
288
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.
296 """
297 self.colcol = deepcopy(col)
298 self.beambeam = deepcopy(beam)
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)
300
301 self.col_section_name_tagcol_section_name_tagcol_section_name_tag = col.name_tag
302 self.beam_section_name_tagbeam_section_name_tagbeam_section_name_tag = beam.name_tag
303 self.UpdateStoredDataUpdateStoredData()
304
305
307 """
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).
310
311 @param PanelZone: Parent class.
312 """
313 def __init__(self, master_node_ID: int, col: RCRectShape, beam: SteelIShape, geo_transf_ID: int, mat_ID: int, rigid = RIGID):
314 """
315 Constructor of the class.
316
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.
324 """
325 self.colcol = deepcopy(col)
326 self.beambeam = deepcopy(beam)
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)
328
329 self.col_section_name_tagcol_section_name_tagcol_section_name_tag = col.name_tag
330 self.beam_section_name_tagbeam_section_name_tagbeam_section_name_tag = beam.name_tag
331 self.UpdateStoredDataUpdateStoredData()
332
333
335 """
336 Class that is the children of PanelZoneSteelIShape and automatically create the spring material model Gupta 1999 (ID = master_node_ID).
337
338 @param PanelZoneSteelIShape: Parent class.
339 """
340 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, t_dp = 0, rigid=RIGID):
341 """
342 Constructor of the class.
343
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.
351 """
352 self.colcolcol = deepcopy(col)
353 self.beambeambeam = deepcopy(beam)
354 mat_ID = master_node_ID
355 pz_spring = Gupta1999SteelIShape(mat_ID, col, beam, t_dp)
356 pz_spring.Hysteretic()
357
358 super().__init__(master_node_ID, col, beam, geo_transf_ID, mat_ID, rigid)
359
360
362 """
363 Class that is the children of PanelZoneSteelIShape and automatically create the spring material model Skiadopoulos 2021 (ID = master_node_ID).
364
365 @param PanelZoneSteelIShape: Parent class.
366 """
367 def __init__(self, master_node_ID: int, col: SteelIShape, beam: SteelIShape, geo_transf_ID: int, t_dp = 0, rigid=RIGID):
368 """
369 Constructor of the class.
370
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.
378 """
379 self.colcolcol = deepcopy(col)
380 self.beambeambeam = deepcopy(beam)
381 mat_ID = master_node_ID
382 pz_spring = Skiadopoulos2021SteelIShape(mat_ID, col, beam, t_dp)
383 pz_spring.Hysteretic()
384
385 super().__init__(master_node_ID, col, beam, geo_transf_ID, mat_ID, rigid)
386
387
388def DefinePanelZoneNodes(MasterNodeID: int, MidPanelZoneWidth, MidPanelZoneHeight):
389 """
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
397 | | \n
398 1xy08 o o 1xy02 \n
399 | | \n
400 | | \n
401 | | \n
402 | | \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.
406
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.
410
411 """
412 # Get node coord and define useful variables
413 m_node = np.array(nodeCoord(MasterNodeID))
414 AxisCL = m_node[0]
415 FloorCL = m_node[1] - MidPanelZoneHeight
416
417 # Convention: Node of the spring (top right) is xy1
418 node(IDConvention(MasterNodeID, 1), AxisCL+MidPanelZoneWidth, FloorCL+MidPanelZoneHeight)
419 # Convention: Two notes in the corners (already defined one, xy1) clockwise from xy01 to xy10
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)
430
431
432def DefinePanelZoneElements(MasterNodeID, E, RigidA, RigidI, TransfID):
433 """
434 Function that defines the 8 panel zone elements. For the ID convention, see DefinePanelZoneNodes.
435
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).
441
442 @returns list: List of lists, wth each list containing the ID of the element, of node i and node j.
443 """
444 # Compute the ID of the nodes obeying to the convention used
445 xy = MasterNodeID
446 xy1 = IDConvention(xy, 1)
447 xy01 = IDConvention(xy, 1, 1)
448 xy02 = IDConvention(xy, 2, 1)
449 xy03 = IDConvention(xy, 3, 1)
450 xy04 = IDConvention(xy, 4, 1)
451 xy05 = IDConvention(xy, 5, 1)
452 xy06 = IDConvention(xy, 6, 1)
453 xy07 = IDConvention(xy, 7, 1)
454 xy08 = IDConvention(xy, 8, 1)
455 xy09 = IDConvention(xy, 9, 1)
456 xy10 = IDConvention(xy, 10)
457
458 # Create element IDs using the convention: xy(a)xy(a) with xy(a) = NodeID i and j
459 # Starting at MasterNodeID, clockwise
460 # if MasterNodeID > 99:
461 # print("Warning, convention: MasterNodeID's digits should be 2")
462
463 ele1 = IDConvention(xy, xy1)
464 ele2 = IDConvention(xy01, xy02)
465 ele3 = IDConvention(xy02, xy03)
466 ele4 = IDConvention(xy04, xy05)
467 ele5 = IDConvention(xy05, xy06)
468 ele6 = IDConvention(xy07, xy08)
469 ele7 = IDConvention(xy08, xy09)
470 ele8 = IDConvention(xy10, xy)
471
472 # Create panel zone elements
473 # ID ndI ndJ A E I Transf
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)
482
483 # Create element array for forther manipulations
484 element_array = [[ele1, xy, xy1],
485 [ele2, xy01, xy02],
486 [ele3, xy02, xy03],
487 [ele4, xy04, xy05],
488 [ele5, xy05, xy06],
489 [ele6, xy07, xy08],
490 [ele7, xy08, xy09],
491 [ele8, xy10, xy]]
492
493 return element_array
494
495
497 """
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.
499
500 @param MemberModel: Parent abstract class.
501 """
502 def __init__(self, iNode_ID: int, jNode_ID: int, A, E, Iy, geo_transf_ID: int, ele_ID = -1):
503 """
504 Constructor of the class.
505
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.
513
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.
521 """
522 # Check
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()
530
531 # Arguments
532 self.iNode_IDiNode_ID = iNode_ID
533 self.jNode_IDjNode_ID = jNode_ID
534 self.AA = A
535 self.EE = E
536 self.IyIy = Iy
537 self.geo_transf_IDgeo_transf_ID = geo_transf_ID
538
539 # Initialized the parameters that are dependent from others
540 self.section_name_tagsection_name_tag = "None"
541 self.InitializedInitialized = False
542 self.ReInitReInit(ele_ID = -1)
543
544 def ReInit(self, ele_ID = -1):
545 """
546 Implementation of the homonym abstract method.
547 See parent class DataManagement for detailed information.
548
549 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
550 """
551 # Members
552 if self.section_name_tagsection_name_tag != "None": self.section_name_tagsection_name_tag = self.section_name_tagsection_name_tag + " (modified)"
553
554 # element ID
555 self.element_IDelement_ID = IDConvention(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID) if ele_ID == -1 else ele_ID
556
557 # Data storage for loading/saving
558 self.UpdateStoredDataUpdateStoredData()
559
560
561 # Methods
563 """
564 Implementation of the homonym abstract method.
565 See parent class DataManagement for detailed information.
566 """
567 self.datadata = [["INFO_TYPE", "ElasticElement"], # Tag for differentiating different data
568 ["element_ID", self.element_IDelement_ID],
569 ["section_name_tag", self.section_name_tagsection_name_tag],
570 ["A", self.AA],
571 ["E", self.EE],
572 ["Iy", self.IyIy],
573 ["iNode_ID", self.iNode_IDiNode_ID],
574 ["jNode_ID", self.jNode_IDjNode_ID],
575 ["tranf_ID", self.geo_transf_IDgeo_transf_ID],
576 ["Initialized", self.InitializedInitialized]]
577
578
579 def ShowInfo(self, plot = False, block = False):
580 """
581 Implementation of the homonym abstract method.
582 See parent class DataManagement for detailed information.
583
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.
586 """
587 print("")
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))
594 print("")
595
596 if plot:
597 if self.InitializedInitialized:
598 plot_member(self.element_arrayelement_array, "Elastic Element, ID = {}".format(self.element_IDelement_ID))
599 if block:
600 plt.show()
601 else:
602 print("The ElasticElement is not initialized (node and elements not created), ID = {}".format(self.element_IDelement_ID))
603
604
605 def CreateMember(self):
606 """
607 Method that initialises the member by calling the OpenSeesPy commands through various functions.
608 """
609 self.element_arrayelement_array = [[self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID]]
610
611 # Define element
612 element("elasticBeamColumn", self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, self.AA, self.EE, self.IyIy, self.geo_transf_IDgeo_transf_ID)
613
614 # Update class
615 self.InitializedInitialized = True
616 self.UpdateStoredDataUpdateStoredData()
617
618
619 def Record(self, name_txt: str, data_dir: str, force_rec=True, def_rec=True, time_rec=True):
620 """
621 Implementation of the homonym abstract method.
622 See parent class MemberModel for detailed information.
623 """
624 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
625
626
627 def RecordNodeDef(self, name_txt: str, data_dir: str, time_rec=True):
628 """
629 Implementation of the homonym abstract method.
630 See parent class MemberModel for detailed information.
631 """
632 super().RecordNodeDef(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, name_txt, data_dir, time_rec=time_rec)
633
634
636 """
637 Class that is the children of ElasticElement and combine the class SteelIShape (section) to retrieve the information needed.
638
639 @param ElasticElement: Parent class.
640 """
641 def __init__(self, iNode_ID: int, jNode_ID: int, section: SteelIShape, geo_transf_ID: int, ele_ID = -1):
642 """
643 Constructor of the class.
644
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.
650 """
651 self.sectionsection = deepcopy(section)
652 super().__init__(iNode_ID, jNode_ID, section.A, section.E, section.Iy, geo_transf_ID, ele_ID)
653 self.section_name_tagsection_name_tagsection_name_tag = section.name_tag
654 self.UpdateStoredDataUpdateStoredData()
655 # Check length
656 self._CheckL_CheckL()
657
658
660 """
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.
662
663 @param MemberModel: Parent abstract class.
664 """
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):
666 """
667 Constructor of the class.
668
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.
678
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.
689 """
690 # Check
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()
701
702 # Arguments
703 self.iNode_IDiNode_ID = iNode_ID
704 self.jNode_IDjNode_ID = jNode_ID
705 self.AA = A
706 self.EE = E
707 self.Iy_modIy_mod = Iy_mod
708 self.geo_transf_IDgeo_transf_ID = geo_transf_ID
709 self.mat_ID_imat_ID_i = mat_ID_i
710 self.mat_ID_jmat_ID_j = mat_ID_j
711
712 # Initialized the parameters that are dependent from others
713 self.section_name_tagsection_name_tag = "None"
714 self.InitializedInitialized = False
715 self.ReInitReInit(ele_ID)
716
717
718 def ReInit(self, ele_ID = -1):
719 """
720 Implementation of the homonym abstract method.
721 See parent class DataManagement for detailed information.
722
723 @param ele_ID (int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
724 """
725 # Members
726 if self.section_name_tagsection_name_tag != "None": self.section_name_tagsection_name_tag = self.section_name_tagsection_name_tag + " (modified)"
727 # orientation:
728 self.ele_orientationele_orientation = NodesOrientation(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID)
729 if self.ele_orientationele_orientation == "zero_length": raise ZeroLength(IDConvention(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID))
730
731 if self.mat_ID_imat_ID_i != -1:
732 self.iNode_ID_springiNode_ID_spring = OffsetNodeIDConvention(self.iNode_IDiNode_ID, self.ele_orientationele_orientation, "i")
733 else:
734 self.iNode_ID_springiNode_ID_spring = self.iNode_IDiNode_ID
735
736 if self.mat_ID_jmat_ID_j != -1:
737 self.jNode_ID_springjNode_ID_spring = OffsetNodeIDConvention(self.jNode_IDjNode_ID, self.ele_orientationele_orientation, "j")
738 else:
739 self.jNode_ID_springjNode_ID_spring = self.jNode_IDjNode_ID
740
741 # element ID
742 self.element_IDelement_ID = IDConvention(self.iNode_ID_springiNode_ID_spring, self.jNode_ID_springjNode_ID_spring) if ele_ID == -1 else ele_ID
743
744 # Data storage for loading/saving
745 self.UpdateStoredDataUpdateStoredData()
746
747
748 # Methods
750 """
751 Implementation of the homonym abstract method.
752 See parent class DataManagement for detailed information.
753 """
754 self.datadata = [["INFO_TYPE", "SpringBasedElement"], # Tag for differentiating different data
755 ["element_ID", self.element_IDelement_ID],
756 ["section_name_tag", self.section_name_tagsection_name_tag],
757 ["A", self.AA],
758 ["E", self.EE],
759 ["Iy_mod", self.Iy_modIy_mod],
760 ["iNode_ID", self.iNode_IDiNode_ID],
761 ["iNode_ID_spring", self.iNode_ID_springiNode_ID_spring],
762 ["mat_ID_i", self.mat_ID_imat_ID_i],
763 ["jNode_ID", self.jNode_IDjNode_ID],
764 ["jNode_ID_spring", self.jNode_ID_springjNode_ID_spring],
765 ["mat_ID_j", self.mat_ID_jmat_ID_j],
766 ["ele_orientation", self.ele_orientationele_orientation],
767 ["tranf_ID", self.geo_transf_IDgeo_transf_ID],
768 ["Initialized", self.InitializedInitialized]]
769
770
771 def ShowInfo(self, plot = False, block = False):
772 """
773 Implementation of the homonym abstract method.
774 See parent class DataManagement for detailed information.
775
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.
778 """
779 print("")
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))
788 print("")
789
790 if plot:
791 if self.InitializedInitialized:
792 plot_member(self.element_arrayelement_array, "SpringBased Element, ID = {}".format(self.element_IDelement_ID))
793 if block:
794 plt.show()
795 else:
796 print("The SpringBasedElement is not initialized (node and elements not created), ID = {}".format(self.element_IDelement_ID))
797
798
799 def CreateMember(self):
800 """
801 Method that initialises the member by calling the OpenSeesPy commands through various functions.
802 """
803 self.element_arrayelement_array = [[self.element_IDelement_ID, self.iNode_ID_springiNode_ID_spring, self.jNode_ID_springjNode_ID_spring]]
804 if self.mat_ID_imat_ID_i != -1:
805 # Define zero length element i
806 node(self.iNode_ID_springiNode_ID_spring, *nodeCoord(self.iNode_IDiNode_ID))
807 self.iSpring_IDiSpring_ID = IDConvention(self.iNode_IDiNode_ID, self.iNode_ID_springiNode_ID_spring)
808 RotationalSpring(self.iSpring_IDiSpring_ID, self.iNode_IDiNode_ID, self.iNode_ID_springiNode_ID_spring, self.mat_ID_imat_ID_i)
809 self.element_arrayelement_array.append([self.iSpring_IDiSpring_ID, self.iNode_IDiNode_ID, self.iNode_ID_springiNode_ID_spring])
810 if self.mat_ID_jmat_ID_j != -1:
811 # Define zero length element j
812 node(self.jNode_ID_springjNode_ID_spring, *nodeCoord(self.jNode_IDjNode_ID))
813 self.jSpring_IDjSpring_ID = IDConvention(self.jNode_IDjNode_ID, self.jNode_ID_springjNode_ID_spring)
814 RotationalSpring(self.jSpring_IDjSpring_ID, self.jNode_IDjNode_ID, self.jNode_ID_springjNode_ID_spring, self.mat_ID_jmat_ID_j)
815 self.element_arrayelement_array.append([self.jSpring_IDjSpring_ID, self.jNode_IDjNode_ID, self.jNode_ID_springjNode_ID_spring])
816
817 # Define element
818 element("elasticBeamColumn", self.element_IDelement_ID, self.iNode_ID_springiNode_ID_spring, self.jNode_ID_springjNode_ID_spring, self.AA, self.EE, self.Iy_modIy_mod, self.geo_transf_IDgeo_transf_ID)
819
820 # Update class
821 self.InitializedInitialized = True
822 self.UpdateStoredDataUpdateStoredData()
823
824
825 def Record(self, spring_or_element: str, name_txt: str, data_dir: str, force_rec=True, def_rec=True, time_rec=True):
826 """
827 Implementation of the homonym abstract method.
828 See parent class MemberModel for detailed information.
829 """
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":
833 if self.mat_ID_imat_ID_i == -1:
834 print("Spring i recorded not present in element ID = {}".format(self.element_IDelement_ID))
835 else:
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":
838 if self.mat_ID_jmat_ID_j == -1:
839 print("Spring j recorded not present in element ID = {}".format(self.element_IDelement_ID))
840 else:
841 super().Record(self.jSpring_IDjSpring_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
842 else:
843 print("No recording option with: '{}' with element ID: {}".format(spring_or_element, self.element_IDelement_ID))
844
845
846 def RecordNodeDef(self, name_txt: str, data_dir: str, time_rec=True):
847 """
848 Implementation of the homonym abstract method.
849 See parent class MemberModel for detailed information.
850 """
851 super().RecordNodeDef(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, name_txt, data_dir, time_rec=time_rec)
852
853
855 """
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.
858
859 @param SpringBasedElement: Parent class.
860 """
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):
862 """
863 Constructor of the class.
864
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.
872
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.
877 """
878 self.sectionsection = deepcopy(section)
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()
883
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)
885 self.section_name_tagsection_name_tagsection_name_tag = section.name_tag
886 self.UpdateStoredDataUpdateStoredData()
887 # Check length
888 self._CheckL_CheckL()
889
890
892 """
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.
896
897 @param SpringBasedElement: Parent class.
898 """
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):
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.sectionsection = 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_tagsection_name_tagsection_name_tag = section.name_tag
959 self.UpdateStoredDataUpdateStoredData()
960 # Check length
961 self._CheckL_CheckL()
962
963
965 """
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.
967
968 @param MemberModel: Parent abstract class.
969 """
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):
972 """
973 Constructor of the class.
974
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.
986
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.
996 """
997 # Check
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()
1007
1008 # Arguments
1009 self.iNode_IDiNode_ID = iNode_ID
1010 self.jNode_IDjNode_ID = jNode_ID
1011 self.fiber_IDfiber_ID = fiber_ID
1012 self.geo_transf_IDgeo_transf_ID = geo_transf_ID
1013 self.IpIp = Ip
1014 self.integration_typeintegration_type = integration_type
1015 self.max_itermax_iter = max_iter
1016 self.toltol = tol
1017
1018 # Initialized the parameters that are dependent from others
1019 self.section_name_tagsection_name_tag = "None"
1020 self.InitializedInitialized = False
1021 self.ReInitReInit(new_integration_ID, ele_ID)
1022
1023
1024 def ReInit(self, new_integration_ID, ele_ID = -1):
1025 """
1026 Implementation of the homonym abstract method.
1027 See parent class DataManagement for detailed information.
1028
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.
1031 """
1032 # Precompute some members
1033 self.element_IDelement_ID = IDConvention(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID) if ele_ID == -1 else ele_ID
1034
1035 # Arguments
1036 self.new_integration_IDnew_integration_ID = self.element_IDelement_ID if new_integration_ID == -1 else new_integration_ID
1037
1038 # Members
1039 if self.section_name_tagsection_name_tag != "None": self.section_name_tagsection_name_tag = self.section_name_tagsection_name_tag + " (modified)"
1040
1041 # Data storage for loading/saving
1042 self.UpdateStoredDataUpdateStoredData()
1043
1044
1045 # Methods
1047 """
1048 Implementation of the homonym abstract method.
1049 See parent class DataManagement for detailed information.
1050 """
1051 self.datadata = [["INFO_TYPE", "ForceBasedElement"], # Tag for differentiating different data
1052 ["element_ID", self.element_IDelement_ID],
1053 ["section_name_tag", self.section_name_tagsection_name_tag],
1054 ["Ip", self.IpIp],
1055 ["iNode_ID", self.iNode_IDiNode_ID],
1056 ["jNode_ID", self.jNode_IDjNode_ID],
1057 ["fiber_ID", self.fiber_IDfiber_ID],
1058 ["new_integration_ID", self.new_integration_IDnew_integration_ID],
1059 ["integration_type", self.integration_typeintegration_type],
1060 ["tol", self.toltol],
1061 ["max_iter", self.max_itermax_iter],
1062 ["tranf_ID", self.geo_transf_IDgeo_transf_ID],
1063 ["Initialized", self.InitializedInitialized]]
1064
1065
1066 def ShowInfo(self, plot = False, block = False):
1067 """
1068 Implementation of the homonym abstract method.
1069 See parent class DataManagement for detailed information.
1070
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.
1073 """
1074 print("")
1075 print("Requested info for ForceBasedElement member model, ID = {}".format(self.element_IDelement_ID))
1076 print("Fiber associated, ID = {} ".format(self.fiber_IDfiber_ID))
1077 print("Integration type '{}', ID = {}".format(self.integration_typeintegration_type, self.new_integration_IDnew_integration_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))
1081 print("")
1082
1083 if plot:
1084 if self.InitializedInitialized:
1085 plot_member(self.element_arrayelement_array, "ForceBased Element, ID = {}".format(self.element_IDelement_ID))
1086 if block:
1087 plt.show()
1088 else:
1089 print("The ForceBasedElement is not initialized (element not created), ID = {}".format(self.element_IDelement_ID))
1090
1091
1092 def CreateMember(self):
1093 """
1094 Method that initialises the member by calling the OpenSeesPy commands through various functions.
1095 """
1096 self.element_arrayelement_array = [[self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID]]
1097
1098 # Define integration type
1099 beamIntegration(self.integration_typeintegration_type, self.new_integration_IDnew_integration_ID, self.fiber_IDfiber_ID, self.IpIp)
1100
1101 # Define element
1102 element('forceBeamColumn', self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, self.geo_transf_IDgeo_transf_ID, self.new_integration_IDnew_integration_ID, '-iter', self.max_itermax_iter, self.toltol)
1103
1104 # Update class
1105 self.InitializedInitialized = True
1106 self.UpdateStoredDataUpdateStoredData()
1107
1108
1109 def Record(self, name_txt: str, data_dir: str, force_rec=True, def_rec=True, time_rec=True):
1110 """
1111 Implementation of the homonym abstract method.
1112 See parent class MemberModel for detailed information.
1113 """
1114 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
1115
1116
1117 def RecordNodeDef(self, name_txt: str, data_dir: str, time_rec=True):
1118 """
1119 Implementation of the homonym abstract method.
1120 See parent class MemberModel for detailed information.
1121 """
1122 super().RecordNodeDef(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, name_txt, data_dir, time_rec=time_rec)
1123
1124
1126 """
1127 Class that is the children of ForceBasedElement and combine the class FibersRectRCRectShape (fiber section) to retrieve the information needed.
1128
1129 @param ForceBasedElement: Parent class.
1130 """
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):
1133 """
1134 Constructor of the class.
1135
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.
1147 """
1148 self.sectionsection = deepcopy(fiber.section)
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)
1151 self.section_name_tagsection_name_tagsection_name_tag = self.sectionsection.name_tag
1152 self.UpdateStoredDataUpdateStoredData()
1153 # Check length
1154 self._CheckL_CheckL()
1155
1156
1158 """
1159 Class that is the children of ForceBasedElement and combine the class FibersCircRCCircShape (fiber section) to retrieve the information needed.
1160
1161 @param ForceBasedElement: Parent class.
1162 """
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):
1165 """
1166 Constructor of the class.
1167
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.
1179 """
1180 self.sectionsection = deepcopy(fiber.section)
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)
1183 self.section_name_tagsection_name_tagsection_name_tag = self.sectionsection.name_tag
1184 self.UpdateStoredDataUpdateStoredData()
1185 # Check length
1186 self._CheckL_CheckL()
1187
1188
1190 """
1191 Class that is the children of ForceBasedElement and combine the class FibersIShapeSteelIShape (fiber section) to retrieve the information needed.
1192
1193 @param ForceBasedElement: Parent class.
1194 """
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):
1197 """
1198 Constructor of the class.
1199
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.
1211 """
1212 self.sectionsection = deepcopy(fiber.section)
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)
1215 self.section_name_tagsection_name_tagsection_name_tag = self.sectionsection.name_tag
1216 self.UpdateStoredDataUpdateStoredData()
1217 # Check length
1218 self._CheckL_CheckL()
1219
1220
1222 """
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.
1226
1227 @param MemberModel: Parent abstract class.
1228 """
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):
1232 """
1233 Constructor of the class.
1234
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.
1252
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.
1269 """
1270 # Check
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()
1287
1288 # Arguments
1289 self.iNode_IDiNode_ID = iNode_ID
1290 self.jNode_IDjNode_ID = jNode_ID
1291 self.D_barsD_bars = D_bars
1292 self.fyfy = fy
1293 self.geo_transf_IDgeo_transf_ID = geo_transf_ID
1294 self.fiber_IDfiber_ID = fiber_ID
1295 self.min_tolmin_tol = min_tol
1296 self.max_tolmax_tol = max_tol
1297 self.max_itermax_iter = max_iter
1298
1299 # Initialized the parameters that are dependent from others
1300 self.section_name_tagsection_name_tag = "None"
1301 self.InitializedInitialized = False
1302 self.ReInitReInit(lambda_i, lambda_j, Lp, Ip, new_integration_ID, ele_ID)
1303
1304 def ReInit(self, lambda_i = -1, lambda_j = -1, Lp = -1, Ip = 5, new_integration_ID = -1, ele_ID = -1):
1305 """
1306 Implementation of the homonym abstract method.
1307 See parent class DataManagement for detailed information.
1308
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.
1317 """
1318 # Precompute some members
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)
1322 self.element_IDelement_ID = IDConvention(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID) if ele_ID == -1 else ele_ID
1323
1324 # Arguments
1325 self.LpLp = self.ComputeLpComputeLp() if Lp == -1 else Lp
1326 self.IpIp = self.ComputeIpComputeIp() if Ip == -1 else Ip
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
1329 self.new_integration_IDnew_integration_ID = self.element_IDelement_ID if new_integration_ID == -1 else new_integration_ID
1330
1331 # Members
1332 if self.section_name_tagsection_name_tag != "None": self.section_name_tagsection_name_tag = self.section_name_tagsection_name_tag + " (modified)"
1333
1334 # Data storage for loading/saving
1335 self.UpdateStoredDataUpdateStoredData()
1336
1337
1338 # Methods
1340 """
1341 Implementation of the homonym abstract method.
1342 See parent class DataManagement for detailed information.
1343 """
1344 self.datadata = [["INFO_TYPE", "GIFBElement"], # Tag for differentiating different data
1345 ["element_ID", self.element_IDelement_ID],
1346 ["section_name_tag", self.section_name_tagsection_name_tag],
1347 ["L", self.LL],
1348 ["D_bars", self.D_barsD_bars],
1349 ["fy", self.fyfy],
1350 ["Lp", self.LpLp],
1351 ["Ip", self.IpIp],
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],
1357 ["new_integration_ID", self.new_integration_IDnew_integration_ID],
1358 ["min_tol", self.min_tolmin_tol],
1359 ["max_tol", self.max_tolmax_tol],
1360 ["max_iter", self.max_itermax_iter],
1361 ["tranf_ID", self.geo_transf_IDgeo_transf_ID],
1362 ["Initialized", self.InitializedInitialized]]
1363
1364
1365 def ShowInfo(self, plot = False, block = False):
1366 """
1367 Implementation of the homonym abstract method.
1368 See parent class DataManagement for detailed information.
1369
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.
1372 """
1373 print("")
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))
1385 print("")
1386
1387 if plot:
1388 if self.InitializedInitialized:
1389 plot_member(self.element_arrayelement_array, "GIFB Element, ID = {}".format(self.element_IDelement_ID))
1390 if block:
1391 plt.show()
1392 else:
1393 print("The GIFBElement is not initialized (element not created), ID = {}".format(self.element_IDelement_ID))
1394
1395
1396 def CreateMember(self):
1397 """
1398 Method that initialises the member by calling the OpenSeesPy commands through various functions.
1399 """
1400 self.element_arrayelement_array = [[self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID]]
1401
1402 # Define integration type
1403 beamIntegration('Simpson', self.new_integration_IDnew_integration_ID, self.fiber_IDfiber_ID, self.IpIp)
1404
1405 # Define element TODO: Dr. Salehi: lambda useless
1406 element('gradientInelasticBeamColumn', self.element_IDelement_ID, self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, self.geo_transf_IDgeo_transf_ID,
1407 self.new_integration_IDnew_integration_ID, self.lambda_ilambda_i, self.lambda_jlambda_j, self.LpLp, '-iter', self.max_itermax_iter, self.min_tolmin_tol, self.max_tolmax_tol)
1408
1409 # Update class
1410 self.InitializedInitialized = True
1411 self.UpdateStoredDataUpdateStoredData()
1412
1413
1414 def Record(self, name_txt: str, data_dir: str, force_rec=True, def_rec=True, time_rec=True):
1415 """
1416 Implementation of the homonym abstract method.
1417 See parent class MemberModel for detailed information.
1418 """
1419 super().Record(self.element_IDelement_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
1420
1421
1422 def RecordNodeDef(self, name_txt: str, data_dir: str, time_rec=True):
1423 """
1424 Implementation of the homonym abstract method.
1425 See parent class MemberModel for detailed information.
1426 """
1427 super().RecordNodeDef(self.iNode_IDiNode_ID, self.jNode_IDjNode_ID, name_txt, data_dir, time_rec=time_rec)
1428
1429
1430 def ComputeLp(self):
1431 """
1432 Method that computes the plastic length using Paulay 1992.
1433
1434 @returns double: Plastic length
1435 """
1436 return (0.08*self.LL/m_unit + 0.022*self.D_barsD_bars/m_unit*self.fyfy/MPa_unit)*m_unit
1437
1438
1439 def ComputeIp(self):
1440 """
1441 Compute the number of integration points with equal distance along the element. For more information, see Salehi and Sideris 2020.
1442
1443 @returns int: Number of integration points
1444 """
1445 tmp = math.ceil(1.5*self.LL/self.LpLp + 1)
1446 if (tmp % 2) == 0:
1447 return tmp + 1
1448 else:
1449 return tmp
1450
1451
1453 """
1454 Class that is the children of GIFBElement and combine the class RCRectShape (section) to retrieve the information needed.
1455
1456 @param GIFBElement: Parent class.
1457 """
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):
1461 """
1462 Constructor of the class.
1463
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.
1480 """
1481 self.sectionsection = deepcopy(section)
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)
1485 self.section_name_tagsection_name_tagsection_name_tag = section.name_tag
1486 self.UpdateStoredDataUpdateStoredData()
1487 # Check length
1488 self._CheckL_CheckL()
1489
1490
1492 """
1493 Class that is the children of GIFBElement and combine the class FibersRectRCRectShape (fiber section) to retrieve the information needed.
1494
1495 @param GIFBElement: Parent class.
1496 """
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):
1500 """
1501 Constructor of the class.
1502
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.
1518 """
1519 self.sectionsection = deepcopy(fib.section)
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)
1523 self.section_name_tagsection_name_tagsection_name_tag = self.sectionsection.name_tag
1524 self.UpdateStoredDataUpdateStoredData()
1525 # Check length
1526 self._CheckL_CheckL()
1527
1528
1530 """
1531 Class that is the children of GIFBElement and combine the class RCCircShape (section) to retrieve the information needed.
1532
1533 @param GIFBElement: Parent class.
1534 """
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):
1538 """
1539 Constructor of the class.
1540
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.
1557 """
1558 self.sectionsection = deepcopy(section)
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)
1562 self.section_name_tagsection_name_tagsection_name_tag = section.name_tag
1563 self.UpdateStoredDataUpdateStoredData()
1564 # Check length
1565 self._CheckL_CheckL()
1566
1567
1569 """
1570 Class that is the children of GIFBElement and combine the class FibersCircRCCircShape (fiber section) to retrieve the information needed.
1571
1572 @param GIFBElement: Parent class.
1573 """
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):
1577 """
1578 Constructor of the class.
1579
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.
1595 """
1596 self.sectionsection = deepcopy(fib.section)
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)
1600 self.section_name_tagsection_name_tagsection_name_tag = self.sectionsection.name_tag
1601 self.UpdateStoredDataUpdateStoredData()
1602 # Check length
1603 self._CheckL_CheckL()
1604
1605
1606
1607
Class that is the children of ElasticElement and combine the class SteelIShape (section) to retrieve ...
Definition: MemberModel.py:635
def __init__(self, int iNode_ID, int jNode_ID, SteelIShape section, int geo_transf_ID, ele_ID=-1)
Constructor of the class.
Definition: MemberModel.py:641
Class that handles the storage and manipulation of a elastic element's information (mechanical and ge...
Definition: MemberModel.py:496
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
Definition: MemberModel.py:579
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: MemberModel.py:562
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
Definition: MemberModel.py:605
def __init__(self, int iNode_ID, int jNode_ID, A, E, Iy, int geo_transf_ID, ele_ID=-1)
Constructor of the class.
Definition: MemberModel.py:502
def ReInit(self, ele_ID=-1)
Implementation of the homonym abstract method.
Definition: MemberModel.py:544
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
Definition: MemberModel.py:627
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Definition: MemberModel.py:619
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...
Definition: MemberModel.py:964
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.
Definition: MemberModel.py:971
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...
Definition: MemberModel.py:22
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...
Definition: MemberModel.py:59
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...
Definition: MemberModel.py:29
WIP: Class that is the children of PanelZone and it's used for the panel zone in a RCS (RC column con...
Definition: MemberModel.py:306
def __init__(self, int master_node_ID, RCRectShape col, SteelIShape beam, int geo_transf_ID, int mat_ID, rigid=RIGID)
Constructor of the class.
Definition: MemberModel.py:313
Class that is the children of PanelZoneSteelIShape and automatically create the spring material model...
Definition: MemberModel.py:334
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, t_dp=0, rigid=RIGID)
Constructor of the class.
Definition: MemberModel.py:340
Class that is the children of PanelZoneSteelIShape and automatically create the spring material model...
Definition: MemberModel.py:361
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, t_dp=0, rigid=RIGID)
Constructor of the class.
Definition: MemberModel.py:367
Class that is the children of PanelZone and combine the class SteelIShape (section) to retrieve the i...
Definition: MemberModel.py:279
def __init__(self, int master_node_ID, SteelIShape col, SteelIShape beam, int geo_transf_ID, int mat_ID, rigid=RIGID)
Constructor of the class.
Definition: MemberModel.py:285
Class that handles the storage and manipulation of a panel zone's information (mechanical and geometr...
Definition: MemberModel.py:94
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.
Definition: MemberModel.py:100
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
Definition: MemberModel.py:189
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: MemberModel.py:169
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
Definition: MemberModel.py:220
def ReInit(self)
Implementation of the homonym abstract method.
Definition: MemberModel.py:152
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
Definition: MemberModel.py:264
def Record(self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
Implementation of the homonym abstract method.
Definition: MemberModel.py:256
Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retri...
Definition: MemberModel.py:891
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.
Definition: MemberModel.py:900
Class that is the children of SpringBasedElement and combine the class SteelIShape (section) to retri...
Definition: MemberModel.py:854
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.
Definition: MemberModel.py:861
Class that handles the storage and manipulation of a spring-based element's information (mechanical a...
Definition: MemberModel.py:659
def ShowInfo(self, plot=False, block=False)
Implementation of the homonym abstract method.
Definition: MemberModel.py:771
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: MemberModel.py:749
def CreateMember(self)
Method that initialises the member by calling the OpenSeesPy commands through various functions.
Definition: MemberModel.py:799
def ReInit(self, ele_ID=-1)
Implementation of the homonym abstract method.
Definition: MemberModel.py:718
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.
Definition: MemberModel.py:825
def RecordNodeDef(self, str name_txt, str data_dir, time_rec=True)
Implementation of the homonym abstract method.
Definition: MemberModel.py:846
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.
Definition: MemberModel.py:665
def Pin(int NodeRID, int NodeCID)
Function that constrains the translational DOF with a multi-point constraint.
Definition: Connections.py:22
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.
Definition: Connections.py:42
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.
Definition: MemberModel.py:432
def DefinePanelZoneNodes(int MasterNodeID, MidPanelZoneWidth, MidPanelZoneHeight)
Function that defines the remaining 10 nodes of a panel zone given the dimensions and the master node...
Definition: MemberModel.py:388