get_model_data¶
- opstool.post.get_model_data(odb_tag=None, data_type='Nodal', from_responses=False, lazy_load=False, print_info=True)[source]¶
Read model data from a file.
Parameters¶
- odb_tag: Union[int, str], default: one
Tag of output databases (ODB) to be read.
- data_type: Literal[“Nodal”, “Frame”, “Beam”, “Link”, “Truss”, “Shell”, “Plane”, “Brick”, “Solid”, “Contact”, “FixedNode”, “NodalLoad”, “FrameLoad”, “MPConstraint”], default: Nodal
Type of data to be read. Optional: “Nodal”, “Frame”, “Link”, “Truss”, “Shell”, “Plane”, “Brick”, “Contact”, “FixedNode”, “NodalLoad”, “FrameLoad”, “MPConstraint”.
- … Note::
For element data, the cells represent the index of the nodes in “Nodal” data. You can use the
.iselmethod of xarray to select node information by cell index.
- from_responses: bool, default: False
Whether to read data from response data. If True, the data will be read from the response data file. This is useful when the model data is updated in an analysis process.
- lazy_load: bool, default: False, added since version 1.0.25.
Whether to lazy load the data. If True, the data will be loaded on demand, which can save memory for large datasets. If False, the data will be fully loaded into memory. If you have enough memory, it is recommended to set this parameter to False for faster and safer data access.
- print_info: bool, default: True
Whether to print information.
Returns¶
ModelData: xarray.Dataset if model_update is True, otherwise xarray.DataArray