Skip to content

Plotting a displacement field from a numpy vector #1135

Answered by mikerife
AnsMainak asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @AnsMainak There could be several answers here depending on some details of the actual numpy vector. And in addition to using using PyDPF core as @pmaroneh suggested. Do the numpy vector values correspond 1-to-1 to nodes in the MAPDL mesh? If so then we can get the MAPDL mesh as a VTK UnstructuredGrid object, then use PyVista to visualize the numpy vector data. There is an example of this in this PyMAPDL Doc Example:
https://mapdldocs.pyansys.com/examples/00-mapdl-examples/transient_thermal.html#sphx-glr-examples-00-mapdl-examples-transient-thermal-py
Scroll down to the "Visualize a Slice" section. Of course you can visualize the whole model and not just a slice but it shows the genera…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@akaszynski
Comment options

@AnsMainak
Comment options

Comment options

You must be logged in to vote
4 replies
@AnsMainak
Comment options

@mikerife
Comment options

@AnsMainak
Comment options

@mikerife
Comment options

Answer selected by germa89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants