Density plot #1318
-
Hello, I want to have a plot of the material density of the elements. Can someone please guide me how to do it. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @manarshhjot I think that using PyVista here would be the most straight-forward way to get this type of plot. We can use mesh.grid to create mesh that PyVista can plot, and have an array of density for each element that can be used as cell data to be plotted. See this: https://docs.pyvista.org/user-guide/what-is-a-mesh.html A normally 'hard' part would be to gather the actual density values for each element. I noticed from your last discussion that your model may already be set up to gather this easily as it had logic to define a Material ID for each element, each with a unique density. Are you still using that model with respect to this question? Mike |
Beta Was this translation helpful? Give feedback.
-
Hi All |
Beta Was this translation helpful? Give feedback.
Hi All
The answer above with the example Jupyter Lab zipped file will work for densities defined by the MP command. The TB command can also be used especially for creating density (single value), and as a function of a field variable like time or x/y/z coordinates. I don't see a way of using *GET to get the field variable values, so we would need to know those...which if defined in a PyMAPDL script should not be too difficult! Mike