All pairs n-body simulation of electromagnetic forces on charged particles, adapted from Nvidia SDK 3.2 sample. Uses Lorentz force from EM fields via the Biot-Savart law for moving charged particles (uses relative velocity). Relativistic.
Flatland is a simple cross-platform object-oriented 2D collision library. It presents a C++ interface to the Open Dynamics Engine physics SDK. Flatland does not handle graphics, but two sample programs are available, both of which use OpenGL.