CreateODB

class opstool.post.CreateODB(odb_tag=1, model_update=False, **kwargs)[source]

Bases: object

Create an output database (ODB) to save response data.

Parameters

odb_tag: Union[int, str], default: 1

Tag of output databases (ODB) to be saved. This tag can be used to identify the load case and is used in post-processing and visualization to identify which results are processed.

model_update: bool, default: False

Whether to update the model data.

Note

If True, the model data will be updated at each step. If no nodes and elements are added or removed during the analysis of your model, keep this parameter set to False. Enabling model updates unnecessarily can increase memory usage and slow down performance. If some nodes or elements are deleted during the analysis, you should set this parameter to True.

kwargs: Other post-processing parameters, optional:
  • elastic_frame_sec_points: int, default: 7

    The number of elastic frame elements section points. A larger number may result in a larger file size.

  • compute_mechanical_measures: bool, default: True

    Whether to compute mechanical measures for solid and planar elements, including principal stresses, principal strains, von Mises stresses, etc.

  • project_gauss_to_nodes: Optional[str], default: “copy”

    Method to project Gauss point responses to nodes. Options are:

    • “copy”: Copy Gauss point responses to nodes, that is, the node’s response comes from the nearest Gaussian point.

    • “average”: Average Gauss point responses to nodes by integrate weight.

    • “extrapolate”: Extrapolate Gauss point responses to nodes by element shape function.

    • None or False: Do not project Gauss point responses to nodes.

  • dtype: dict, default: dict(int=np.int32, float=np.float32)

    Set integer and floating point precision types.

  • Whether to save the responses:
    • save_nodal_resp: bool, default: True

      Whether to save nodal responses.

    • save_frame_resp: bool, default: True

      Whether to save frame element responses.

    • save_truss_resp: bool, default: True

      Whether to save truss element responses.

    • save_link_resp: bool, default: True

      Whether to save link element responses.

    • save_shell_resp: bool, default: True

      Whether to save shell element responses.

    • save_fiber_sec_resp: bool, default: True

      Whether to save fiber section responses.

    • save_plane_resp: bool, default: True

      Whether to save plane element responses.

    • save_brick_resp: bool, default: True

      Whether to save brick element responses.

    • save_contact_resp: bool, default: True

      Whether to save contact element responses.

    • save_sensitivity_resp: bool, default: False

      Whether to save sensitivity analysis responses.

  • Nodes or elements that need to be saved:
    • node_tags: Union[list, tuple, int], default: None

      Node tags to be saved. If None, save all nodes’ responses.

    • frame_tags: Union[list, tuple, int], default: None

      Frame element tags to be saved. If None, save all frame elements’ responses.

    • truss_tags: Union[list, tuple, int], default: None

      Truss element tags to be saved. If None, save all truss elements’ responses.

    • link_tags: Union[list, tuple, int], default: None

      Link element tags to be saved. If None, save all link elements’ responses.

    • shell_tags: Union[list, tuple, int], default: None

      Shell element tags to be saved. If None, save all shell elements’ responses.

    • fiber_ele_tags: Union[list, str], default: None

      Element tags that contain fiber sections to be saved. If “all”, save all fiber section elements responses. If None, save nothing.

    • plane_tags: Union[list, tuple, int], default: None

      Plane element tags to be saved. If None, save all plane elements’ responses.

    • brick_tags: Union[list, tuple, int], default: None

      Brick element tags to be saved. If None, save all brick elements’ responses.

    • contact_tags: Union[list, tuple, int], default: None

      Contact element tags to be saved.

    • sensitivity_para_tags: Union[list, tuple, int], default: None

      Sensitivity parameter tags to be saved.

    Note

    If you enter optional node and element tags to avoid saving all data, make sure these tags are not deleted during the analysis. Otherwise, unexpected behavior may occur.

Methods

fetch_response_step

Extract response data for the current analysis step.

reset

Reset the ODB model.

save_eigen_data

Save modal analysis data.

save_model_data

Save the model data from the current domain.

save_response

Save all response data to a file name RespStepData-{odb_tag}.nc.

reset()[source]

Reset the ODB model.

fetch_response_step(print_info=False)[source]

Extract response data for the current analysis step.

Parameters

print_info: bool, optional

print information, by default, False

save_response(zlib=False)[source]

Save all response data to a file name RespStepData-{odb_tag}.nc.

Parameters

zlib: bool, optional, default: False

If True, the data is saved compressed, which is useful when your result files are expected to be large, especially if model updating is turned on.

save_eigen_data(mode_tag=1, solver='-genBandArpack')[source]

Save modal analysis data.

Parameters

mode_tagint, optional,

Modal tag, all modal data smaller than this modal tag will be saved, by default 1

solverstr, optional,

OpenSees’ eigenvalue analysis solver, by default “-genBandArpack”.

save_model_data()[source]

Save the model data from the current domain.