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_beammodel. Three families of component are supported:Shell forces —
Vx,Vy,Vz,Mx,My,Mz. Element end forces averaged at shared nodes.Displacements —
Dx,Dy,Dz. Nodal translations read directly from thedisplacementsarray.Stress resultants —
N11,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=toplot_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_shellandnode_coordinates. Depending on component, also requiresforces_shell(shell forces),displacements(displacement components), orstresses_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.
Noneuses 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
Truefor plotly,Falsefor 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
Nonewhen show isTrue(plotly backend only).
Raises#
- ValueError
If the dataset does not contain the required data variables for the requested component.