danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
https://phantomsph.github.io
Other
103 stars 223 forks source link

Hyperbolic and parabolic setups in set_binary #443

Closed danieljprice closed 1 year ago

danieljprice commented 1 year ago

Type of PR: new physics; resolves #302

Description: Added the ability to handle parabolic and hyperbolic orbits in the set_binary routine, which resolves #302. This does not replace the functionality in set_flyby because by default this routine uses the true anomaly to set the position in the orbit. which is not terribly helpful for unbound orbits. However, it allows one to simply set e >= 1 in any setup calling set_binary and things will at least work.

Testing: manual setup of point mass binary using SETUP=binary:

~/phantom/scripts/writemake.sh binary > Makefile
make setup
make
-> edit .setup file to give e=1 or e>1 and play with angles

Did you run the bots? no

Did you update relevant documentation in the docs directory? no

Francyrad commented 1 year ago

I am infinitely grateful! I will run a test immediately and compare the results with StarSmasher