moving-point-charges is an open-source Python library designed to simulate the full 3D electromagnetic fields and potentials generated by moving point charges. This tool supports the analysis of charges in arbitrary motion at varying speeds. For an in-depth understanding, refer to the related American Journal of Physics paper.
For the latest version of this library, please visit the PyCharge repository.
- MovingChargesField Class: Calculates electromagnetic fields and potentials at each grid point by determining the delayed time of each point charge.
- Charge Class: An abstract class that allows the definition of a charge's trajectory in three dimensions.
Instantiate the MovingChargesField
with a list of Charge
objects to begin simulations. The class computes the electromagnetic components (x
, y
, z
) and the individual Coulomb and radiation terms of the electric and magnetic fields.
The library includes several models for moving charges:
OscillatingCharge
OrbittingCharge
LinearAcceleratingCharge
LinearDeceleratingCharge
LinearVelocityCharge
Examples of visualizations and animations are available in the Paper_Figures
folder, showcasing the capabilities of the library using matplotlib for graphical outputs.