Classical electrodynamics n-body simulation in Python
In classical electrodynamics, the force on a charge
Where
For this simulation, if the distance between charges is much less than the distance that light travels during the time step, the retarded time is ignored entirely. However, at distances greater than that, the retarded times are used.
Currently, the simulation only plots and makes videos in 2D using matplotlib, and only the 2D version can make visuals. 3D versions are in progess and will likely use vpython because matplotlib 3D plotting does not work well for this.
The simulations currently do not account for the force blowing up when two charges get too close to each other, but it's a work in progess.
Also, the retarded times are not accounted for yet and the simulation will only run if the retarded time is less than the time step.
Conservation laws for electrodynamics are also not accounted for yet due to the much higher complexity compared to mechanics.