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

Need help in tracking particles

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By guin
  • 1 Post By guin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2018, 15:33
Default Need help in tracking particles
  #1
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8
raptorishungry is on a distinguished road
Hello Foamers!

I need help in post processing of my results from Lagrangian solver. Is there anyway to backtrack each and every particle from its final position all the way to it's inlet position? (some particle ID ?) as the cloud positions store only the positions of each particle and the cell ID associated with the positions, is there anyway I could identify the particle individually?

Please let me know if you can think of any work around. Thank you.
raptorishungry is offline   Reply With Quote

Old   September 6, 2018, 17:40
Default
  #2
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
I guess that you are looking for the particle property called "origId", which is unique for each particle.
guin is offline   Reply With Quote

Old   September 6, 2018, 19:50
Default
  #3
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8
raptorishungry is on a distinguished road
Hello Rodrigo, thank you for your quick reply. I just have a couple of more questions, please let me know your views.

1. The order in which the items appear in each file under <timestep>/lagrangian/kinematicCloud/ is the same?. For example, the first entry in "origID" and the first entry to "positions" correspond to the same particle?

2. The "active" in <timestep>/lagrangian/kinematicCloud/, has values of 0 or 1. Does 0 mean the particle is at rest?

3. Is it possible to backtrack particles between different computational runs across two geometries? For example, if a particle is travelling from one part of my geometry (simulated first) to another part (simulated after), is it possible to backtrack the particle to it's inlet in the first part geomtery?

Thank you once again!
raptorishungry is offline   Reply With Quote

Old   September 7, 2018, 05:21
Default
  #4
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
Originally Posted by raptorishungry View Post
Hello Rodrigo, thank you for your quick reply. I just have a couple of more questions, please let me know your views.

1. The order in which the items appear in each file under <timestep>/lagrangian/kinematicCloud/ is the same?. For example, the first entry in "origID" and the first entry to "positions" correspond to the same particle?

2. The "active" in <timestep>/lagrangian/kinematicCloud/, has values of 0 or 1. Does 0 mean the particle is at rest?

3. Is it possible to backtrack particles between different computational runs across two geometries? For example, if a particle is travelling from one part of my geometry (simulated first) to another part (simulated after), is it possible to backtrack the particle to it's inlet in the first part geomtery?

Thank you once again!
1. In principle, yes. But not necessarily over the time . For instance, if particles are being injected or leaving the domain the nth position may or may not correspond to the same particle as in previous timestep. You can find the new position by following the "origId".

2. ... yes, on may see it this way. Take a look at https://github.com/OpenFOAM/OpenFOAM...el.C#L317-L331

3. I do not understand well the situation, but I guess that you would need to manually figure out the correspondences between the last stage of the initial simulation and the initial stage of the 2nd one... May a combined check for origId and origProc be enough for your purpose? https://cpp.openfoam.org/dev/classFoam_1_1particle.html
raptorishungry likes this.
guin is offline   Reply With Quote

Old   September 7, 2018, 13:42
Default
  #5
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8
raptorishungry is on a distinguished road
Quote:
Originally Posted by guin View Post
1. In principle, yes. But not necessarily over the time . For instance, if particles are being injected or leaving the domain the nth position may or may not correspond to the same particle as in previous timestep. You can find the new position by following the "origId".

2. ... yes, on may see it this way. Take a look at https://github.com/OpenFOAM/OpenFOAM...el.C#L317-L331

3. I do not understand well the situation, but I guess that you would need to manually figure out the correspondences between the last stage of the initial simulation and the initial stage of the 2nd one... May a combined check for origId and origProc be enough for your purpose? https://cpp.openfoam.org/dev/classFoam_1_1particle.html
1. Yes, that makes sense. I thought that would be the case. Thank you so much for clarifying!

2. Thank you so much! that clarifies my concern. I tracked some of the particles with "active" status as 0, through their origId, and noticed that they had a non-zero velocity under <timestep>/lagrangian/kinematicCloud/U. Is this the velocity of the particle just before its deposition in the patch that has "stick"?

3. I apologize for being a bit vague. I have two channels that are connected to each other and aligned according the gravity vector. As it was too cumbersome to simulate them together (around 10 million elements), I split the geometry and thought of simulating the second portion after the first.

So, the same particle would have a different origId when I inject it for the second run. As you said, I can manually monitor the particle's new origId, but is it the only way to do it?. Also, the "origProcId" in every <timestep>/lagrangian/kinematicCloud/ shows the total number of particles and the number of processors handling them. How do you suggest I may use them for particle tracking?

Once again, I appreciate your help. Thank you for your inputs.
raptorishungry is offline   Reply With Quote

Old   September 7, 2018, 17:45
Default
  #6
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
2. Thank you so much! that clarifies my concern. I tracked some of the particles with "active" status as 0, through their origId, and noticed that they had a non-zero velocity under <timestep>/lagrangian/kinematicCloud/U. Is this the velocity of the particle just before its deposition in the patch that has "stick"?
I didn't check the code for it, but if this value does't vary with the time most probably it is.

Quote:
3. I apologize for being a bit vague. I have two channels that are connected to each other and aligned according the gravity vector. As it was too cumbersome to simulate them together (around 10 million elements), I split the geometry and thought of simulating the second portion after the first.

So, the same particle would have a different origId when I inject it for the second run. As you said, I can manually monitor the particle's new origId, but is it the only way to do it?. Also, the "origProcId" in every <timestep>/lagrangian/kinematicCloud/ shows the total number of particles and the number of processors handling them. How do you suggest I may use them for particle tracking?

Hmmm... to be honest, I would have to ply a bit trial-and-error to answer this question.


Expert user's suggestion: If the answer is worth to invest a day on the seek, why don't you resemble your simulation workflow with two easy 2D-geometries (e.g. 10x10x1 cells each) and a low number of particles passing from one to the other (e.g. less than 10)? this will surely solve your questions much better than any guesswork from my side.
raptorishungry likes this.
guin is offline   Reply With Quote

Old   September 7, 2018, 19:31
Default
  #7
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8
raptorishungry is on a distinguished road
Quote:
Originally Posted by guin View Post
I didn't check the code for it, but if this value does't vary with the time most probably it is.




Hmmm... to be honest, I would have to ply a bit trial-and-error to answer this question.


Expert user's suggestion: If the answer is worth to invest a day on the seek, why don't you resemble your simulation workflow with two easy 2D-geometries (e.g. 10x10x1 cells each) and a low number of particles passing from one to the other (e.g. less than 10)? this will surely solve your questions much better than any guesswork from my side.
1. Yes, I checked the code and the values of U don't vary with time for the "inactive" particles. So I assume it's the velocity just before it got deposited. Don't know why it is stored though.

2. That is better than guessing, true. I will try to run it on a simple geometry, and see if I can come up with some method to couple the particle flow between them.

Thank you very much for your help Rodrigo! I shall post my results if I'm successful
raptorishungry 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
trying to simulate two-phase jet flow with particles in surface injection ajkratos FLUENT 5 March 3, 2015 21:33
Ubuntu 12.10 + openfoam2.2.0 ==> paraview error message peteryuan OpenFOAM Installation 6 August 18, 2013 18:00
[OpenFOAM] ParaView ErrOr soheil nazmdeh ParaView 1 August 17, 2013 07:40
DPM for steady flow with unsteady particles tracking yahya FLUENT 0 March 28, 2013 13:28
Per face tracking of particles that left and entered the cell in dsmcFoam sor OpenFOAM Programming & Development 1 August 28, 2012 05:35


All times are GMT -4. The time now is 12:07.