Add a direct n-body solver #1571
Labels
Plasma Lv1 | Beginner
Issues appropriate for someone who has some knowledge of physics
plasmapy.simulation
Related to the plasmapy.simulation subpackage
Python Lv2 | Intermediate
Issues that require a medium amount of knowledge of Python
An idea that came up while working on the Coulomb collision notebook in #1569 was that it would be useful to have a direct n-body solver. Having such a solver would let us launch a charged particle towards another at some impact parameter and then calculate and visualize the trajectories, which would be a really helpful thing to do when teaching Coulomb collisions. My guess is that we'd be able to implement a direct n-body solver in$∼100$ lines of code (plus tests & docstrings) so the maintenance burden would probably be low.
The solver would need to be compatible with
astropy.units
, though it should work with NumPy arrays under the hood for performance reasons, and so that we could make better use of Numba. It'd also need to be compatible withplasmapy.particles
. The governing forces could be either the Coulomb force or gravitation.We should also consider alternatives to writing our own n-body solver, such as using one that already exists elsewhere in the pythoniverse and writing a wrapper to make it compatible with
astropy.units
andplasmapy.particles
if it isn't already. We could use then use that solver in the Coulomb collision notebook.The text was updated successfully, but these errors were encountered: