plot_unstruct_responses_animation¶
- opstool.vis.pyvista.plot_unstruct_responses_animation(odb_tag=1, ele_tags=None, framerate=None, ele_type='Shell', resp_type=None, resp_dof=None, shell_fiber_loc='top', savefig=None, off_screen=True, style='surface', unit_symbol=None, unit_factor=None, show_defo=True, defo_scale=1.0, show_bc=True, bc_scale=1.0, show_mp_constraint=False, show_outline=False, cpos='iso', show_model=True, show_max_min=True, lazy_load=False)[source]¶
Unstructured element (Shell, Plane, Brick) response animation.
- Return type:
Plotter
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 truss elements to be visualized. If None, all truss elements are selected.
- ele_type: str, default: “Shell”
Element type, optional, one of [“Shell”, “Plane”, “Solid”].
- framerate: int, default: None
Framerate for the display, i.e., the number of frames per second.
- savefig: str, default: None
Path to save the animation. The suffix can be
.gifor.mp4.- off_screen: bool, default: True
Off-screen rendering, i.e., not showing the rendering window. If False, the rendering window will be displayed.
- 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.
Important
The resp_dof parameter depends on the argument nd_material_type in
opstool.post.CreateODB. It can only be one of the returned responses.For
ShellelementsIf 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
Planeelements, one of [“sigma11”, “sigma22”, “sigma12”, “sigma33”, “p1”, “p2”, “p3”, “sigma_vm”, “p_mean”, “q_triaxial”, “q_cs”, “q_oct”, “tau_max”].“sigma11, sigma22, sigma12”: Normal stress and shear stress (strain) in the x-y plane.
“sigma33”: Out-of-plane normal stress (strain).
“p1, p2, p3”: Principal stresses.
“sigma_vm”: Von Mises stress.
“p_mean”: Hydrostatic stress.
“q_triaxial”: Deviatoric stress in triaxial test: q_tri = p1 - p3.
“q_cs”: Deviatoric stress in critical state soil mechanics, q_cs = √(3J₂), where J2 = 1/6 * [ (p1-p2)^2 + (p2-p3)^2 + (p3-p1)^2 ].
“q_oct”: Deviatoric stress in octahedral shear stress, τ_oct = √(2/3) * √(J2).
“tau_max”: Maximum shear stress, 0.5*(p1-p3).
If None, defaults to “sigma11”.
For
BrickorSolidelements, one of [“sigma11”, “sigma22”, “sigma33”, “sigma12”, “sigma23”, “sigma13”, “p1”, “p2”, “p3”, “sigma_vm”, “p_mean”, “q_triaxial”, “q_cs”, “q_oct”, “tau_max”]“sigma11, sigma22, sigma33”: Normal stress (strain) along x, y, z.
“sigma12, sigma23, sigma13”: Shear stress (strain).
“p1, p2, p3”: Principal stresses.
“sigma_vm”: Von Mises stress.
“p_mean”: Hydrostatic stress.
“q_triaxial”: Deviatoric stress in triaxial test: q_tri = p1 - p3.
“q_cs”: Deviatoric stress in critical state soil mechanics, q_cs = √(3J₂), where J2 = 1/6 * [ (p1-p2)^2 + (p2-p3)^2 + (p3-p1)^2 ].
“q_oct”: Deviatoric stress in octahedral shear stress, τ_oct = √(2/3) * √(J2).
“tau_max”: Maximum shear stress, 0.5*(p1-p3).
If None, defaults to “sigma11”.
- 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.
- unit_factor: float, default: None
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 the 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.
- show_defo: bool, default: True
Whether to display the deformed shape.
- defo_scale: float, default: 1.0
Scales the size of the deformation presentation. 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: 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_outline: bool, default: False
Whether to display the outline of the model.
- cpos: str, default: iso
Model display perspective, optional: “iso”, “xy”, “yx”, “xz”, “zx”, “yz”, “zy”. If 3d, defaults to “iso”. If 2d, defaults to “xy”.
- show_model: bool, default: True
Whether to plot the all model or not.
- show_max_min: bool, default: True
Whether to show the maximum and minimum response value labels.
- lazy_load: bool, default: False
Whether to lazily load the response data. If True, the response data will be loaded on demand when needed for plotting. This can save memory when dealing with large datasets. If False, all response data will be loaded into memory at once. If you encounter memory issues, consider setting this parameter to True, elsewise, set it to False for plotting in safety.
Returns¶
Plotting object of PyVista to display vtk meshes or numpy arrays. See pyvista.Plotter.
You can use Plotter.show. to display the plotting window.
You can also use Plotter.export_html. to export this plotter as an interactive scene to an HTML file.