Presentation is loading. Please wait.

Presentation is loading. Please wait.

Many-Body Gravity Simulator

Similar presentations


Presentation on theme: "Many-Body Gravity Simulator"— Presentation transcript:

1 Many-Body Gravity Simulator
Jeffrey Greene Many-Body Gravity Simulator

2 Description of Method Background information: I wanted to model various astronomical phenomena. The n- body problem is unsolved for n>=3, however there are many approximations. Method of Solving: F = G(m1m2)/r^2 Runge-Kutta to solve the ODE too slow for the number of bodies I wanted to simulate (~1000) in MATLAB. Used first-order Euler method to solve since I could optimize it in MATLAB (hint: bsxfun can speed up your code a lot). Decreased accuracy not a big issue, since I’m not interested in the actual data, just the animations.

3 Movie Run the script with the command: solar
Can change simulation mode (“black hole” ejection vs. solar system) and number of planets, asteroids, etc. at the top of the script.


Download ppt "Many-Body Gravity Simulator"

Similar presentations


Ads by Google