INNER CODE UNIT · Python
Charge
MatthewFilipovich/pycharge · src/pycharge/charge.py:42
class Charge:
r"""Point charge with time-dependent trajectory.
Attributes:
position_fn (Callable[[Scalar], Vector3]): Position function :math:`\mathbf{r}(t)` mapping
time (s) to position (m). Must be twice differentiable.
q (float): Charge (C). Default: ``e`` (elementary charge :math:`\approx 1.602 \times 10^{-19}` C).
solver_config (SolverConfig): Solver configuration. Default: ``SolverConfig()``.
Note:
Velocity :math:`\mathbf{v} = d\mathbf{r}/dt` and acceleration :math:`\mathbf{a} = d^2\mathbf{r}/dt^2`
computed via JAX autodiff for Liénard-Wiechert calculations.
"""
position_fn: Callable[[Scalar], Vector3]
q: float = e
solver_config: SolverConfig = field(default_factory=SolverConfig)