Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know what a good force integration looks like in the first place, so I can't really help design the needed calculation, sorry. But I imagine you'd use similar techniques in many ways to get good accuracy.


I found the Ahmad-Cohen scheme [0, PDF] (through [1]), which seems related to what you describe:

> Our scheme takes advantage of this fact by dividing the force on a particle into two parts: a slowly varying part which is due to the "distant" starts, the regular force, and another component, the irregular force, due to the stars in the immediate neighborhood of the star in question.

[2] has a bit more performance info:

> The gain by using by using the Ahmad-Cohen scheme is expressed as (N/3.8)^(1/4) for both the fourth-order standard and Hermite schemes, but would be significantly smaller on vector or parallel machines.

I think Principia currently has info for 34 bodies, so I think the improvement would be on the order of 1.73x according to that equation if the Ahmad-Cohen scheme is implemented (and is applicable).

That being said, I believe it still involves integration, as opposed to the hypothetical closed-form solution in your scheme. If no useful closed-form solution exists for the scheme you describe, then the Ahmad-Cohen scheme might be a closer match.

I admit my initial skepticism was at least partially incorrect. You were right that approximating less substantial influences by increasing the timestep could be useful for performance. The sole remaining question is whether you still need to stick with an integration scheme or whether a closed-form approximation exists.

[0]: https://courses.physics.ucsd.edu/2017/Winter/physics141/Lect...

[1]: https://scicomp.stackexchange.com/questions/21949/n-body-sim...

[2]: http://articles.adsabs.harvard.edu//full/1992PASJ...44..141M...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: