Ploting 2D mesh using VTK

Hi,

I would like to read VTK file (or similar) to plot 2D mesh from finite element method and display mesh + result. Then I would like to navigate interactively with the mesh and get the result (by picking if possible) on face element or on the node.

Is it possible with plotly ?

Thanks for your help :slight_smile:

Hi, Yes I’ve done something pretty similar, although not with VTK. Since you have an FE mesh already, you can use the nodal coordinates and element connectivity as input into plotly’s mesh3d plot object (https://plot.ly/python/reference/#mesh3d).

Here is an example, my FE model consists of beam elements I plotted with scatter3d, mode=lines and shell elements i plotted with mesh3d. There are separate traces for the model components and for 8 individual results cases: https://plot.ly/~tfg250/23.embed (results cases are toggled off initially and only the first three cases have results when you hover over nodes).

Because the mesh3d objects cannot be toggled on or off, I didn’t want to show too much at once so I made the results cases as 3d scatter plots of nodes with a scale factor on their deformations. (I opted not to include element results yet, but that wouldn’t take much more effort) I feel like this plot is enough to get an idea of the model and results, but it won’t replace an FEA viewer just yet.

1 Like