... | ... | @@ -2,36 +2,19 @@ Orbit of a test particle around a central mass. |
|
|
|
|
|
Central mass = 1.0 Solar masses
|
|
|
Semi major axis = 1.0 AU
|
|
|
Eccentricity = 0.99
|
|
|
Eccentricity = 0.0
|
|
|
|
|
|
Fails if softening is too large
|
|
|
Run for 10 orbits
|
|
|
|
|
|
![orbit_plot_52](/uploads/a7d74411dbc4cbba4c43a5079b9b7424/orbit_plot_52.png)
|
|
|
From top to bottom:
|
|
|
|
|
|
Reducing softening fixes the issue
|
|
|
Error in position (compared to analytic solution)
|
|
|
|
|
|
![orbit_plot_51](/uploads/1d442f9f462b78617b62915b6d1954df/orbit_plot_51.png)
|
|
|
Conservation of Energy
|
|
|
|
|
|
How to define accuracy?
|
|
|
|
|
|
Run for 10 orbital times, find distance between initial and final position, and see how this changes with 'eta'
|
|
|
|
|
|
![eta_test_plot](/uploads/d5d23c553f45cd21bfcbee79cbd9f8e9/eta_test_plot.png)
|
|
|
|
|
|
Also calculated analytic position at the times of the snapshots, and computed orbit with scipy ODE solver (using 10^6 timesteps per orbit)
|
|
|
|
|
|
![orbit_plot_99](/uploads/cf391e9143a6bb3476c74933efe9c596/orbit_plot_99.png)
|
|
|
|
|
|
From this we can calculate the error.
|
|
|
|
|
|
![orbit_plot_error_99](/uploads/b2970e35495b58988566e4ca976d5586/orbit_plot_error_99.png)
|
|
|
|
|
|
Strange feature: If I start the orbit from periapsis rather that apoapsis, then the errors are much worse (seems like the orbit loses energy somehow)
|
|
|
|
|
|
![orbit_plot_101](/uploads/61e87602ccdc96f795e5a112a73537af/orbit_plot_101.png)
|
|
|
|
|
|
![orbit_plot_error_101](/uploads/d549b4383a7ebe744c844251b58237fe/orbit_plot_error_101.png)
|
|
|
Conservation of angular momentum
|
|
|
|
|
|
![point_mass_eta_test_r_1](/uploads/2f8acc7d28ef05ec353e98e97720a709/point_mass_eta_test_r_1.png)
|
|
|
|
|
|
|
|
|
|
... | ... | |