By now you know enough Fortran to write good code for many scientific problems. This is important, however the real issues in scientific computing are the algorithms which are used to uncover new science. In computational physics two very important general classes of algorithms are Monte Carlo methods and Molecular Dynamics methods. In the last project you developed a simple Monte Carlo method for simple spin problem. In this project you will develop a simple Molecular Dynamics procedure for a simple dynamics problem. To get started reading the introduction to MD simulations, including gravitating systems.
PROBLEM
Write a molecular dynamics code to simulate the
motion of N masses interacting via Newton's
force of gravity.
The first
thing to do is to get the algorithm going, then we can
talk about how to calculate various properties, including
finding the rotation of the system and the mass distribution.
For this project your code is expected to be well structured, by following the
these principles.
-Design your code before you starting writing it
-Break your code into sensible subunits
-State precisely, using comments, what each subunit does
-Don't use clever tricks. Make each step as transparent as possible
-Use variable names that have meaning, though overly long variable names are also bad
Choosing a good naming convention is part of your program design