I'm developing a iPhone app that simulates some simple physical systems (to help students to understand basic concepts). The app is already working and available at Apple Store, but I would like to add a new system and that would be a gas compartment simulation. For that matter I will need to simulate the movement of many many particles (maybe 1000 or 10000) and to simulate the expansion, pressure, temperature, etc. I need a very fast way to implement collision detection for all those particles (because it will run in the iPhone hardware).
What is the best way to implement collision detection for so many particles with so little processing power?
if someone want to take a look, the app is available at http://idynamic.engenheiro-tdah.com/
thank you all for any help!