plot_srf#

plot_srf(result_obj, component='Mx', loadcase=None, backend='plotly', **kwargs)#

Plot a contour field over the shell mesh.

Visualises shell element data as an interpolated contour over the deck slab mesh of a shell_beam model. Three families of component are supported:

  • Shell forcesVx, Vy, Vz, Mx, My, Mz. Element end forces averaged at shared nodes.

  • DisplacementsDx, Dy, Dz. Nodal translations read directly from the displacements array.

  • Stress resultantsN11, N22, N12, M11, M22, M12, Q13, Q23. Section stress resultants averaged across the 4 Gauss points per element, then averaged at shared nodes.

The returned Plotly figure can be composed with beam force diagrams by passing it as ax= to plot_bmd() etc.:

fig = og.plot_srf(results, "Mx", backend="plotly", show=False)
og.plot_bmd(proxy, results, backend="plotly", ax=fig)

Parameters#

result_objxarray.Dataset

Results dataset. Must contain ele_nodes_shell and node_coordinates. Depending on component, also requires forces_shell (shell forces), displacements (displacement components), or stresses_shell (stress resultants).

componentstr, default "Mx"

Component to plot. One of:

  • Shell forces: "Vx", "Vy", "Vz", "Mx", "My", "Mz"

  • Displacements: "Dx", "Dy", "Dz"

  • Stress resultants: "N11", "N22", "N12", "M11", "M22", "M12", "Q13", "Q23"

loadcasestr or None, default None

Load case name to plot. None uses the first load case.

backendstr, default "plotly"

"plotly" for interactive 3-D or "matplotlib" for 2-D.

colorscalestr, default "RdBu_r"

Plotly colorscale name (or matplotlib cmap name). Use a diverging scale (e.g. "RdBu_r") for signed data and a sequential scale (e.g. "Viridis") for displacements.

showbool

Display the plot immediately. Default True for plotly, False for matplotlib.

**kwargs

Forwarded to the backend renderer. Accepted keys include figsize, title, opacity, show_colorbar, averaging, and ax / fig for composing onto an existing figure.

Returns#

plotly.graph_objects.Figure or matplotlib.axes.Axes

The figure object, or None when show is True (plotly backend only).

Raises#

ValueError

If the dataset does not contain the required data variables for the requested component.