Skip to content

Introduction

The PyCharge package was developed for calculating and visualizing the electromagnetic fields and potentials generated by moving point charges that have predefined trajectories and dipoles that act as Lorentz oscillators. 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 expoits 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. The dipoles are governed by a differential equation of motion which is solved numerically at each time step. The theory and computational implementation of these equations in PyCharge are described in detail in the Background Information section.

PyCharge currently supports two types of sources: point charges that have predefined trajectories (specified as parametric equations of motion in the \(x\), \(y\), and \(z\) directions as functions of time), and Lorentz oscillators (i.e., oscillating electric dipoles). The Lorentz oscillators (LOs) consist of two equal and opposite point charges that oscillate around the origin position (center of mass) along the axis of polarization, with a dipole moment that is dynamically calculated at each time step by solving the governing harmonic oscillator differential equation. The LOs are driven by the electric field component along the direction of polarization generated by the other sources in the system (which includes its own scattered field). As well, the LOs are naturally damped since they radiate energy as they oscillate, which dissipates kinetic energy (classically caused by radiation reaction) and decreases the dipole moment. This damping allows PyCharge to calculate the self-consistent radiative decay rates from LOs in arbitrary motion and also in the presence of interactions with other LOs, including collective effects such as superradiance and subradiance.

Motivation

The majority of electrodynamics problems can be divided into two distinct classes: one in which the goal is to solve for the electromagnetic fields generated by specified sources of charge and current (e.g., antennas, radiation from multipole sources), and the other in which the motion of the charges and currents are to be determined based on the known fields in the system (e.g., motion of charges in electric and magnetic fields, energy-loss phenomena).

However, there exists another class of electrodynamics problems where the solution requires that the fields and sources are treated self-consistently. That is, a correct treatment of the problem must include the reaction of the radiation on the motion of the sources. The self-consistent treatment of sources and fields is an old and difficult problem that stems from one of the most fundamental aspects of physics: the nature of an elementary particle. This problem of self-consistency is not only limited to classical electrodynamics, as these difficulties also arise in quantum-mechanical discussions and modelings of these systems. Motivated by the need for an electrodynamics simulator that self-consistently treats the reaction of the radiation on the real-time motion of the point charge sources, we developed the open-source Python package PyCharge.


  1. J. Jackson. Classic Electrodynamics. Chapter 17.1 

  2. L. Novotny, Principles of Nano Optics. Chapter 8