# How to Model a Basic 2-body Planetary System

Here is a tutorial explaining how to model a two dimensional  2-body planetary system in Excel. It uses the Euler method of integration. The tutorial starts with explaining the simple newtonial laws acting on the two planets. There are essentially just two forces acting on each body at any time: the inertia and the gravitational attraction. During each small time step, from the distance between bodies we can calculate the gravitational forces and from the Newton’s second law we can further calculate the acceleration. From acceleration and the initial speed (the speed at the beginning of the time step) we can calculate the speed at the end of each time step and from all the above known quantities we can find the position at the end of the time interval. This iterative process is (dynamically) repeated over and over and the solution is plotted on a 2D scatter chart. A detailed step-by-step Excel-VBA implementation is further shown.   Recommending this site to your friends would be highly appreciated. Thanks for your support!

[sociallocker] [/sociallocker]

1. george says:
2. Evgeny says: