OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
FibersCirc Class Reference

Class that stores funcions, material properties, geometric and mechanical parameters for a circular RC fiber section. More...

Inheritance diagram for FibersCirc:
Fibers FibersCircRCCircShape

Public Member Functions

def __init__ (self, int ID, b, e, D_bars, Ay, n_bars, D_hoops, int unconf_mat_ID, int conf_mat_ID, int bars_mat_ID, list discr_core, list discr_cover, alpha_i=0.0, GJ=0.0)
 Constructor of the class. More...
 
def CreateFibers (self)
 Method that initialise the fiber by calling the OpenSeesPy commands. 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...
 

Public Attributes

 alpha_i
 
 Ay
 
 b
 
 bars_mat_ID
 
 conf_mat_ID
 
 D_bars
 
 D_hoops
 
 data
 
 discr_core
 
 discr_cover
 
 e
 
 fib_sec
 
 GJ
 
 ID
 
 Initialized
 
 n_bars
 
 r_bars
 
 r_core
 
 section_name_tag
 
 unconf_mat_ID
 

Detailed Description

Class that stores funcions, material properties, geometric and mechanical parameters for a circular RC fiber section.

Coordinates: plotting coordinte (x, y) = fiber section coordinate (z, y) = (-x, y). For more information, see the OpenSeesPy documentation.

Parameters
FibersParent abstract class.

Definition at line 263 of file Fibers.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
int  ID,
  b,
  e,
  D_bars,
  Ay,
  n_bars,
  D_hoops,
int  unconf_mat_ID,
int  conf_mat_ID,
int  bars_mat_ID,
list  discr_core,
list  discr_cover,
  alpha_i = 0.0,
  GJ = 0.0 
)

Constructor of the class.

Parameters
ID(int): Unique fiber section ID.
b(float): Width of the section.
e(float): Concrete cover.
D_bars(float): Diameter of vertical reinforcing bars.
Ay(float): Area of one vertical reinforcing bar.
n_bars(float): Number of reinforcement (allow float for computing the equivalent n_bars with different reinforcement areas).
D_hoops(float): Diameter of the hoops.
unconf_mat_ID(int): ID of material model that will be assigned to the unconfined fibers.
conf_mat_ID(int): ID of material model that will be assigned to the confined fibers.
bars_mat_ID(int): ID of material model that will be assigned to the reinforcing bars fibers.
discr_core(list): List with two entries: number of subdivisions (fibers) in the circumferential direction (number of wedges), number of subdivisions (fibers) in the radial direction (number of rings) for the confined core.
discr_cover(list): List with two entries: number of subdivisions (fibers) in the circumferential direction (number of wedges), number of subdivisions (fibers) in the radial direction (number of rings) for the unconfined cover.
alpha_i(float, optional): Angle in deg of the first vertical rebars with respect to the y axis, counterclockwise. Defaults to 0.0.
GJ(float, optional): Linear-elastic torsional stiffness assigned to the section. Defaults to 0.0, assume no torsional stiffness.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValueb needs to be positive.
NegativeValuee needs to be positive.
InconsistentGeometrye can't be bigger than half of the width b.
NegativeValueD_bars needs to be positive.
NegativeValueAy needs to be positive.
NegativeValuen_bars needs to be positive.
NegativeValueD_hoops needs to be positive.
NegativeValueunconf_mat_ID needs to be a positive integer.
NegativeValueconf_mat_ID needs to be a positive integer.
NegativeValuebars_mat_ID needs to be a positive integer.
WrongDimensiondiscr_core has a length of 2.
WrongDimensiondiscr_cover has a length of 2.
NegativeValueGJ needs to be positive.

Reimplemented in FibersCircRCCircShape.

Definition at line 270 of file Fibers.py.

271 discr_core: list, discr_cover: list, alpha_i = 0.0, GJ = 0.0):
272 """
273 Constructor of the class.
274
275 @param ID (int): Unique fiber section ID.
276 @param b (float): Width of the section.
277 @param e (float): Concrete cover.
278 @param D_bars (float): Diameter of vertical reinforcing bars.
279 @param Ay (float): Area of one vertical reinforcing bar.
280 @param n_bars (float): Number of reinforcement (allow float for computing the equivalent n_bars with different reinforcement areas).
281 @param D_hoops (float): Diameter of the hoops.
282 @param unconf_mat_ID (int): ID of material model that will be assigned to the unconfined fibers.
283 @param conf_mat_ID (int): ID of material model that will be assigned to the confined fibers.
284 @param bars_mat_ID (int): ID of material model that will be assigned to the reinforcing bars fibers.
285 @param discr_core (list): List with two entries: number of subdivisions (fibers) in the circumferential direction (number of wedges),
286 number of subdivisions (fibers) in the radial direction (number of rings) for the confined core.
287 @param discr_cover (list): List with two entries: number of subdivisions (fibers) in the circumferential direction (number of wedges),
288 number of subdivisions (fibers) in the radial direction (number of rings) for the unconfined cover.
289 @param alpha_i (float, optional): Angle in deg of the first vertical rebars with respect to the y axis, counterclockwise. Defaults to 0.0.
290 @param GJ (float, optional): Linear-elastic torsional stiffness assigned to the section. Defaults to 0.0, assume no torsional stiffness.
291
292 @exception NegativeValue: ID needs to be a positive integer.
293 @exception NegativeValue: b needs to be positive.
294 @exception NegativeValue: e needs to be positive.
295 @exception InconsistentGeometry: e can't be bigger than half of the width b.
296 @exception NegativeValue: D_bars needs to be positive.
297 @exception NegativeValue: Ay needs to be positive.
298 @exception NegativeValue: n_bars needs to be positive.
299 @exception NegativeValue: D_hoops needs to be positive.
300 @exception NegativeValue: unconf_mat_ID needs to be a positive integer.
301 @exception NegativeValue: conf_mat_ID needs to be a positive integer.
302 @exception NegativeValue: bars_mat_ID needs to be a positive integer.
303 @exception WrongDimension: discr_core has a length of 2.
304 @exception WrongDimension: discr_cover has a length of 2.
305 @exception NegativeValue: GJ needs to be positive.
306 """
307 # Check
308 if ID < 1: raise NegativeValue()
309 if b < 0: raise NegativeValue()
310 if e < 0: raise NegativeValue()
311 if e > b/2: raise InconsistentGeometry()
312 if D_bars < 0: raise NegativeValue()
313 if Ay < 0: raise NegativeValue()
314 if n_bars < 0: raise NegativeValue()
315 if D_hoops < 0: raise NegativeValue()
316 if unconf_mat_ID < 1: raise NegativeValue()
317 if conf_mat_ID < 1: raise NegativeValue()
318 if bars_mat_ID < 1: raise NegativeValue()
319 if len(discr_core) != 2: raise WrongDimension()
320 if len(discr_cover) != 2: raise WrongDimension()
321 if GJ < 0: raise NegativeValue()
322
323 # Arguments
324 self.ID = ID
325 self.b = b
326 self.e = e
327 self.D_bars = D_bars
328 self.Ay = Ay
329 self.n_bars = n_bars
330 self.D_hoops = D_hoops
331 self.unconf_mat_ID = unconf_mat_ID
332 self.conf_mat_ID = conf_mat_ID
333 self.bars_mat_ID = bars_mat_ID
334 self.discr_core = copy(discr_core)
335 self.discr_cover = copy(discr_cover)
336 self.alpha_i = alpha_i
337 self.GJ = GJ
338
339 # Initialized the parameters that are dependent from others
340 self.section_name_tag = "None"
341 self.Initialized = False
342 self.ReInit()
343

Member Function Documentation

◆ CreateFibers()

def CreateFibers (   self)

Method that initialise the fiber by calling the OpenSeesPy commands.

Definition at line 426 of file Fibers.py.

426 def CreateFibers(self):
427 """
428 Method that initialise the fiber by calling the OpenSeesPy commands.
429 """
430 create_fiber_section(self.fib_sec)
431 self.Initialized = True
432 self.UpdateStoredData()
433
434
def create_fiber_section(fiber_info)
Initialise fiber cross-section with OpenSeesPy commands.
Definition: Fibers.py:857

◆ ReInit()

def ReInit (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 344 of file Fibers.py.

344 def ReInit(self):
345 """
346 Implementation of the homonym abstract method.
347 See parent class DataManagement for detailed information.
348 """
349 # Memebers
350 if self.section_name_tag != "None": self.section_name_tag = self.section_name_tag + " (modified)"
351
352 # Parameters
353 self.r_bars = self.b/2 - self.e - self.D_hoops - self.D_bars/2
354 self.r_core = self.b/2 - self.e - self.D_hoops/2
355
356 # Create the concrete core fibers
357 core_cmd = ['patch', 'circ', self.conf_mat_ID, *self.discr_core, 0, 0, 0, self.r_core]
358
359 # Create the concrete cover fibers
360 cover_cmd = ['patch', 'circ', self.unconf_mat_ID, *self.discr_cover, 0, 0, self.r_core, self.b/2]
361 self.fib_sec = [['section', 'Fiber', self.ID, '-GJ', self.GJ],
362 core_cmd, cover_cmd]
363
364 # Create the reinforcing fibers
365 bars_cmd = ['layer', 'circ', self.bars_mat_ID, self.n_bars, self.Ay, 0, 0, self.r_bars, self.alpha_i]
366 self.fib_sec.append(bars_cmd)
367
368 # Data storage for loading/saving
369 self.UpdateStoredData()
370
371
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 399 of file Fibers.py.

399 def ShowInfo(self, plot = False, block = False):
400 """
401 Implementation of the homonym abstract method.
402 See parent class DataManagement for detailed information.
403
404 @param plot (bool, optional): Option to show the plot of the material model. Defaults to False.
405 @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.
406 """
407 print("")
408 print("Requested info for FibersCirc, ID = {}".format(self.ID))
409 print("Section associated: {} ".format(self.section_name_tag))
410 print("Base b = {} mm and concrete cover e = {} mm".format(self.b/mm_unit, self.e/mm_unit))
411 print("Radius of the confined core r_core = {} mm, radius of the bars range r_bars = {} mm and initial angle alpha_i = {} deg".format(self.r_core/mm_unit, self.r_bars/mm_unit, self.alpha_i))
412 print("Confined material model ID = {}".format(self.conf_mat_ID))
413 print("Unconfined material model ID = {}".format(self.unconf_mat_ID))
414 print("Bars material model ID = {}".format(self.bars_mat_ID))
415 print("Discretisation in the core [number of wedges, number of rings] = {}".format(self.discr_core))
416 print("Discretisation in the lateral covers [number of wedges, number of rings] = {}".format(self.discr_cover))
417 print("")
418
419 if plot:
420 plot_fiber_section(self.fib_sec, matcolor=['#808080', '#D3D3D3', 'k'])
421
422 if block:
423 plt.show()
424
425
def plot_fiber_section(fiber_info, fill_shapes=True, matcolor=['#808080', '#D3D3D3', 'r', 'b', 'g', 'y'])
Plot fiber cross-section.
Definition: Fibers.py:673

◆ UpdateStoredData()

def UpdateStoredData (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 373 of file Fibers.py.

373 def UpdateStoredData(self):
374 """
375 Implementation of the homonym abstract method.
376 See parent class DataManagement for detailed information.
377 """
378 self.data = [["INFO_TYPE", "FibersCirc"], # Tag for differentiating different data
379 ["ID", self.ID],
380 ["section_name_tag", self.section_name_tag],
381 ["b", self.b],
382 ["e", self.e],
383 ["r_core", self.r_core],
384 ["D_bars", self.D_bars],
385 ["Ay", self.Ay],
386 ["n_bars", self.n_bars],
387 ["r_bars", self.r_bars],
388 ["D_hoops", self.D_hoops],
389 ["alpha_i", self.alpha_i],
390 ["GJ", self.GJ],
391 ["conf_mat_ID", self.conf_mat_ID],
392 ["discr_core", self.discr_core],
393 ["unconf_mat_ID", self.unconf_mat_ID],
394 ["discr_cover", self.discr_cover],
395 ["bars_mat_ID", self.bars_mat_ID],
396 ["Initialized", self.Initialized]]
397
398

Member Data Documentation

◆ alpha_i

alpha_i

Definition at line 336 of file Fibers.py.

◆ Ay

Ay

Definition at line 328 of file Fibers.py.

◆ b

b

Definition at line 325 of file Fibers.py.

◆ bars_mat_ID

bars_mat_ID

Definition at line 333 of file Fibers.py.

◆ conf_mat_ID

conf_mat_ID

Definition at line 332 of file Fibers.py.

◆ D_bars

D_bars

Definition at line 327 of file Fibers.py.

◆ D_hoops

D_hoops

Definition at line 330 of file Fibers.py.

◆ data

data

Definition at line 378 of file Fibers.py.

◆ discr_core

discr_core

Definition at line 334 of file Fibers.py.

◆ discr_cover

discr_cover

Definition at line 335 of file Fibers.py.

◆ e

e

Definition at line 326 of file Fibers.py.

◆ fib_sec

fib_sec

Definition at line 361 of file Fibers.py.

◆ GJ

GJ

Definition at line 337 of file Fibers.py.

◆ ID

ID

Definition at line 324 of file Fibers.py.

◆ Initialized

Initialized

Definition at line 341 of file Fibers.py.

◆ n_bars

n_bars

Definition at line 329 of file Fibers.py.

◆ r_bars

r_bars

Definition at line 353 of file Fibers.py.

◆ r_core

r_core

Definition at line 354 of file Fibers.py.

◆ section_name_tag

section_name_tag

Definition at line 340 of file Fibers.py.

◆ unconf_mat_ID

unconf_mat_ID

Definition at line 331 of file Fibers.py.


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