a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by am_Unition
am_Unition  ·  3077 days ago  ·  link  ·    ·  parent  ·  post: Images of Jupiter in Infrared!

Thanks :).

This is a custom bit of code for a homework assignment written in Python using an "adaptive" (in time-step) Runge Kutta method. The prof wrote some of it to give us a general direction, and then we had to fill in all of the details. It's only a couple hundred lines of code, nothing too crazy.





OftenBen  ·  3077 days ago  ·  link  ·  

That's even cooler that you made it!

Although I'd need a dumbed down version of the Runge Kutta method explained to me.

How many planetary bodies can it simulate?

am_Unition  ·  3077 days ago  ·  link  ·  

For Runge-Kutta, you start off with some initial "state", a set of spatial coordinates and velocity components for each body, and then use a differential equation to evolve the system in time. The solution of the differential equation governs how the bodies move. In other words; you take a (small) step forward in time, take stock of where everything is, calculate the force on each body due to the others, calculate the resulting acceleration, and then repeat the process.

It can do as many bodies as you like, but the computational intensity increases explonentially (accidentally typed that word out wrong, but I'm keeping it) with each additional body.