I created two similar applets more than three years ago (2005/11), please check out
[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=296.0]particle model for solid/liquid/gas states (2D model)[/url]
[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=297.0]particle model for solid/liquid/gas states in 3D[/url]

Both models include options to add gravity and see what will happened.

Do you have any suggestions about new EJS upload interface or this forum system?
Let me know if there is anything the system can be changed to make user feel easier (to use for teaching/learning purpose).