Wikipedia
Gravit
Gravit is a free and open source gravity simulator distributed under the GNU General Public License. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X.
Gravit uses the Barnes–Hut algorithm to simulate the n-body problem.