CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Particle Tracking by providing particle position in CSV format (https://www.cfd-online.com/Forums/paraview/134968-particle-tracking-providing-particle-position-csv-format.html)

t.teschner May 7, 2014 10:05

Particle Tracking by providing particle position in CSV format
 
I have a code where I calculate an unsteady channel flow with obstacles inside and I want to visualise particles following the flow. For that I solve an equation inside my code which gives me the particle location at every timestep (x,y,z coordinates) which I then store as a CSV file.

I have a CGNS file where I store my flow solution so inside paraview I want to visualise the unsteady flow with the particles on top so that I see for each timestep the contour plot of, let say velocity, superimposed with the particles.

I have tried to import the csv file into paraview and then use the the filter "TableToPoint" which at least shows me the particles, but for every timestep.

Anyone an idea how to do that? For a start, I am using a simplified geometry (box, Re=40, 10 timesteps) so actually more or less a steady flow, but if someone wants to give it a try, here are the files (CGNS and csv):

www.siteless.de/cfdonline/box.tar.gz

wyldckat June 15, 2014 11:56

Hi Tom,

I've been meaning to look into this post of yours for quite some time now, but only today did I manage to have a quick look into it.

I wasn't able to load the ".cgns" file to ParaView 3.12.0 and ParaView 4.1.0 didn't even give me the option to try.

As for the CSV file, I would suggest that you try having numbered files, like this:
Code:

coord00001.csv
coord00002.csv

The open the file group "coord..csv", instead of a single file at a time. Problem is that this way enforces that the time snapshots have to be integers.

The other solution is to use a Programmable source for loading the CSV files. You can find both examples (loading CSV and delivering at the desired time snapshot) here: http://www.paraview.org/Wiki/ParaVie...Python_Filters

Best regards,
Bruno

t.teschner June 15, 2014 13:14

Hi Bruno,

thanks for your effort, I use named files like coord00001.csv, cooord00002.csv but for different locations, sure I could change it to have just one particle per file but i am looking at thousands of particles, hence my file structure ... but anyway, i could also just output a couple of particles just for visualisation purposes. I have posted this also in the paraview mailinglist and got some good helpful support. once i have the time to look into that i will put my solution here but it might not be very soon. but thanks for your input again.

regards,
tom

wyldckat June 21, 2014 16:12

Hi Tom,

Ah, good to know!
Then for future+quicker reference, I'll quote the mailing list archive regarding this topic:
Best regards,
Bruno


All times are GMT -4. The time now is 18:15.