Plotting element solutions saved as array graphically #2419
Answered
by
germa89
arun-maniam
asked this question in
Q&A
-
Hi, I have an array with values for each elements. I would like to plot this element solution graphically using PyMAPDL. But I'm not sure if this can be done. IF yes, how can this be done? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
germa89
Oct 16, 2023
Replies: 1 comment 2 replies
-
You could do something like this: from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()
# Generate model
#
# Genertate values of each elements
#
grid = mapdl.mesh.grid
scalars = values_for_each_element
grid.plot(scalars=scalars) Based on this example: https://mapdl.docs.pyansys.com/version/stable/examples/gallery_examples/00-mapdl-examples/geometry.html#accessesing-element-and-nodes-pythonically |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
germa89
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could do something like this:
Based on this example: https://mapdl.docs.pyansys.com/version/stable/examples/gallery_examples/00-mapdl-examples/geometry.html#accessesing-element-and-nodes-pythonically