Authored by @zbwrm (Aydin O'Leary) and @mmadanguit (Marion Madanguit).
Python script that models Brownian motion of particles and hopefully, eventually, colloidal glass transitions.
particles.py
- performs all particle simulation calculations.data.csv
- contains data output of simulation.plot_collisions.py
- outputs animated simulation of the particles moving over time.plot_MSD.py
- outputs plot of the particles' mean square displacement over time.plots
- contains example outputs ofplot_collisions.py
andplot_MSD.py
- Clone the repository.
- Run
python -m venv venv
andsource venv/bin/activate
to set up and activate a virtual environment. - Run
pip install -r requirements.txt
to install the dependencies.
- Run
python particles.py
to run our simulation. - Run
python particles.py > data.csv
to save the output of the simulation to a file called data.csv. - Run
python plot_collisions.py
to see an animated simulation of the particles moving over time. - Run
python plot_MSD.py
to see a plot of the particles' mean square displacement over time.
Note: All plots open in a separate browser window.
Animated simulation of particles moving over time:
Plot of particles' mean square displacement over time: