Point Charges#
The scalar and vector potentials generated by a moving point charge in the Lorenz gauge are given by the Liénard-Wiechert potentials:
Here:
\(\boldsymbol{\beta}_s = \mathbf{v}_s / c\) is the source velocity in units of the speed of light.
\(\mathbf{n}_s = (\mathbf{r} - \mathbf{r}_s)/R\) is the unit vector from the source position \(\mathbf{r}_s\) to the field point \(\mathbf{r}\), with \(R = |\mathbf{r} - \mathbf{r}_s|\).
The subscript \(t_r\) indicates that source quantities are evaluated at the retarded time \(t_r = t_r(\mathbf{r}, t)\), defined implicitly by
The fields are obtained from the potentials by the usual relations
Carrying out the differentiations yields the explicit expressions for the fields:
In these expressions, the Lorentz factor is \(\gamma = 1/\sqrt{1-|\boldsymbol{\beta}_s|^2}\), and \(\dot{\boldsymbol{\beta}}_s\) denotes the derivative of \(\boldsymbol{\beta}_s\) with respect to time. The first term in Eq. (6) scales as \(1/R^{2}\) (Coulomb field), while the second term scales as \(1/R\) (radiation field), and thus dominates at large distances from an accelerating charge.
PyCharge Implementation#
To compute the Liénard-Wiechert potentials and fields numerically, PyCharge solves the implicit relation in Eq. (3) for each charge and observation point to determine \(t_r\). This root-finding problem is implemented efficiently using the Optimistix library, a JAX-native optimization framework that provides differentiable solvers.
PyCharge supports calculating the fields for an arbitrary number of point charges by using the superposition principle: the total potentials and fields are obtained by summing the contributions from each point charge.
In PyCharge, each point charge is represented by a Charge object, which is
initialized with a user-supplied trajectory function that accepts time t and returns the position
tuple (x, y, z). Velocity and acceleration, which are required to calculate the potentials and
fields, are computed using JAX’s automatic differentiation engine through jax.jacobian().
Approximating continuous densities#
The charge and current densities of a point charge \(q\) following a trajectory \(\mathbf{r}_s(t)\) with velocity \(\mathbf{v}_s(t)\) are
A continuous charge density \(\rho(\mathbf{r})\) can be approximated by populating a region with many point charges whose individual charges are set according to the desired density. Similarly, a current density \(\mathbf{J}=\rho\mathbf{v}\) can be approximated using point charges moving along prescribed paths. The accuracy of such approximations improves with the number of sample charges and with larger observation distances relative to the sample region.
References
J.D. Jackson, Classical Electrodynamics, Ch. 14.1
D.J. Griffiths, Introduction to Electrodynamics, Ch. 10.3