GetFEMdata#

class opstool.vis.GetFEMdata(results_dir='opstool_output')[source]#

Get the data in the openseespy current domain.

Parameters#

results_dir: str, default=”opstool_output”

The directory that results to save.

get_eigen_data(mode_tag=1, solver='-genBandArpack', save_file='EigenData.hdf5')[source]#

Get eigenvalue Analysis Data. The data will saved to file results_dir + save_file.

Parameters#

mode_tag: int

mode tag.

solver: str, default ‘-genBandArpack’

type of solver, optional ‘-genBandArpack’, ‘-fullGenLapack’, see https://openseespydoc.readthedocs.io/en/latest/src/eigen.html.

save_file: str, default=’EigenData.hdf5’

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir.

Returns#

None

get_fiber_data(ele_sec, save_file='FiberData.hdf5')[source]#

Get data from the section assigned by parameter ele_sec.

Parameters#

ele_sec: list[tuple[int, int]]

A list or tuple composed of element tag and sectag. e.g., [(ele1, sec1), (ele2, sec2), … , (elen, secn)], The section is attached to an element in the order from end i to end j of that element.

save_file: str, default=’FiberData.hdf5’

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir.

Returns#

None

get_fiber_resp_step(num_steps=100000000000, total_time=100000000000, stop_cond=False, save_file='FiberRespStepData-1.hdf5')[source]#

Get analysis step data for fiber section.

Parameters#

num_steps: int, default=100000000000

Total number of steps, set to determine when to save data.

total_time: float, default=100000000000

Total analysis time, set to determine when to save data. You can specify one of the parameters num_steps and total_time. If both are used, it depends on which one arrives first.

stop_cond: bool, default = False

Condition used to determine when data is saved if num_steps and total_time unavailable. For example, stop_cond = ops.nodeDisp(nodeTag, 1) >= 0.1, i.e., once the displacement of node with tag nodeTag and dof 1 is greater than 0.1, the loop is terminated to save the data.

save_file: str, default=’FiberRespStepData-1.hdf5’

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir. You need to specify different suffixes to distinguish between the different analysis cases. Such as “FiberRespStepData-1.hdf5”, “FiberRespStepData-2.hdf5”, etc.

Returns#

None

get_frame_resp_step(num_steps=100000000000, total_time=100000000000, stop_cond=False, save_file='BeamRespStepData-1.hdf5')[source]#

Get the response data step by step.

Note

You need to call this function at each analysis step in OpenSees. The advantage is that you can modify the iterative algorithm at each analysis step to facilitate convergence.

Parameters#

num_steps: int, default=100000000000

Total number of steps, set to determine when to save data.

total_time: float, default=100000000000

Total analysis time, set to determine when to save data. You can specify one of the parameters num_steps and total_time. If both are used, it depends on which one arrives first.

stop_cond: bool, default = False

Condition used to determine when data is saved if num_steps and total_time unavailable. For example, stop_cond = ops.nodeDisp(nodeTag, 1) >= 0.1, i.e., once the displacement of node with tag nodeTag and dof 1 is greater than 0.1, the loop is terminated to save the data.

save_file: str, default=’BeamRespStepData-1.hdf5’

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir. You need to specify different suffixes to distinguish between the different analysis cases. Such as “BeamRespStepData-1.hdf5”, “BeamRespStepData-2.hdf5”, etc.

Returns#

None

get_model_data(save_file='ModelData.hdf5')[source]#

Get data from the current model domain. The data will saved to file results_dir + save_file in hdf5 style.

Parameters#

save_file: str, default=”ModelData.hdf5”

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir.

get_node_resp_step(num_steps=100000000000, total_time=100000000000, stop_cond=False, save_file='NodeRespStepData-1.hdf5', model_update=False)[source]#

Get the node response data step by step.

Note

You need to call this function at each analysis step in OpenSees. The advantage is that you can modify the iterative algorithm at each analysis step to facilitate convergence.

Parameters#

num_steps: int, default=100000000000

Total number of steps, set to determine when to save data.

total_time: float, default=100000000000

Total analysis time, set to determine when to save data. You can specify one of the parameters num_steps and total_time. If both are used, it depends on which one arrives first.

stop_cond: bool, default = False

Condition used to determine when data is saved if num_steps and total_time unavailable. For example, stop_cond = ops.nodeDisp(nodeTag, 1) >= 0.1, i.e., once the displacement of node with tag nodeTag and dof 1 is greater than 0.1, the loop is terminated to save the data.

save_file: str, default=’NodeRespStepData-1.hdf5’

The file name that data saved. If None of False, the data will not be saved.

Warning

Be careful not to include any path, only filename, the file will be saved to the directory results_dir. You need to specify different suffixes to distinguish between the different analysis cases. Such as “NodeRespStepData-1.hdf5”, “NodeRespStepData-2.hdf5”, etc.

model_update: bool, default False

whether to update the model domain data at each analysis step, this will be useful if model data has changed. For example, some elements and nodes were removed.

Returns#

None

reset_eigen_state()[source]#

Reset the state of results extract of eigen data.

reset_model_state()[source]#

Reset the state of results extract of model data.

reset_steps_state()[source]#

Reset the state of results extract in analysis step.

Important

As the data is saved in the loop analysis using the list append method, it is important to clear the data from previous analysis case before each analysis loop.