Particle-in-a-box (PIB) simulation written in C with C++ graphics animator. Uses event-driven programming.
Has thermal gradient and mobile vertical wall.
Project done for my computer programming class at ESPCI Paris under supervision from Prof. Didier Cassereau.
Final grade: A+
Clone repo:
$ git clone https://github.com/jgbrasier/boltzmann-simulation
Build main (in repo directory):
make ./start
Run
start
program outputs a distribution.txt histogram of velocities.
In main():
- Np (Number of particles): varies number of particles (currently program does not run with Np > 200)
- diameter (particle diameter): if increase diameter, reduce Np (ther is no adaptive window scaling, you may encounter a run-time error)
Jupyter Notebook detailing a simple collision model where only the energy of a particle in considered. At each timestep, particles have a probability p of exchanging their energies.