plot_stress_2d (ops_vis)

ops_vis.plot_stress_2d(nds_val, mesh_outline=1, cmap='turbo', levels=50)[source]

Plot stress distribution of a 2d elements of a 2d model.

Parameters:
  • nds_val (ndarray) – the values of a stress component, which can be extracted from sig_out array (see sig_out_per_node function)
  • mesh_outline (int) – 1 - mesh is plotted, 0 - no mesh plotted.
  • cmap (str) – Matplotlib color map (default is ‘turbo’)
Usage:
sig_out = opsv.sig_out_per_node()
j, jstr = 3, 'vmis'
nds_val = sig_out[:, j]
opsv.plot_stress_2d(nds_val)
plt.xlabel('x [m]')
plt.ylabel('y [m]')
plt.title(f'{jstr}')
plt.show()

See also:

sig_out_per_node (ops_vis)

See example Plot stress distribution of plane stress quad model (ops_vis)