![]() |
OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
|
Class dedicated to the analysis of the OpenSeesPy model. More...
Public Member Functions | |
def | __init__ (self, str data_dir, str name_ODB, algo="KrylovNewton", test_type="NormDispIncr", test_opt=0, max_iter=MAX_ITER, tol=TOL, allow_smaller_step=False) |
The constructor of the class. More... | |
def | DeformedShape (self, scale=1, animate=False, dt=0.01) |
Method that shows the final deformed shape of the model. More... | |
def | FiberResponse (self, int ele_fiber_ID_analysed, fiber_section=1, animate_stress=False, animate_strain=False, fps=25) |
Method that shows the final stress response of the fiber section chosen. More... | |
def | Gravity (self, list loaded_nodes, list Fy, int timeSeries_ID, int pattern_ID, n_step=10, timeSeries_type="Linear", pattern_type="Plain", constraints_type="Plain", numberer_type="RCM", system_type="BandGeneral", analysis_type="Static", show_plot=False) |
Method to perform the gravity analyisis with vertical loadings (load-control). More... | |
def | LateralForce (self, list loaded_nodes, list Fx, int timeSeries_ID, int pattern_ID, n_step=1000, fiber_ID_analysed=-1, fiber_section=1, timeSeries_type="Linear", pattern_type="Plain", constraints_type="Plain", numberer_type="RCM", system_type="BandGeneral", analysis_type="Static", show_plot=True, block=False) |
Method to perform the lateral force analyisis with lateral loading (load-control). More... | |
def | LoadingProtocol (self, int CtrlNode, np.ndarray discr_LP, int timeSeries_ID, int pattern_ID, Fx=1 *kN_unit, ele_fiber_ID_analysed=-1, fiber_section=1, timeSeries_type="Linear", pattern_type="Plain", constraints_type="Plain", numberer_type="RCM", system_type="UmfPack", analysis_type="Static", show_plot=True, block=False) |
Method to perform a loading protocol analysis (displacement-control). More... | |
def | Pushover (self, int CtrlNode, Dmax, Dincr, int timeSeries_ID, int pattern_ID, Fx=1 *kN_unit, ele_fiber_ID_analysed=-1, fiber_section=1, timeSeries_type="Linear", pattern_type="Plain", constraints_type="Plain", numberer_type="RCM", system_type="UmfPack", analysis_type="Static", show_plot=True, block=False) |
Method to perform a pushover analysis (displacement-control). More... | |
Public Attributes | |
algo | |
allow_smaller_step | |
data_dir | |
load_case | |
max_iter | |
name_ODB | |
test_opt | |
test_type | |
tol | |
Class dedicated to the analysis of the OpenSeesPy model.
The Gravity method should be run first to perform the Load-control analysis (apply the vertical load). If no vertical load, this method can be omitted.
Then only one of the Displacement-control (Pushover or LoadingProtocol) or Load-control (LateralForce) analysis can ran.
After the analysis reach convergence in the last step, for the postprocessing, the DeformedShape method can be used to see the final deformed shape and the animation of the entire loading protocol; the FiberResponse method can be used to see the animation of the same fiber section recorded during the analysis (strain and/or stress).
Definition at line 16 of file AnalysisAndPostProcessing.py.
def __init__ | ( | self, | |
str | data_dir, | ||
str | name_ODB, | ||
algo = "KrylovNewton" , |
|||
test_type = "NormDispIncr" , |
|||
test_opt = 0 , |
|||
max_iter = MAX_ITER , |
|||
tol = TOL , |
|||
allow_smaller_step = False |
|||
) |
The constructor of the class.
data_dir | (str): Directory in which the results from the analysis will be stored. Use the recorders (from OpenSeesPy) or the Record method from MemberModel. |
name_ODB | (str): Name for the folder in which the data for the animations and the fibers are stored. |
algo | (str, optional): Type of alghoritm chosen for the analysis. It detemines how to construct a SolutionAlgorithm object, which determines the sequence of steps taken to solve the non-linear equation. For more information on the available types, see the OpenSeesPy documentation. Defaults to "KrylovNewton". |
test_type | (str, optional): Type of test chosen for the analysis. It determines how to construct a ConvergenceTest object. Certain SolutionAlgorithm objects require a ConvergenceTest object to determine if convergence has been achieved at the end of an iteration step. For more information on the available types, see the OpenSeesPy documentation. Defaults to "NormDispIncr". |
test_opt | (int, optional): Print-flag from 0 to 5 used to receive more info during the iteration (for example: 0 print nothing and 2 print information on norms and number of iterations at end of successful test). For more information, see the OpenSeesPy documentation. Defaults to 0. |
max_iter | (float, optional): Maximal number of iterations to check. Defaults to MAX_ITER (from Constants Module). |
tol | (float, optional): Tolerance criteria used to check for convergence. Defaults to TOL (from Constants Module). |
allow_smaller_step | (bool, optional): Allow smaller steps in the displacement-control analysis. Defaults to False. |
NegativeValue | The argument max_iter should be positive. |
NegativeValue | The argument tol should be positive. |
Definition at line 22 of file AnalysisAndPostProcessing.py.
def DeformedShape | ( | self, | |
scale = 1 , |
|||
animate = False , |
|||
dt = 0.01 |
|||
) |
Method that shows the final deformed shape of the model.
It can also show the animation that shows how the model behaved during the analysis.
scale | (int, optional): The scaling factor to magnify the deformation. The value should be adjusted for each model. Defaults to 1. |
animate | (bool, optional): Option to show the animation of the model during the analysis. Defaults to False. |
dt | (float, optional): The time step between every iteration. Defaults to 0.01. |
NameError | The methods for the analysis were not called. |
Definition at line 652 of file AnalysisAndPostProcessing.py.
def FiberResponse | ( | self, | |
int | ele_fiber_ID_analysed, | ||
fiber_section = 1 , |
|||
animate_stress = False , |
|||
animate_strain = False , |
|||
fps = 25 |
|||
) |
Method that shows the final stress response of the fiber section chosen.
It can also show the animation that shows how the fiber section behaved during the analysis. The fiber ID and section needs to be recorded during the analysis, thus if the method LateralForce, Pushover or LoadingProtocol was used, the same fiber ID and section need to be used.
ele_fiber_ID_analysed | (int): The ID of the analysed fiber. If fibers are present in the model and the user wants to save ODB data (to use in the post-processing with for example FiberResponse), assign to this argument the ID of the fiber chosen. -1 will ignore the storage of data for fibers. |
fiber_section | (int, optional): The section number, i.e. the Gauss integratio number. If the fiber_ID_analysed is equal to -1, this argument is not used. Defaults to 1. |
animate_stress | (bool, optional): Option to show the animation of the fiber stress during the analysis. Defaults to False. |
animate_strain | (bool, optional): Option to show the animation of the fiber strain during the analysis. Defaults to False. |
fps | (int, optional): Number of frame per seconds for the animations. Defaults to 25. |
NameError | The methods for the analysis were not called. |
Definition at line 670 of file AnalysisAndPostProcessing.py.
def Gravity | ( | self, | |
list | loaded_nodes, | ||
list | Fy, | ||
int | timeSeries_ID, | ||
int | pattern_ID, | ||
n_step = 10 , |
|||
timeSeries_type = "Linear" , |
|||
pattern_type = "Plain" , |
|||
constraints_type = "Plain" , |
|||
numberer_type = "RCM" , |
|||
system_type = "BandGeneral" , |
|||
analysis_type = "Static" , |
|||
show_plot = False |
|||
) |
Method to perform the gravity analyisis with vertical loadings (load-control).
It can be used before calling the Pushover or LoadingProtocol methods that perform the actual anlysis. If no vertical loadings present, this method can be avoided.
loaded_nodes | (list): List of nodes that are loaded by the the forces in Fy. The first node will be recorded (thus usually should be in the roof). |
Fy | (list): List of vertical loadings (negative is toward the ground, thus compression; see global coordinate system). |
timeSeries_ID | (int): ID of the timeseries. |
pattern_ID | (int): ID of the pattern. |
n_step | (int, optional): Number of steps used to during the analysis to reach the objective state (with 100% vertical loadings imposed). Defaults to 10. |
timeSeries_type | (str, optional): Type of timeseries chosen. For more information, see the OpenSeesPy documentation. Defaults to "Linear". |
pattern_type | (str, optional): Type of pattern chosen. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
constraints_type | (str, optional): Type of contraints chosen. It detemines how the constraint equations are enforced in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
numberer_type | (str, optional): Type of numberer chosen. It determines the mapping between equation numbers and degrees-of-freedom. For more information, see the OpenSeesPy documentation. Defaults to "RCM". |
system_type | (str, optional): Type of system of equations chosen. It determines how to construct the LinearSOE and LinearSolver objects to store and solve the system of equations in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "BandGeneral". |
analysis_type | (str, optional): Type of analysis chosen. It determines how to construct the Analysis object, which defines what type of analysis is to be performed. For more information, see the OpenSeesPy documentation. Defaults to "Static". |
show_plot | (bool, optional): Option to show the 'vertical displacement vs. vertical loading' curve after the analysis. Defaults to False. |
WrongDimension | The dimension of the loaded_nodes and Fy arguments needs to be the same. |
NegativeValue | The ID of timeSeries_ID needs to be a positive integer. |
NegativeValue | The ID of pattern_ID needs to be a positive integer. |
Definition at line 60 of file AnalysisAndPostProcessing.py.
def LateralForce | ( | self, | |
list | loaded_nodes, | ||
list | Fx, | ||
int | timeSeries_ID, | ||
int | pattern_ID, | ||
n_step = 1000 , |
|||
fiber_ID_analysed = -1 , |
|||
fiber_section = 1 , |
|||
timeSeries_type = "Linear" , |
|||
pattern_type = "Plain" , |
|||
constraints_type = "Plain" , |
|||
numberer_type = "RCM" , |
|||
system_type = "BandGeneral" , |
|||
analysis_type = "Static" , |
|||
show_plot = True , |
|||
block = False |
|||
) |
Method to perform the lateral force analyisis with lateral loading (load-control).
If this method is called, the LoadingProtocol and Pushover methods should be avoided.
loaded_nodes | (list): List of nodes that are loaded by the the forces in Fx. The first node will be recorded (thus usually should be in the roof). |
Fx | (list): List of horizontal loadings (negative is toward left; see global coordinate system). |
timeSeries_ID | (int): ID of the timeseries. |
pattern_ID | (int): ID of the pattern. |
n_step | (int, optional): Number of steps used to during the analysis to reach the objective state (with 100% horizontal loadings imposed). Defaults to 1000. |
fiber_ID_analysed | (int, optional): The ID of the analysed fiber. If fibers are present in the model and the user wants to save ODB data (to use in the post-processing with for example FiberResponse), assign to this argument the ID of the fiber chosen. -1 will ignore the storage of data for fibers. Defaults to -1. |
fiber_section | (int, optional): The section number, i.e. the Gauss integratio number. If the fiber_ID_analysed is equal to -1, this argument is not used. Defaults to 1. |
timeSeries_type | (str, optional): Type of timeseries chosen. For more information, see the OpenSeesPy documentation. Defaults to "Linear". |
pattern_type | (str, optional): Type of pattern chosen. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
constraints_type | (str, optional): Type of contraints chosen. It detemines how the constraint equations are enforced in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
numberer_type | (str, optional): Type of numberer chosen. It determines the mapping between equation numbers and degrees-of-freedom. For more information, see the OpenSeesPy documentation. Defaults to "RCM". |
system_type | (str, optional): Type of system of equations chosen. It determines how to construct the LinearSOE and LinearSolver objects to store and solve the system of equations in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "BandGeneral". |
analysis_type | (str, optional): Type of analysis chosen. It determines how to construct the Analysis object, which defines what type of analysis is to be performed. For more information, see the OpenSeesPy documentation. Defaults to "Static". |
show_plot | (bool, optional): Option to show the 'Horizontal displacement vs. Horizontal loading' curve after the analysis. Defaults to True. |
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. |
WrongDimension | The dimension of the loaded_nodes and Fx arguments needs to be the same. |
NegativeValue | The ID of timeSeries_ID needs to be a positive integer. |
NegativeValue | The ID of pattern_ID needs to be a positive integer. |
NegativeValue | The ID of fiber_ID_analysed needs to be a positive integer. |
Definition at line 137 of file AnalysisAndPostProcessing.py.
def LoadingProtocol | ( | self, | |
int | CtrlNode, | ||
np.ndarray | discr_LP, | ||
int | timeSeries_ID, | ||
int | pattern_ID, | ||
Fx = 1*kN_unit , |
|||
ele_fiber_ID_analysed = -1 , |
|||
fiber_section = 1 , |
|||
timeSeries_type = "Linear" , |
|||
pattern_type = "Plain" , |
|||
constraints_type = "Plain" , |
|||
numberer_type = "RCM" , |
|||
system_type = "UmfPack" , |
|||
analysis_type = "Static" , |
|||
show_plot = True , |
|||
block = False |
|||
) |
Method to perform a loading protocol analysis (displacement-control).
If this method is called, the Pushover and LateralForce methods should be avoided.
CtrlNode | (int): The node that will be used to impose the displacement from the discr_LP to perform the analysis. |
discr_LP | (np.ndarray): The loading protocol array (1 dimension) discretised. It needs to be filled with imposed displacement, not SDR. Use the functions DiscretizeLoadProtocol and DiscretizeLinearly in FunctionalFeatures module to help create and/or discretise one. |
timeSeries_ID | (int): ID of the timeseries. |
pattern_ID | (int): ID of the pattern. |
Fx | (float, optional): The force imposed at the control node CtrlNode. It is used for convergence reasons and it can be arbitrarly small. Defaults to 1*kN_unit. |
ele_fiber_ID_analysed | (int, optional): The ID of the analysed element with fibers. If fibers are present in the model and the user wants to save ODB data (to use in the post-processing with for example FiberResponse), assign to this argument the ID of the element with fibers chosen. -1 will ignore the storage of data for fibers. Defaults to -1. |
fiber_section | (int, optional): The section number, i.e. the Gauss integratio number. If the fiber_ID_analysed is equal to -1, this argument is not used. Defaults to 1. |
timeSeries_type | (str, optional): Type of timeseries chosen. For more information, see the OpenSeesPy documentation. Defaults to "Linear". |
pattern_type | (str, optional): Type of pattern chosen. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
constraints_type | (str, optional): Type of contraints chosen. It detemines how the constraint equations are enforced in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
numberer_type | (str, optional): Type of numberer chosen. It determines the mapping between equation numbers and degrees-of-freedom. For more information, see the OpenSeesPy documentation. Defaults to "RCM". |
system_type | (str, optional): Type of system of equations chosen. It determines how to construct the LinearSOE and LinearSolver objects to store and solve the system of equations in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "UmfPack". |
analysis_type | (str, optional): Type of analysis chosen. It determines how to construct the Analysis object, which defines what type of analysis is to be performed. For more information, see the OpenSeesPy documentation. Defaults to "Static". |
show_plot | (bool, optional): Option to show the 'lateral displacement vs. lateral loading' curve after the analysis. Defaults to True. |
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. |
NegativeValue | The ID of CtrlNode needs to be a positive integer. |
NegativeValue | The ID of timeSeries_ID needs to be a positive integer. |
NegativeValue | The ID of pattern_ID needs to be a positive integer. |
NegativeValue | The ID of fiber_ID_analysed needs to be a positive integer if is different from -1. |
Definition at line 319 of file AnalysisAndPostProcessing.py.
def Pushover | ( | self, | |
int | CtrlNode, | ||
Dmax, | |||
Dincr, | |||
int | timeSeries_ID, | ||
int | pattern_ID, | ||
Fx = 1*kN_unit , |
|||
ele_fiber_ID_analysed = -1 , |
|||
fiber_section = 1 , |
|||
timeSeries_type = "Linear" , |
|||
pattern_type = "Plain" , |
|||
constraints_type = "Plain" , |
|||
numberer_type = "RCM" , |
|||
system_type = "UmfPack" , |
|||
analysis_type = "Static" , |
|||
show_plot = True , |
|||
block = False |
|||
) |
Method to perform a pushover analysis (displacement-control).
If this method is called, the LoadingProtocol and LateralForce methods should be avoided.
CtrlNode | (int): The node that will be used to impose the displacement Dmax of the pushover analysis. If the show_plot option is True, the curve displayed follows this node. |
Dmax | (float): The imposed displacement. |
Dincr | (float): The incremental displacement to reach Dmax. To converge, it should be small enough (1000 times smaller of Dmax). |
timeSeries_ID | (int): ID of the timeseries. |
pattern_ID | (int): ID of the pattern. |
Fx | (float, optional): The force imposed at the control node CtrlNode. It is used for convergence reasons and it can be arbitrarly small. Defaults to 1*kN_unit. |
ele_fiber_ID_analysed | (int, optional): The ID of the analysed element with fibers. If fibers are present in the model and the user wants to save ODB data (to use in the post-processing with for example FiberResponse), assign to this argument the ID of the element with fibers chosen. -1 will ignore the storage of data for fibers. Defaults to -1. |
fiber_section | (int, optional): The section number, i.e. the Gauss integratio number. If the fiber_ID_analysed is equal to -1, this argument is not used. Defaults to 1. |
timeSeries_type | (str, optional): Type of timeseries chosen. For more information, see the OpenSeesPy documentation. Defaults to "Linear". |
pattern_type | (str, optional): Type of pattern chosen. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
constraints_type | (str, optional): Type of contraints chosen. It detemines how the constraint equations are enforced in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "Plain". |
numberer_type | (str, optional): Type of numberer chosen. It determines the mapping between equation numbers and degrees-of-freedom. For more information, see the OpenSeesPy documentation. Defaults to "RCM". |
system_type | (str, optional): Type of system of equations chosen. It determines how to construct the LinearSOE and LinearSolver objects to store and solve the system of equations in the analysis. For more information, see the OpenSeesPy documentation. Defaults to "UmfPack". |
analysis_type | (str, optional): Type of analysis chosen. It determines how to construct the Analysis object, which defines what type of analysis is to be performed. For more information, see the OpenSeesPy documentation. Defaults to "Static". |
show_plot | (bool, optional): Option to show the 'lateral displacement vs. lateral loading' curve after the analysis. Defaults to True. |
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. |
NegativeValue | The ID of CtrlNode needs to be a positive integer. |
NegativeValue | The ID of timeSeries_ID needs to be a positive integer. |
NegativeValue | The ID of pattern_ID needs to be a positive integer. |
NegativeValue | The ID of ele_fiber_ID_analysed needs to be a positive integer if is different from -1. |
Definition at line 228 of file AnalysisAndPostProcessing.py.
algo |
Definition at line 51 of file AnalysisAndPostProcessing.py.
allow_smaller_step |
Definition at line 56 of file AnalysisAndPostProcessing.py.
data_dir |
Definition at line 49 of file AnalysisAndPostProcessing.py.
load_case |
Definition at line 57 of file AnalysisAndPostProcessing.py.
max_iter |
Definition at line 55 of file AnalysisAndPostProcessing.py.
name_ODB |
Definition at line 50 of file AnalysisAndPostProcessing.py.
test_opt |
Definition at line 54 of file AnalysisAndPostProcessing.py.
test_type |
Definition at line 52 of file AnalysisAndPostProcessing.py.
tol |
Definition at line 53 of file AnalysisAndPostProcessing.py.