OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
GIFBElement Class Reference

Class that handles the storage and manipulation of a Gradient-Inelastic Flexibility-based element's information (mechanical and geometrical parameters, etc) and the initialisation in the model. More...

Inheritance diagram for GIFBElement:
MemberModel GIFBElementFibersCircRCCircShape GIFBElementFibersRectRCRectShape GIFBElementRCCircShape GIFBElementRCRectShape

Public Member Functions

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. More...
 
def ComputeIp (self)
 Compute the number of integration points with equal distance along the element. More...
 
def ComputeLp (self)
 Method that computes the plastic length using Paulay 1992. 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, lambda_i=-1, lambda_j=-1, Lp=-1, Ip=5, new_integration_ID=-1, ele_ID=-1)
 Implementation of the homonym abstract method. More...
 
def ShowInfo (self, plot=False, block=False)
 Implementation of the homonym abstract method. More...
 
def UpdateStoredData (self)
 Implementation of the homonym abstract method. More...
 
def Record (self, ele_ID, str name_txt, str data_dir, force_rec=True, def_rec=True, time_rec=True)
 Abstract method that records the forces, deformation and time of the member associated with the class. More...
 
def RecordNodeDef (self, int iNode_ID, int jNode_ID, str name_txt, str data_dir, time_rec=True)
 Abstract method that records the deformation and time of the member's nodes associated with the class. More...
 

Public Attributes

 D_bars
 
 data
 
 element_array
 
 element_ID
 
 fiber_ID
 
 fy
 
 geo_transf_ID
 
 Initialized
 
 iNode_ID
 
 Ip
 
 jNode_ID
 
 L
 
 lambda_i
 
 lambda_j
 
 Lp
 
 max_iter
 
 max_tol
 
 min_tol
 
 new_integration_ID
 
 section_name_tag
 

Detailed Description

Class that handles the storage and manipulation of a Gradient-Inelastic Flexibility-based element's information (mechanical and geometrical parameters, etc) and the initialisation in the model.

The integration technique is Simpson. For more information, see Sideris and Salehi 2016, 2017 and 2020.

Parameters
MemberModelParent abstract class.

Definition at line 1221 of file MemberModel.py.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
iNode_ID(int): ID of the first end node.
jNode_ID(int): ID of the second end node.
fiber_ID(int): ID of the fiber section.
D_bars(float): Diameter of the vertical reinforcing bars.
fy(float): Yield stress of the reinforcing bars.
geo_transf_ID(int): The geometric transformation (for more information, see OpenSeesPy documentation).
lambda_i(float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge). Defaults to -1, e.g. plastic hinge in the end i.
lambda_j(float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge). Defaults to -1, e.g. plastic hinge in the end j.
Lp(float, optional): Plastic hinge length. Defaults to -1, e.g. computed in ReInit().
Ip(int, optional): Number of integration points (min. 3). Defaults to 5.
new_integration_ID(int, optional): ID of the integration technique. Defaults to -1, e.g. computed in ReInit().
min_tol(float, optional): Minimal tolerance for the integration convergence. Defaults to TOL_INTEGRATION (Units).
max_tol(float, optional): Maximal tolerance for the integration convergence. Defaults to TOL_INTEGRATION*1e4.
max_iter(int, optional): Maximal number of iteration to reach the integretion convergence. Defaults to MAX_ITER_INTEGRATION (Units).
ele_ID(int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValueID needs to be a positive integer.
NegativeValueID needs to be a positive integer.
NegativeValueD_bars needs to be positive.
NegativeValuefy needs to be positive.
NegativeValueID needs to be a positive integer.
NegativeValuelambda_i needs to be positive.
NegativeValuelambda_j needs to be positive.
NegativeValueNo plastic length defined.
NegativeValueLp needs to be positive, if different from -1.
NegativeValueIp needs to be a positive integer bigger than 3, if different from -1.
NegativeValueID needs to be a positive integer.
NegativeValuemin_tol needs to be positive.
NegativeValuemax_tol needs to be positive.
NegativeValuemax_iter needs to be a positive integer.
NegativeValueID needs to be a positive integer, if different from -1.

Reimplemented in GIFBElementFibersCircRCCircShape, GIFBElementFibersRectRCRectShape, GIFBElementRCCircShape, and GIFBElementRCRectShape.

Definition at line 1229 of file MemberModel.py.

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_ID = iNode_ID
1290 self.jNode_ID = jNode_ID
1291 self.D_bars = D_bars
1292 self.fy = fy
1293 self.geo_transf_ID = geo_transf_ID
1294 self.fiber_ID = fiber_ID
1295 self.min_tol = min_tol
1296 self.max_tol = max_tol
1297 self.max_iter = max_iter
1298
1299 # Initialized the parameters that are dependent from others
1300 self.section_name_tag = "None"
1301 self.Initialized = False
1302 self.ReInit(lambda_i, lambda_j, Lp, Ip, new_integration_ID, ele_ID)
1303
def IDConvention(int prefix, int suffix, n_zeros_between=0)
Function used to construct IDs for elements and offgrid nodes.

Member Function Documentation

◆ ComputeIp()

def ComputeIp (   self)

Compute the number of integration points with equal distance along the element.

For more information, see Salehi and Sideris 2020.

Returns
int: Number of integration points

Definition at line 1439 of file MemberModel.py.

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.L/self.Lp + 1)
1446 if (tmp % 2) == 0:
1447 return tmp + 1
1448 else:
1449 return tmp
1450
1451

◆ ComputeLp()

def ComputeLp (   self)

Method that computes the plastic length using Paulay 1992.

Returns
double: Plastic length

Definition at line 1430 of file MemberModel.py.

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.L/m_unit + 0.022*self.D_bars/m_unit*self.fy/MPa_unit)*m_unit
1437
1438

◆ CreateMember()

def CreateMember (   self)

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

Definition at line 1396 of file MemberModel.py.

1396 def CreateMember(self):
1397 """
1398 Method that initialises the member by calling the OpenSeesPy commands through various functions.
1399 """
1400 self.element_array = [[self.element_ID, self.iNode_ID, self.jNode_ID]]
1401
1402 # Define integration type
1403 beamIntegration('Simpson', self.new_integration_ID, self.fiber_ID, self.Ip)
1404
1405 # Define element TODO: Dr. Salehi: lambda useless
1406 element('gradientInelasticBeamColumn', self.element_ID, self.iNode_ID, self.jNode_ID, self.geo_transf_ID,
1407 self.new_integration_ID, self.lambda_i, self.lambda_j, self.Lp, '-iter', self.max_iter, self.min_tol, self.max_tol)
1408
1409 # Update class
1410 self.Initialized = True
1411 self.UpdateStoredData()
1412
1413

◆ 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 1414 of file MemberModel.py.

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_ID, name_txt, data_dir, force_rec=force_rec, def_rec=def_rec, time_rec=time_rec)
1420
1421
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 1422 of file MemberModel.py.

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

◆ ReInit()

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.

See parent class DataManagement for detailed information.

Parameters
lambda_i(float, optional): Fraction of beam length over the plastic hinge length at end i (0 = no plastic hinge). Defaults to -1, e.g. plastic hinge in the end i.
lambda_j(float, optional): Fraction of beam length over the plastic hinge length at end j (0 = no plastic hinge). Defaults to -1, e.g. plastic hinge in the end j.
Lp(float, optional): Plastic hinge length. Defaults to -1, e.g. computed here.
Ip(int, optional): Number of integration points (min. 3). Defaults to 5.
new_integration_ID(int, optional): ID of the integration technique. Defaults to -1, e.g. computed in ReInit().
ele_ID(int, optional): Optional ID of the element. Defaults to -1, e.g. use IDConvention to define it.

Definition at line 1304 of file MemberModel.py.

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_ID))
1320 jNode = np.array(nodeCoord(self.jNode_ID))
1321 self.L = np.linalg.norm(iNode-jNode)
1322 self.element_ID = IDConvention(self.iNode_ID, self.jNode_ID) if ele_ID == -1 else ele_ID
1323
1324 # Arguments
1325 self.Lp = self.ComputeLp() if Lp == -1 else Lp
1326 self.Ip = self.ComputeIp() if Ip == -1 else Ip
1327 self.lambda_i = self.Lp/self.L if lambda_i == -1 else lambda_i
1328 self.lambda_j = self.Lp/self.L if lambda_j == -1 else lambda_j
1329 self.new_integration_ID = self.element_ID if new_integration_ID == -1 else new_integration_ID
1330
1331 # Members
1332 if self.section_name_tag != "None": self.section_name_tag = self.section_name_tag + " (modified)"
1333
1334 # Data storage for loading/saving
1335 self.UpdateStoredData()
1336
1337
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 1365 of file MemberModel.py.

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_ID))
1375 print("Fiber associated, ID = {} ".format(self.fiber_ID))
1376 print("Integration type 'Simpson', ID = {}".format(self.new_integration_ID))
1377 print("Section associated {} ".format(self.section_name_tag))
1378 print("Length L = {} m".format(self.L/m_unit))
1379 print("Diameter of the reinforcing bars D_bars = {} mm2".format(self.D_bars/mm2_unit))
1380 print("Reinforcing bar steel strength fy = {} MPa".format(self.fy/MPa_unit))
1381 print("Plastic length Lp = {} mm".format(self.Lp/mm_unit))
1382 print("Number of integration points along the element Ip = {}, max iter = {}, (min, max tol) = ({},{})".format(self.Ip, self.max_iter, self.min_tol, self.max_tol))
1383 print("Lambda_i = {} and lambda_j = {}".format(self.lambda_i, self.lambda_j))
1384 print("Geometric transformation = {}".format(self.geo_transf_ID))
1385 print("")
1386
1387 if plot:
1388 if self.Initialized:
1389 plot_member(self.element_array, "GIFB Element, ID = {}".format(self.element_ID))
1390 if block:
1391 plt.show()
1392 else:
1393 print("The GIFBElement is not initialized (element not created), ID = {}".format(self.element_ID))
1394
1395
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 1339 of file MemberModel.py.

1339 def UpdateStoredData(self):
1340 """
1341 Implementation of the homonym abstract method.
1342 See parent class DataManagement for detailed information.
1343 """
1344 self.data = [["INFO_TYPE", "GIFBElement"], # Tag for differentiating different data
1345 ["element_ID", self.element_ID],
1346 ["section_name_tag", self.section_name_tag],
1347 ["L", self.L],
1348 ["D_bars", self.D_bars],
1349 ["fy", self.fy],
1350 ["Lp", self.Lp],
1351 ["Ip", self.Ip],
1352 ["iNode_ID", self.iNode_ID],
1353 ["lambda_i", self.lambda_i],
1354 ["jNode_ID", self.jNode_ID],
1355 ["lambda_j", self.lambda_j],
1356 ["fiber_ID", self.fiber_ID],
1357 ["new_integration_ID", self.new_integration_ID],
1358 ["min_tol", self.min_tol],
1359 ["max_tol", self.max_tol],
1360 ["max_iter", self.max_iter],
1361 ["tranf_ID", self.geo_transf_ID],
1362 ["Initialized", self.Initialized]]
1363
1364

Member Data Documentation

◆ D_bars

D_bars

Definition at line 1291 of file MemberModel.py.

◆ data

data

Definition at line 1344 of file MemberModel.py.

◆ element_array

element_array

Definition at line 1400 of file MemberModel.py.

◆ element_ID

element_ID

Definition at line 1322 of file MemberModel.py.

◆ fiber_ID

fiber_ID

Definition at line 1294 of file MemberModel.py.

◆ fy

fy

Definition at line 1292 of file MemberModel.py.

◆ geo_transf_ID

geo_transf_ID

Definition at line 1293 of file MemberModel.py.

◆ Initialized

Initialized

Definition at line 1301 of file MemberModel.py.

◆ iNode_ID

iNode_ID

Definition at line 1289 of file MemberModel.py.

◆ Ip

Ip

Definition at line 1326 of file MemberModel.py.

◆ jNode_ID

jNode_ID

Definition at line 1290 of file MemberModel.py.

◆ L

L

Definition at line 1321 of file MemberModel.py.

◆ lambda_i

lambda_i

Definition at line 1327 of file MemberModel.py.

◆ lambda_j

lambda_j

Definition at line 1328 of file MemberModel.py.

◆ Lp

Lp

Definition at line 1325 of file MemberModel.py.

◆ max_iter

max_iter

Definition at line 1297 of file MemberModel.py.

◆ max_tol

max_tol

Definition at line 1296 of file MemberModel.py.

◆ min_tol

min_tol

Definition at line 1295 of file MemberModel.py.

◆ new_integration_ID

new_integration_ID

Definition at line 1329 of file MemberModel.py.

◆ section_name_tag

section_name_tag

Definition at line 1300 of file MemberModel.py.


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