Advanced Boris Methods
The standard Boris method is a widely used algorithm for tracing charged particles because it exactly conserves energy in a static, uniform magnetic field. However, it requires a time step size
To address scenarios requiring extremely high fidelity over long time scales without decreasing the simulation TestParticle.jl implements two advanced variants: Multistep Boris and Hyper Boris.
1. Multistep Boris ( -step Boris)
The Multistep Boris integrator artificially subdivides the standard update cycle into
Let the normalized rotation vector for the standard Boris step be:
In the Multistep Boris scheme, the rotation vector is divided by
The rotation part of the Boris method is recursively applied
2. Hyper Boris (Gyrophase Correction)
The Hyper Boris integrator (Zenitani & Kato, 2025) achieves higher-order accuracy in tracking the precise gyro-orbital phase by introducing specialized correction factors to the electric and magnetic drift terms.
Given an order
where
The factors
4th-Order Hyper Boris (
6th-Order Hyper Boris (
These analytically tuned correctors virtually eliminate phase disparity and energy fluctuation across standard
Using the Advanced Solvers
You can access these features in TestParticle.jl by explicitly defining the parameters n and N in the solve parameters.
n: Sub-cycling division count (default1).N: Evaluator correction order (or ). 2denotes standard uncorrected Boris.
# Standard Boris (n=1, N=2)
sol = TestParticle.solve(prob; dt)
# Multistep Boris (n=2, N=2)
sol = TestParticle.solve(prob; dt, n=2)
# Hyper Boris (n=2, N=4)
sol = TestParticle.solve(prob; dt, n=2, N=4)Combining both
3. Adaptive Boris Method
The AdaptiveBoris solver adjusts the time step
The time step is determined by:
where
Maintaining Time Reversibility and Energy Conservation
The standard Boris method is a second-order, volume-preserving integrator that exactly conserves energy in a static, uniform magnetic field. These properties are closely linked to its time-reversibility. However, naive adaptive time-stepping usually breaks this reversibility because it disrupts the staggered "leapfrog" synchronization between position and velocity.
To preserve the leapfrog structure and maintain energy conservation, TestParticle.jl employs a velocity resync procedure whenever the time step is updated. This technique involves moving the velocity back to the node (position location) and then repositioning it based on the new time step. Given a step from
Advance position: The position is updated to
using the velocity and . Update time step: A new
is calculated based on the magnetic field at the new position . Resynchronize velocity: The velocity
(centered at ) is moved to the node by a half-step Boris push, and then moved to a new half-step location by a half-step backward push.
This ensures that the velocity is always correctly centered relative to the current
4. Using the Advanced Solvers
Fixed-step Advanced Boris
You can access multistep and hyper features in the default solver by explicitly defining the parameters n and N in the solve parameters.
n: Sub-cycling division count (default1).N: Evaluator correction order (or ). 2denotes standard uncorrected Boris.
# Multistep Boris (n=2, N=2)
sol = TestParticle.solve(prob; dt, n=2)
# Hyper Boris (n=2, N=4)
sol = TestParticle.solve(prob; dt, n=2, N=4)Adaptive Boris
You can use the adaptive solver by passing an AdaptiveBoris object as the second argument to solve.
# Adaptive Boris with safety factor 0.05 (20 steps per period)
alg = AdaptiveBoris(safety=0.05)
sol = TestParticle.solve(prob, alg)[1]