T7: General 3 body problem  (ejection, softening)
Before the tutorials:
Do, think about, and research the following:
-  Bring your own program to the level of the example given for the last tutorial,
so that you can start from a clean and working version.
 
-  This time we need to extend our program to calculate the forces among each 
   of the bodies. How can you do this in a simple manner ?
 
-  Is a system of 3 bodies generally stable ?
 
-  What is a gavity assist ?
 
-  What does gravitational softening means ? Remember the Plummer potential from last time!
 
During the tutorials:
Program it!
  -  Take your program from last time and extend it to calculate the forces among each of the bodies.
       Add the sun to your solar system and check if it still works.  
  -  Set up the sun, earth moon system and see it it works.
       Can you plot the moon's orbit ? 
  -  Set up a 3 body system so that one of them gets ejected. 
 
  -   Try to Set up a system to do a swing by of a satellite.
       Hint: set up a earth moon system and launch a satellite to pass close to the moon ! 
  -  Include a gravitational softening to your calculation. and repeat the previous 3 body system. 
       Repeat the ejection set up. What happens now ? 
Maybe you can further explore the power of C++ if you did not mannage last time:
  - Try to read the initial conditions directly from a file.
 
  - Can you give the file name from the command line top the program ?
 
Example programs:
These are just examples.
- C/C++:
 - F90:
- Simple version (this is sufficient for the moment, but it doesn’t hurt you to start improving it as suggested above):
T6.f90
(colorized),
Makefile
(colorized) (rename to “Makefile” or use with “make -f Makefile_gfortran”)
 - More complex version:
(To be added later.  We will reorganize the program structure when we get to multiple particles; think about how you would do this on your own.)
 
 
Discussion of the results:
Plot your results with gnuplot and plot the behaviour of the systems using different initical conditions.
  Can you explain what you see ?
  
Example plots:
Programming goals for T7:
Goal of this tutorial is that you get further familiar with the vector class in C++.
   In addition you might get more familiar with reading your initial setup directly from a file.