CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

Particle Tracking by providing particle position in CSV format

Register Blogs Members List Search Today's Posts Mark Forums Read

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 7, 2014, 10:05
Default Particle Tracking by providing particle position in CSV format
  #1
Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 57
Rep Power: 5
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, 11:56
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,253
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 13:14
Default
  #3
Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 57
Rep Power: 5
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, 16:12
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,253
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Particle tracking prob, urgent. sakurabogoda CFX 1 March 11, 2013 22:11
Particle tracking problem sakurabogoda CFX 0 January 25, 2013 22:47
Particle Tracking for ion Jun CFX 2 August 31, 2010 08: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 01:15.