Why PyCharge?#
The PyCharge library was developed for two primary purposes:
Calculating and visualizing the electromagnetic fields and potentials generated by moving point charges with predefined trajectories;
Self-consistent time-domain simulations of electromagnetic sources like dipoles and free charges.
PyCharge can calculate the total fields and potentials, at specified grid points in space and time, generated by the point charges in the simulation. To calculate these fields and potentials, PyCharge applies the principle of superposition in classical electrodynamics by calculating the individual contributions from each point charge and then summing the results.
The equations describing the scalar and vector potentials generated by a single moving point charge in a vaccuum are given by the Liénard-Wiechert potentials. The complete and relativistically correct equations for the time-varying electric and magnetic fields can be derived from these potentials.
During the simulations, the dynamics of every electromagnetic source are computed by numerically integrating its associated ordinary differential equation (ODE) at each time step. Sources include free particles, which follow the Lorentz force equation, and dipoles, which follow the driven harmonic oscillator equation. The local electromagnetic field acting on any given source is obtained by summing the field contributions from all other sources in the system.
References
J.D. Jackson, Classical Electrodynamics, Ch. 16.1