CreateODB¶
- class opstool.post.CreateODB(odb_tag=1, model_update=False, **kwargs)[source]¶
Bases:
objectCreate 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: Union[bool, str, dict], default: “All”
Whether to compute mechanical measures for
solid and planar elements, including principal stresses, principal strains, von Mises stresses, etc. If False, no mechanical measures will be computed. If True or “All”, all mechanical measures will be computed.Otherwise, you can specify a dictionary to indicate which measures to compute. Dictionary keys are the names of mechanical measures, and values are parameters needed for computation. Only the measures specified in the dictionary will be computed. For example, the default setting is:
{ "principal": None, # principal stresses "von-mises": None, # von Mises stress "octahedral": None, # octahedral stresses (sigma_oct, tau_oct) "tau_max": None, # maximum shear stress (Tresca) }
where the keys are the names of mechanical measures to be computed, and the values are None because no additional parameters are needed for these measures. If you want to compute the Mohr-Coulomb or Drucker-Prager equivalent stress with specific parameters, you can set:
{ "principal": None, # principal stresses "von-mises": None, # von Mises stress "octahedral": None, # octahedral stresses (sigma_oct, tau_oct) "tau_max": None, # maximum shear stress (Tresca) # Mohr-Coulomb with Tension-Compression Form "mohr_coulomb_sy": {"syc": <compressive strength>, "syt": <tensile strength>}, # Mohr-Coulomb with Cohesion-Friction Form "mohr_coulomb_c_phi": {"c": <cohesion>, "phi": <friction angle in degrees>}, # Drucker-Prager with Tension-Compression Form "drucker_prager_sy": {"syc": <compressive strength>, "syt": <tensile strength>}, # Drucker-Prager with Cohesion-Friction Form "drucker_prager_c_phi": {"c": <cohesion>, "phi": <friction angle in degrees>, "kind": <circumscribed/middle/inscribed>}, }
For detailed information, see Stress and Strength Criteria.
- 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.NoneorFalse: 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
Extract response data for the current analysis step.
Reset the ODB model.
Save modal analysis data.
Save the model data from the current domain.
Save all response data to a file name
RespStepData-{odb_tag}.nc.- 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. This option is only valid when
odb_formatis set to “nc” inopstool.post.set_odb_format().