henry2004y / TestParticle.jl

Test particle tracing in electromagnetic field
https://henry2004y.github.io/TestParticle.jl/dev/
MIT License
14 stars 3 forks source link

Phase error tests #132

Open henry2004y opened 5 months ago

henry2004y commented 5 months ago

Besides the energy conservation #73, we are also interested in the phase errors in each numerical algorithms. Consider a single charged particle gyrating in a uniform magnetic field B with no electric field, with an initial velocity fully perpendicular to B. Energy conservation means that the gyroradius would not change, while phase error measures the accumulated difference in the angle $\theta$.

For example, the Boris method has a phase error proportional to $\Delta t$, $\mathcal{O}(\Delta t)$.

We should carefully design a test specifically for measuring the phase errors.

Related questions:

  1. For the adapative schemes, how to choose the time steps?
  2. Do we need to resolve the gyromotion to get accurate results?
  3. For the fixed timestepping schemes, how to choose the optimal time steps?