Jump to content

N-Body Physics: learning resources


davidparks21

Recommended Posts

I'm interested in learning how to do n-body gravitational calculations. I wonder if anyone can suggest good texts on the subject (strong preference for eBooks), or any other resources I might look to in order to come up to speed on the subject. I'm willing to tackle reasonably significant resources on the subject, I don't just want the overview.

I noticed this book on amazon (though no eBook version), but since I don't know what I don't know yet, it's probably best to ask.

http://www.amazon.com/Gravitational-N-Body-Simulations-Algorithms-Mathematical/dp/0521121531

Link to comment
Share on other sites

What's your background in physics, math, and numerical methods like?

In a nutshell, an n-body simulation is just a numerical solution to a differential equation. If you have no experience with that, I would start there. Any good introductory text on numerical methods will cover basic methods and various problems one encounters. Gravity is a very special case, and you'll probably want a text that specializes in that, but you'll probably find the entry curve too steep if you don't get yourself comfortable with standard methods. And, of course, if you aren't familiar with differential equations at all, then you'll need to take another step back and get at least basic familiarity.

It also helps a lot when learning numerical methods to be able to try them out, which means programming. If you simply want to learn and write some proofs of concept, you can program in just about anything. But if you hope to solve real n-body problems, you'll probably need to learn C. Almost any other option comes with too many restrictions that prevent getting the computational performance you need. So if you haven't started learning to program, and you have a serious interest in computational physics, I strongly recommend starting with C.

Finally, some basic physics helps. But unlike gravitational perturbations or restricted 3-body, which require very serious understanding of mechanics, n-body gravity just requires you to know Newton's Laws of motion and Newton's Universal Gravity. Basically, nothing you couldn't pick up even from KSP.

As for specific texts, for introduction to Numerical Methods, Introduction to Numerical Analysis by Stoer and Bulirsch is not bad, and is not too hard to get through on your own. If you know what a differential equation is, but don't know how to solve it numerically, it will get you started.

Also, if you are going to be writing numerical code in C, Numerical Recipies in C is going to be your good friend. Note, it will not teach you good programming practices. Just efficient ways of organizing your computational code. Or just use code from the book directly to do some standard computational steps.

P.S. If you are already comfortable with programming in C and/or C++, but are looking for squeezing more computational power for your projects (and you'll need it for n-body), consider learning CUDA. Udacity has a fantastic course for that called Introduction to Prarallel Programming with CUDA. So if you are going to be learning numerical methods and writing your own code to tackle n-body problems, you can develop all of that in CUDA as you work through it.

Edited by K^2
Link to comment
Share on other sites

Fantastic response!! Thank you so much for taking the time to write that!

I'm pretty sure I can handle the differential equations, though it'll take a tad bit of study to come back up to speed. I've coded in java mostly, and for problems such as learning algorithms I prefer MATLAB, which incidentally makes cuda support near trivial, so I'll probably start there. I think my biggest deficiency is numerical analysis so I'll start there.

I'd like to code a tool that aids with identifying and planning multi step gravity assists in ksp more fluidly than trying to link up each hop individually. At least as a project to drive me to learn the subject in general.

Edited by davidparks21
Link to comment
Share on other sites

For KSP specifically, you do not need n-body physics. A search for optimal transfer there is purely a solution to a non-linear optimization with constraints. That said, my recommendation on starting resources would be nearly unchanged.

For solving the same problem with real gravity, you need both.

Link to comment
Share on other sites

If you did not checked it out already, i would encourage you to also check the WIP mod Principia

http://forum.kerbalspaceprogram.com/threads/68502-WIP-Principia-N-Body-Gravitation-and-Better-Integrators-for-Kerbal-Space-Program

(And maybe ask questions to eggrobin if you need)

At least, this mod, once done, will allow you to put to practice what you'll learn about n-body physics :)

Link to comment
Share on other sites

I have reservations about that mod. Author claims he is using symplectic integrators, but there is no such thing for n-body gravity. Perhaps, he is simply mis-using the term, and just means higher order RK method. I will take a closer look at it.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...