plot_unstruct_responses¶
- opstool.vis.plotly.plot_unstruct_responses(odb_tag=1, ele_type='Shell', ele_tags=None, slides=False, step='absMax', resp_type='sectionForces', resp_dof='MXX', shell_fiber_loc='top', unit_symbol=None, unit_factor=None, style='surface', show_outline=False, show_values=False, show_defo=False, defo_scale=1.0, show_bc=False, bc_scale=1.0, show_mp_constraint=False, show_model=False)[source]¶
Visualizing unstructured element (Shell, Plane, Brick) Response.
Note
The responses at all Gaussian points are averaged.
Parameters¶
- odb_tag: Union[int, str], default: 1
Tag of output databases (ODB) to be visualized.
- ele_tags: Union[int, list], default: None
The tags of elements to be visualized. If None, all elements are selected.
- slides: bool, default: False
Display the response for each step in the form of a slideshow. Otherwise, show the step with the following
stepparameter.- step: Union[int, str], default: “absMax”
If slides = False, this parameter will be used as the step to plot. If str, Optional: [absMax, absMin, Max, Min]. If int, this step will be demonstrated (counting from 0).
- ele_type: str, default: “Shell”
Element type, optional, one of [“Shell”, “Plane”, “Solid”].
- resp_type: str, default: None
Response type, which dependents on the element type ele_type.
- For
Shellelements, one of [“sectionForces”, “sectionDeformations”, “sectionForcesAtNodes”, “sectionDeformationsAtNodes”, “Stresses”, “Strains”, “StressesAtNodes”, “StrainsAtNodes”]. If it endswith AtNodes, responses at nodes will be displayed, else responses at Gaussian integration points will be averaged for each element (per unit length). If None, defaults to “sectionForces”.
- For
- For
Planeelements, one of [“stresses”, “strains”, “stressesAtNodes”, “strainsAtNodes”]. If it endswith AtNodes, responses at nodes will be displayed, else responses at Gaussian integration points will be averaged for each element. If None, defaults to “stresses”.
- For
- For
BrickorSolidelements, one of [“stresses”, “strains”, “stressesAtNodes”, “strainsAtNodes”]. If it endswith AtNodes, responses at nodes will be displayed, else responses at Gaussian integration points will be averaged for each element. If None, defaults to “stresses”.
- For
- resp_dof: str, default: None
Dof to be visualized, which dependents on the element type ele_type.
Note
The resp_dof here is consistent with stress-strain (force-deformation), and whether it is stress or strain depends on the parameter resp_type.
- For
Shellelements, If resp_type is the section responses, one of [“FXX”, “FYY”, “FXY”, “MXX”, “MYY”, “MXY”, “VXZ”, “VYZ”]. If resp_type is the stress or strain, one of [“sigma11”, “sigma22”, “sigma12”, “sigma23”, “sigma13”]. If None, defaults to “MXX”.
- For
For
Planeelements, one of [“sigma11”, “sigma22”, “sigma12”, “p1”, “p2”, “sigma_vm”, “tau_max”].“sigma11, sigma22, sigma12”: Normal stress and shear stress (strain) in the x-y plane.
“p1, p2”: Principal stresses (strains).
“sigma_vm”: Von Mises stress.
“tau_max”: Maximum shear stress (strains).
If None, defaults to “sigma_vm”.
For
BrickorSolidelements, one of [“sigma11”, “sigma22”, “sigma33”, “sigma12”, “sigma23”, “sigma13”, “p1”, “p2”, “p3”, “sigma_vm”, “tau_max”, “sigma_oct”, “tau_oct”]“sigma11, sigma22, sigma33”: Normal stress (strain) along x, y, z.
“sigma12, sigma23, sigma13”: Shear stress (strain).
“p1, p2, p3”: Principal stresses (strains).
“sigma_vm”: Von Mises stress.
“tau_max”: Maximum shear stress (strains).
“sigma_oct”: Octahedral normal stress (strains).
“tau_oct”: Octahedral shear stress (strains).
If None, defaults to “sigma_vm”.
- shell_fiber_loc: Optional[Union[str, int]], default: “top”, added in v1.0.16
The location of the fiber point for shell elements. If str, one of [“top”, “bottom”, “middle”]. If int, the index of the fiber point to be visualized, from 1 (bottom) to N (top). The fiber point is the fiber layer in the shell section. Note that this parameter is only valid for stresses and strains in shell elements.
- unit_symbol: str, default: None
Unit symbol to be displayed in the plot. This feature is added since v1.0.15.
- unit_factor: float, default: None
This feature is added since v1.0.15. The multiplier used to convert units. For example, if you want to visualize stress and the current data unit is kPa, you can set
unit_symbol="kPa" and unit_factor=1.0. If you want to visualize in MPa, you can setunit_symbol="MPa" and unit_factor=0.001.- style: str, default: surface
Visualization mesh style of surfaces and solids. One of the following: style=’surface’ or style=’wireframe’ Defaults to ‘surface’. Note that ‘wireframe’ only shows a wireframe of the outer geometry.
- show_values: bool, default: False
Whether to display the response value by hover. Set to False can improve the performance of the visualization.
- show_outline: bool, default: False
Whether to display the outline of the model.
- show_defo: bool, default: False
Whether to display the deformed shape.
- defo_scale: float, default: 1.0
Scales the size of the deformation presentation when show_defo is True. If set to False, the deformed shape will not be scaled (original deformation). If set to True or “auto”, the deformed shape will be scaled by the default scale (i.e., 1/20 of the maximum model dimensions). If set to a float or int, it will scale the deformed shape by that factor.
- show_bc: bool, default: False
Whether to display boundary supports. Set to False can improve the performance of the visualization.
- bc_scale: float, default: 1.0
Scale the size of boundary support display.
- show_mp_constraint: bool, default: False
Whether to show multipoint (MP) constraint. Set to False can improve the performance of the visualization.
- show_model: bool, default: False
Whether to plot the all model or not. Set to False can improve the performance of the visualization.
Returns¶
- fig: plotly.graph_objects.Figure
You can use fig.show() to display, You can also use fig.write_html(“path/to/file.html”) to save as an HTML file, see Interactive HTML Export in Python
- rtype:
Figure
- Return type:
Figure