plot_nodal_responses¶
- opstool.vis.plotly.plot_nodal_responses(odb_tag=1, slides=False, step='absMax', scale=1.0, show_defo=True, resp_type='disp', resp_dof=('UX', 'UY', 'UZ'), show_bc=True, bc_scale=1.0, show_mp_constraint=False, show_undeformed=False, style='surface', show_outline=False)[source]¶
Visualizing Node Responses.
Parameters¶
- odb_tag: Union[int, str], default: 1
Tag of output databases (ODB) to be visualized.
- 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).
- scale: float, default: 1.0
Scales the size of the deformation presentation.
- show_defo: bool, default: True
Whether to display the deformed shape.
- resp_type: str, default: disp
Type of response to be visualized. Optional: “disp”, “vel”, “accel”, “reaction”, “reactionIncInertia”, “rayleighForces”, “pressure”.
- resp_dof: str, default: (“UX”, “UY”, “UZ”)
Component to be visualized. Optional: “UX”, “UY”, “UZ”, “RX”, “RY”, “RZ”. You can also pass on a list or tuple to display multiple dimensions, for example, [“UX”, “UY”], [“UX”, “UY”, “UZ”], [“RX”, “RY”, “RZ”], [“RX”, “RY”], [“RY”, “RZ”], [“RX”, “RZ”], and so on.
Note
If the nodes include fluid pressure dof, such as those used for …UP elements, the pore pressure should be extracted using
resp_type="vel", andresp_dof="UZ".- show_bc: bool, default: True
Whether to display boundary supports.
- 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.
- show_undeformed: bool, default: False
Whether to show the undeformed shape of the model.
- show_outline: bool, default: False
Whether to display the outline of the model.
- style: str, default: surface
Visualization mesh style of surfaces and solids. One of the following: style=’surface’, style=’wireframe’, style=’points’, style=’points_gaussian’. Defaults to ‘surface’. Note that ‘wireframe’ only shows a wireframe of the outer geometry.
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