OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
PanelZone Class Reference

Class that handles the storage and manipulation of a panel zone's information (mechanical and geometrical parameters, etc) and the initialisation in the model. More...

Inheritance diagram for PanelZone:
MemberModel PanelZoneRCS PanelZoneSteelIShape PanelZoneSteelIShapeGupta1999 PanelZoneSteelIShapeSkiadopoulos2021

Public Member Functions

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. More...
 
def CreateMember (self)
 Method that initialises the member by calling the OpenSeesPy commands through various functions. More...
 
def Record (self, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
 Implementation of the homonym abstract method. More...
 
def RecordNodeDef (self, str name_txt, str data_dir, time_rec=True)
 Implementation of the homonym abstract method. More...
 
def ReInit (self)
 Implementation of the homonym abstract method. More...
 
def ShowInfo (self, plot=False, block=False)
 Implementation of the homonym abstract method. More...
 
def UpdateStoredData (self)
 Implementation of the homonym abstract method. More...
 
def Record (self, ele_ID, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
 Abstract method that records the forces, deformation and time of the member associated with the class. More...
 
def RecordNodeDef (self, int iNode_ID, int jNode_ID, str name_txt, str data_dir, time_rec=True)
 Abstract method that records the deformation and time of the member's nodes associated with the class. More...
 

Public Attributes

 A_rigid
 
 beam_section_name_tag
 
 col_section_name_tag
 
 data
 
 E
 
 element_array
 
 geo_transf_ID
 
 I_rigid
 
 Initialized
 
 iNode_ID
 
 jNode_ID
 
 master_node_ID
 
 mat_ID
 
 mid_panel_zone_height
 
 mid_panel_zone_width
 
 pin_corners
 
 spring_ID
 

Detailed Description

Class that handles the storage and manipulation of a panel zone's information (mechanical and geometrical parameters, etc) and the initialisation in the model.

Parameters
MemberModelParent abstract class.

Definition at line 94 of file MemberModel.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
master_node_ID(int): ID of the master node (central top node that should be a grid node).
mid_panel_zone_width(float): Mid panel zone width.
mid_panel_zone_height(float): Mid panel zone height.
E(float): Young modulus.
A_rigid(float): A very rigid area.
I_rigid(float): A very rigid moment of inertia.
geo_transf_ID(int): A geometric transformation (for more information, see OpenSeesPy documentation).
mat_ID(int): ID of the material model for the panel zone spring.
pin_corners(bool, optional): Option to pin the corners (xy03/xy04, xy06/xy07, xy09/xy10) or not. Used for RCS models. Defaults to True.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValuemid_panel_zone_width needs to be positive.
NegativeValuemid_panel_zone_height needs to be positive.
NegativeValueE needs to be positive.
NegativeValueA_rigid needs to be positive.
NegativeValueI_rigid needs to be positive.
NegativeValuegeo_tranf_ID needs to be a positive integer.
NegativeValuemat_ID needs to be a positive integer.

Reimplemented in PanelZoneRCS, PanelZoneSteelIShape, PanelZoneSteelIShapeGupta1999, and PanelZoneSteelIShapeSkiadopoulos2021.

Definition at line 100 of file MemberModel.py.

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_ID = master_node_ID
136 self.mid_panel_zone_width = mid_panel_zone_width
137 self.mid_panel_zone_height = mid_panel_zone_height
138 self.E = E
139 self.A_rigid = A_rigid
140 self.I_rigid = I_rigid
141 self.geo_transf_ID = geo_transf_ID
142 self.mat_ID = mat_ID
143 self.pin_corners = pin_corners
144
145 # Initialized the parameters that are dependent from others
146 self.col_section_name_tag = "None"
147 self.beam_section_name_tag = "None"
148 self.Initialized = False
149 self.ReInit()
150
151

Member Function Documentation

◆ CreateMember()

def CreateMember (   self)

Method that initialises the member by calling the OpenSeesPy commands through various functions.

Definition at line 220 of file MemberModel.py.

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_ID, self.mid_panel_zone_width, self.mid_panel_zone_height)
226 xy1 = IDConvention(self.master_node_ID, 1)
227 xy01 = IDConvention(self.master_node_ID, 1, 1)
228 xy03 = IDConvention(self.master_node_ID, 3, 1)
229 xy04 = IDConvention(self.master_node_ID, 4, 1)
230 xy06 = IDConvention(self.master_node_ID, 6, 1)
231 xy07 = IDConvention(self.master_node_ID, 7, 1)
232 xy09 = IDConvention(self.master_node_ID, 9, 1)
233 xy10 = IDConvention(self.master_node_ID, 10)
234
235 # Define rigid elements
236 self.element_array = DefinePanelZoneElements(self.master_node_ID, self.E, self.A_rigid, self.I_rigid, self.geo_transf_ID)
237
238 # Define zero length element
239 self.spring_ID = IDConvention(xy1, xy01)
240 RotationalSpring(self.spring_ID, xy1, xy01, self.mat_ID)
241 self.element_array.append([self.spring_ID, xy1, xy01])
242 self.iNode_ID = xy1
243 self.jNode_ID = xy01
244
245 # Pin connections
246 if self.pin_corners:
247 Pin(xy03, xy04)
248 Pin(xy06, xy07)
249 Pin(xy09, xy10)
250
251 # Update class
252 self.Initialized = True
253 self.UpdateStoredData()
254
255
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
def IDConvention(int prefix, int suffix, n_zeros_between=0)
Function used to construct IDs for elements and offgrid nodes.
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

◆ Record()

def Record (   self,
str  name_txt,
str  data_dir,
  force_rec = True,
  def_rec = True,
  time_rec = True 
)

Implementation of the homonym abstract method.

See parent class MemberModel for detailed information.

Reimplemented from MemberModel.

Definition at line 256 of file MemberModel.py.

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_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
262
263
Module for the member model.
Definition: MemberModel.py:1

◆ RecordNodeDef()

def RecordNodeDef (   self,
str  name_txt,
str  data_dir,
  time_rec = True 
)

Implementation of the homonym abstract method.

See parent class MemberModel for detailed information.

Reimplemented from MemberModel.

Definition at line 264 of file MemberModel.py.

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_ID, self.jNode_ID, name_txt, data_dir, time_rec=time_rec)
270
271

◆ ReInit()

def ReInit (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 152 of file MemberModel.py.

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_ID = -1
159
160 # Members
161 if self.col_section_name_tag != "None": self.col_section_name_tag = self.col_section_name_tag + " (modified)"
162 if self.beam_section_name_tag != "None": self.beam_section_name_tag = self.beam_section_name_tag + " (modified)"
163
164 # Data storage for loading/saving
165 self.UpdateStoredData()
166
167
Module with the parent abstract class DataManagement.

◆ ShowInfo()

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

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

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

Definition at line 189 of file MemberModel.py.

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_ID))
199 print("Section associated, column: {} ".format(self.col_section_name_tag))
200 print("Section associated, beam: {} ".format(self.beam_section_name_tag))
201 print("Material model of the panel zone ID = {}".format(self.mat_ID))
202 print("Spring ID = {} (if -1, not defined yet)".format(self.spring_ID))
203 print("Mid panel zone width = {} mm".format(self.mid_panel_zone_width/mm_unit))
204 print("Mid panel zone height = {} mm".format(self.mid_panel_zone_height/mm_unit))
205 print("Young modulus E = {} GPa".format(self.E/GPa_unit))
206 print("Area of the elements (rigid) = {} mm2".format(self.A_rigid/mm2_unit))
207 print("Moment of inetia of the elements (strong axis, rigid) = {} mm4".format(self.I_rigid/mm4_unit))
208 print("Geometric transformation = {}".format(self.geo_transf_ID))
209 print("")
210
211 if plot:
212 if self.Initialized:
213 plot_member(self.element_array, "Panel zone, ID = {}".format(self.master_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_ID))
218
219
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.

◆ UpdateStoredData()

def UpdateStoredData (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 169 of file MemberModel.py.

169 def UpdateStoredData(self):
170 """
171 Implementation of the homonym abstract method.
172 See parent class DataManagement for detailed information.
173 """
174 self.data = [["INFO_TYPE", "PanelZone"], # Tag for differentiating different data
175 ["master_node_ID", self.master_node_ID],
176 ["col_section_name_tag", self.col_section_name_tag],
177 ["beam_section_name_tag", self.beam_section_name_tag],
178 ["mat_ID", self.mat_ID],
179 ["spring_ID", self.spring_ID],
180 ["mid_panel_zone_width", self.mid_panel_zone_width],
181 ["mid_panel_zone_height", self.mid_panel_zone_height],
182 ["E", self.E],
183 ["A_rigid", self.A_rigid],
184 ["I_rigid", self.I_rigid],
185 ["tranf_ID", self.geo_transf_ID],
186 ["Initialized", self.Initialized]]
187
188

Member Data Documentation

◆ A_rigid

A_rigid

Definition at line 139 of file MemberModel.py.

◆ beam_section_name_tag

beam_section_name_tag

Definition at line 147 of file MemberModel.py.

◆ col_section_name_tag

col_section_name_tag

Definition at line 146 of file MemberModel.py.

◆ data

data

Definition at line 174 of file MemberModel.py.

◆ E

E

Definition at line 138 of file MemberModel.py.

◆ element_array

element_array

Definition at line 236 of file MemberModel.py.

◆ geo_transf_ID

geo_transf_ID

Definition at line 141 of file MemberModel.py.

◆ I_rigid

I_rigid

Definition at line 140 of file MemberModel.py.

◆ Initialized

Initialized

Definition at line 148 of file MemberModel.py.

◆ iNode_ID

iNode_ID

Definition at line 242 of file MemberModel.py.

◆ jNode_ID

jNode_ID

Definition at line 243 of file MemberModel.py.

◆ master_node_ID

master_node_ID

Definition at line 135 of file MemberModel.py.

◆ mat_ID

mat_ID

Definition at line 142 of file MemberModel.py.

◆ mid_panel_zone_height

mid_panel_zone_height

Definition at line 137 of file MemberModel.py.

◆ mid_panel_zone_width

mid_panel_zone_width

Definition at line 136 of file MemberModel.py.

◆ pin_corners

pin_corners

Definition at line 143 of file MemberModel.py.

◆ spring_ID

spring_ID

Definition at line 158 of file MemberModel.py.


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