Mark Stock

Part-ND

part-nd is a Unix-based, ANSI C, arbitrary-dimensional, stand-alone particle system and fast gravitational simulator. It uses a 2^D-tree system for heirarchical space subdivision and can simulate a variety of forces and boundary conditions including self-gravitation, uniform gravitation, self-contact, wall contact, and spaghetti.

It won't plug in to Maya, there is nothing to click on, you have to type stuff, and it won't use multiple processors, but it can simulate 1 million particles in 100 MB and do a full gravitational velocity evaluation in just a few seconds.

2011-06-08 Version 1.5 includes some corrections and preliminary support for multithreading. Please see the README file in the distribution below for more information.

Files

Part-nd is an extension and rewrite of part3d, which is itself a complete rewrite of an older 2D/3D gravitation code, which is a rewrite of a bouncing-balls code that I wrote back when writing programs was easy but seemed hard. The file you'd download if you want to play with part-nd is called part-nd_v1.5.tar.gz.

Just download the file, unzip and untar it (tar -xzf part-nd_v1.5.tar.gz), change to the new directory (cd part-nd_v1.5) and make it (make).

Features

part-nd supports the following features

Animations

1M particles in 3D under self-gravitation; from random distribution in a flattened disc with solid-body rotation input12_03.pnd Movie at YouTube
1M particles in 2D under self-gravitation; from random distribution in a disc with solid-body rotation input12_03.pnd Movie at YouTube
100k particles in 3D under self-gravitation; from random distribution in a 10:1 disc with solid-body rotation; looking down on the the disk run02_03.pnd Movie at YouTube
10k particles in 2D under self-gravitation, uniform gravitation, wall contact, and self-contact; from random distribution in a disc run03_03.pnd Movie at YouTube
10k particle moon impacting a 100k particle planet; self-gravitation and self-contact run09_01.pnd Movie at YouTube
For more simulations possible with part-nd, see the part3d page.

Future plans

Future versions of part-nd may address the following needs:

Please e-mail me if you'd like to see some particular feature in part-nd, or if you use it to make something creative.

Links

There are many references online to ongoing research in N-body simulation. When I find good ones, I'll link them here.

References

J.E. Barnes and P. Hut, A heirarchical O(N log N) force calculations algorithm, Nature 324, 446 (1986)

R. Krasny, Desingularization of periodic vortex sheet roll-up, Journal of Computational Physics 65, 292-313 (1986)