lwang-astro / PeTar

PeTar is a high-performance N-body code for modelling the evolution of star clusters and tidal streams, including the effect of galactic potential, dynamics of binary and hierarchical system, single and binary stellar evolution.
MIT License
71 stars 19 forks source link

Back calculations using PeTar #49

Open jikrant3 opened 4 months ago

jikrant3 commented 4 months ago

We want to back calculate the positions of a small Nbody system (only dynamics, no stellar evolution is needed). Is there a way to do back-calculations using PeTar? We tried giving negative time-steps, which does not work.

If there is a workaround, do let us know.

lwang-astro commented 4 months ago

PeTar does not support negative time steps, but you can reverse the velocities of each star to integrate backwards instead of using a negative time step.