I have a numpy array with the 3-dimensional coordinate information for over a million particles for around 1000 time steps. Is it possible to use ParaView to visualize the transient motion of those particles in 3D?
Dear Mathieu (@mwestphal),
Many thanks for your reply. I am very happy to know that it is possible.
Currently, the format of our data is numpy (.npy). It is in tabular form: with the x,y, and z values for each particle for 1000 different time steps.
For eg. (t=1), (x1, y1, z1), (x2, y2, z2) … (xn, yn, zn)
:
:
(t=1000), (x1, y1, z1), (x2, y2, z2) … (xn, yn, zn)
Is this format accessible by ParaView or should it be transformed?
Since this is a numpy array, we can transform the data which could be used by ParaView.
Could you please share some examples with me for a similar problem or for multiparticle visualization on ParaView? It would be highly helpful.
Thank you.
–
Somnath
Not directly, but you should be able to read it very easily with a python programmable source.
You could also transfrom it into .csv files.
Yes, I can transform the npy into csv. Could the trajectories then be visualized by ParaView?
Yes, create one .csv per timestep, with columns like this:
X Y Z field1 field2 fieldN
- Then open the
yourFile....csv
in paraview, - add a
TableToPoints
filter and select the correct XYZ fields, press Apply - Press play