OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
UniaxialBilinear Class Reference

Class that stores funcions and material properties of a simple uniaxial bilinear model with the OpenSeesPy command type used to model it is Steel01. More...

Inheritance diagram for UniaxialBilinear:
MaterialModels UniaxialBilinearSteelIShape

Public Member Functions

def __init__ (self, int ID, fy, Ey, b=0.01)
 Constructor of the class. More...
 
def CheckApplicability (self)
 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 Steel01 (self)
 Generate the material model Steel01 uniaxial bilinear material model. More...
 
def UpdateStoredData (self)
 Implementation of the homonym abstract method. More...
 
def CheckApplicability (self)
 Abstract function used to check the applicability of the material model. More...
 

Public Attributes

 b
 
 data
 
 Ey
 
 ey
 
 fy
 
 ID
 
 Initialized
 
 section_name_tag
 

Detailed Description

Class that stores funcions and material properties of a simple uniaxial bilinear model with the OpenSeesPy command type used to model it is Steel01.

Parameters
MaterialModelsParent abstract class.

Definition at line 2319 of file MaterialModels.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
int  ID,
  fy,
  Ey,
  b = 0.01 
)

Constructor of the class.

Parameters
ID(int): Unique material model ID.
fy(float): Yield stress.
Ey(float): Young modulus.
b(float, optional): Strain hardening factor. Defaults to 0.01.
Exceptions
NegativeValueID needs to be a positive integer.
NegativeValuefy needs to be positive.
NegativeValueEy needs to be positive.

Reimplemented in UniaxialBilinearSteelIShape.

Definition at line 2326 of file MaterialModels.py.

2326 def __init__(self, ID: int, fy, Ey, b = 0.01):
2327 """
2328 Constructor of the class.
2329
2330 @param ID (int): Unique material model ID.
2331 @param fy (float): Yield stress.
2332 @param Ey (float): Young modulus.
2333 @param b (float, optional): Strain hardening factor. Defaults to 0.01.
2334
2335 @exception NegativeValue: ID needs to be a positive integer.
2336 @exception NegativeValue: fy needs to be positive.
2337 @exception NegativeValue: Ey needs to be positive.
2338 """
2339 # Check
2340 if ID < 1: raise NegativeValue()
2341 if fy < 0: raise NegativeValue()
2342 if Ey < 0: raise NegativeValue()
2343
2344 # Arguments
2345 self.ID = ID
2346 self.fy = fy
2347 self.Ey = Ey
2348 self.b = b
2349
2350 # Initialized the parameters that are dependent from others
2351 self.section_name_tag = "None"
2352 self.Initialized = False
2353 self.ReInit()
2354

Member Function Documentation

◆ CheckApplicability()

def CheckApplicability (   self)

Implementation of the homonym abstract method.

See parent class MaterialModels for detailed information.

Reimplemented from MaterialModels.

Definition at line 2423 of file MaterialModels.py.

2423 def CheckApplicability(self):
2424 """
2425 Implementation of the homonym abstract method.
2426 See parent class MaterialModels for detailed information.
2427 """
2428 Check = True
2429 # if len(self.wy) == 0 or len(self.wx_top) == 0 or len(self.wx_bottom) == 0:
2430 # Check = False
2431 # print("Hypothesis of one bar per corner not fullfilled.")
2432 if not Check:
2433 print("The validity of the equations is not fullfilled.")
2434 print("!!!!!!! WARNING !!!!!!! Check material model of Uniaxial Bilinear, ID=", self.ID)
2435 print("")
2436
2437
Module for the material models.

◆ ReInit()

def ReInit (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 2355 of file MaterialModels.py.

2355 def ReInit(self):
2356 """
2357 Implementation of the homonym abstract method.
2358 See parent class DataManagement for detailed information.
2359 """
2360 # Check applicability
2361 self.CheckApplicability()
2362
2363 # Members
2364 self.ey = self.fy / self.Ey
2365 if self.section_name_tag != "None": self.section_name_tag = self.section_name_tag + " (modified)"
2366
2367 # Data storage for loading/saving
2368 self.UpdateStoredData()
2369
2370
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 2387 of file MaterialModels.py.

2387 def ShowInfo(self, plot = False, block = False):
2388 """
2389 Implementation of the homonym abstract method.
2390 See parent class DataManagement for detailed information.
2391
2392 @param plot (bool, optional): Option to show the plot of the material model. Defaults to False.
2393 @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.
2394 """
2395 print("")
2396 print("Requested info for Uniaxial Bilinear material model Parameters, ID = {}".format(self.ID))
2397 print("Section associated: {} ".format(self.section_name_tag))
2398 print('Yielding stress fy = {} MPa'.format(self.fy/MPa_unit))
2399 print('Young modulus Ey = {} MPa'.format(self.Ey/MPa_unit))
2400 print('Maximal elastic strain epsilon y = {}'.format(self.ey))
2401 print('Hardening factor b = {}'.format(self.b))
2402 print("")
2403
2404 if plot:
2405 # Data for plotting
2406 e_pl = 10.0 * self.ey # to show that if continues with this slope
2407 sigma_pl = self.b * self.Ey * e_pl
2408
2409 x_axis = np.array([0.0, self.ey, (self.ey+e_pl)])*100
2410 y_axis = np.array([0.0, self.fy, (self.fy+sigma_pl)])/MPa_unit
2411
2412 fig, ax = plt.subplots()
2413 ax.plot(x_axis, y_axis, 'k-')
2414
2415 ax.set(xlabel='Strain [%]', ylabel='Stress [MPa]',
2416 title='Uniaxial Bilinear model for material ID={}'.format(self.ID))
2417 ax.grid()
2418
2419 if block:
2420 plt.show()
2421
2422

◆ Steel01()

def Steel01 (   self)

Generate the material model Steel01 uniaxial bilinear material model.

See _Steel01 function for more information.

Definition at line 2438 of file MaterialModels.py.

2438 def Steel01(self):
2439 """
2440 Generate the material model Steel01 uniaxial bilinear material model.
2441 See _Steel01 function for more information.
2442 """
2443 _Steel01(self.ID, self.fy, self.Ey, self.b)
2444 self.Initialized = True
2445 self.UpdateStoredData()
2446
2447

◆ UpdateStoredData()

def UpdateStoredData (   self)

Implementation of the homonym abstract method.

See parent class DataManagement for detailed information.

Definition at line 2372 of file MaterialModels.py.

2372 def UpdateStoredData(self):
2373 """
2374 Implementation of the homonym abstract method.
2375 See parent class DataManagement for detailed information.
2376 """
2377 self.data = [["INFO_TYPE", "UniaxialBilinear"], # Tag for differentiating different data
2378 ["ID", self.ID],
2379 ["section_name_tag", self.section_name_tag],
2380 ["fy", self.fy],
2381 ["Ey", self.Ey],
2382 ["ey", self.ey],
2383 ["b", self.b],
2384 ["Initialized", self.Initialized]]
2385
2386

Member Data Documentation

◆ b

b

Definition at line 2348 of file MaterialModels.py.

◆ data

data

Definition at line 2377 of file MaterialModels.py.

◆ Ey

Ey

Definition at line 2347 of file MaterialModels.py.

◆ ey

ey

Definition at line 2364 of file MaterialModels.py.

◆ fy

fy

Definition at line 2346 of file MaterialModels.py.

◆ ID

ID

Definition at line 2345 of file MaterialModels.py.

◆ Initialized

Initialized

Definition at line 2352 of file MaterialModels.py.

◆ section_name_tag

section_name_tag

Definition at line 2351 of file MaterialModels.py.


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