Space-Time Computation and Visualization of the Electromagnetic Fields and Potentials Generated from Moving Point Charges
moving-point-charges is an open-source Python library for simulating the full 3D electromagnetic fields and potentials generated from moving point charges in arbitrary motion with varying speeds (see American Journal of Physics for paper).
The MovingChargesField class calculates the electromagnetic fields and potentials at each grid point by first determining the delayed time of each point charge. The Charge abstract class is the parent class used to specify the trajectory of a point charge in three dimensions, and MovingChargesField is instantiated with a list of objects derived from the Charge class. The MovingChargesField object can then be used to calculate the x, y, and z components of the electromagnetic fields and potentials in the simulation at specified grid points. The MovingChargesField object can also calculate the individual Coulomb and radiation terms of the generated electric and magnetic fields.
Several classes that correspond to moving point charges are included in the library, including OscillatingCharge, OrbittingCharge, LinearAcceleratingCharge, LinearDeceleratingCharge, and LinearVelocityCharge. Visualization and animation examples using matplotlib are shown in the Paper_Figures folder.
The vector and scalar potentials of a moving point charge in the Lorenz gauge, known as the Liénard–Wiechert potentials, at the position with velocity are given by
where , such that is a unit vector from the position of the charge to the field point, and the quantity in brackets is to be evaluated at the delayed time given by
The electric and magnetic fields produced from a moving point charge can be calculated directly from their scalar and vector potentials:
where is the derivative of with respect to . The first term in the electric field equation is known as the "Coulomb field" and is independent of acceleration, while the second term is known as the "radiation field" and is linearly dependent on .