2D-Particle-Simulations

https://quantumwarlock.github.io/2D-Particle-Simulations/

This repository features several scripts for simulating non-relativistic elastic 2D collisions. In all cases, the particles are modeled as circles.

I may include a relativistic, inelastic example from nuclear physics in the future. Please send me an e-mail, if there is enough interest I’ll include it sooner than later.

Requirements

Anaconda Python is recommended (need version information) but not required. A Python3 distribution with the following modules are required: numpy, random, matplotlib, math.

Python Scripts

All of the following simulations scale the radius of the particles based on the number of the particles chosen (so they fit nicely and don’t overlap). The initial time-step is also scaled based on the radius and initial velocities. The radius and time-step algorithms are conservative and could both easily be increased. The scripts feature various random and initial condition correction code that can be uncommented and used to suite ones needs if useful.

The following files are located in the scripts directory:

Movies

The following files are in the movies directory. The animated gifs are meant to demonstrate a capability for each simulation of the same name.