Ideal Gas Simulation

A while ago in December I did a quick simulation of ideal gas particles in a cube and how their speeds change over time. The mathematics is really quite interesting and over time the velocities approach the Maxwell-Boltzmann distribution. It’s an interesting derivation and there is quite a beautiful derivation from Maxwell based on symmetry arguments alone. I wrote up my version of this argument and it is included on this page.

The MATLAB code for the simulation I did (and a dump of all sorts of data files that I haven’t quite sorted out since) is at my GitHub repository as well as my writeups, but for quick access I’ve included the code writeup below too.


Simulation writeup

Direct link to PDF

Ideal Gas Simulation

Mathematical derivation

Direct link to PDF

Boltzmann Distribution Derivation