Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking individual particles #40

Closed
AdamFenton opened this issue Sep 9, 2021 · 2 comments
Closed

Tracking individual particles #40

AdamFenton opened this issue Sep 9, 2021 · 2 comments

Comments

@AdamFenton
Copy link

Hi Daniel,

I hope you are well. I'm trying to track individual particles from snapshot to snapshot through the simulation and am having some issues. I thought of using the particle ID numbers but these don't seem to be allocated to the same particles in one snapshot as they are in the next.
Is there something I am missing that enables the user to do something like this? Find the ID number of a particle at x1,y1,z1 at t = t_1 and then, using that ID number, find x2,y2,z2 of the particle at t = t2?

@dmentipl
Copy link
Owner

dmentipl commented Oct 1, 2021

Hi @AdamFenton, sorry for the delayed response! I'm well, I hope you are too.

The particle id numbers in Plonk correspond to the array index of each particle as they are on file. I'm not 100% sure but I believe Phantom does keep all particles consistently "numbered" throughout a simulation. (Unless you mess with the snapshots and restart a calculation.)

I would be interested to know if you can make a small reproducible example of this issue and post it here. In my experience I've had no issues using the particle id consistently from snapshot to snapshot.

Perhaps I should make it clear somewhere in the docs or via a docstring that the particle id is not required to be consistent between snapshots, i.e. it's only guaranteed consistent within a snapshot.

What are your thoughts?

@AdamFenton
Copy link
Author

Hi Daniel,

Apologies - I meant to close this issue almost as soon as I created it. I must have been doing something wrong somewhere. It all works as it should now.

All the best!
Adam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants