CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Particle Tracking by providing particle position in CSV format

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By t.teschner
  • 1 Post By t.teschner

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2014, 11:05
Default Particle Tracking by providing particle position in CSV format
  #1
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 211
Rep Power: 17
t.teschner is on a distinguished road
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
fportela likes this.
t.teschner is offline   Reply With Quote

Old   June 15, 2014, 12:56
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Old   June 15, 2014, 14:14
Default
  #3
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 211
Rep Power: 17
t.teschner is on a distinguished road
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
fportela likes this.
t.teschner is offline   Reply With Quote

Old   June 21, 2014, 17:12
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Tom,

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

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] Validation of swak4Foam for lagrangian particle tracking nero235 OpenFOAM Community Contributions 13 March 28, 2017 06:45
particles leave domain Steffen595 CFX 9 March 7, 2016 17:19
Particle Tracking for ion Jun CFX 2 August 31, 2010 09:19
particle tracking Nuclei CFX 1 December 17, 2008 17:59
how to know position of particle in PTK areriko CFX 0 November 19, 2007 22:19


All times are GMT -4. The time now is 21:57.