Boris particle update
BEACH advances one particle step in two stages: it constructs a candidate trajectory, then resolves the first collision or boundary crossing on that trajectory. The candidate combines a predicted-midpoint field sample, a Boris velocity update, and a trapezoidal position update. Public state and checkpoints keep at the same time level before and after the step.
| State | Time level |
|---|---|
| Input | |
| Field sample | Predicted position |
| Output candidate | |
| Magnetic field | Uniform sim.b0 |
Sample the field at a predicted midpoint
Section titled “Sample the field at a predicted midpoint”For step interval , current velocity predicts the midpoint
The field snapshot is evaluated once there:
The snapshot composes the element-charge field, sim.e0, and any selected periodic zero mode or outer profile exactly once.
Particles in one batch share the snapshot formed from element charge at the start of that batch. See
Field evaluation for its construction.
With use_box=true, only the field-sample position is mapped into the solver’s valid region.
| Axis | Treatment of |
|---|---|
| Both low and high faces periodic | Wrap into the primary box with modulo |
| Otherwise | Clamp between box_min and box_max |
Candidate trajectory endpoints remain in physical coordinates so that the next stage can order a triangle collision against a box-boundary crossing.
Advance velocity with Boris
Section titled “Advance velocity with Boris”For particle charge , mass , and , first apply a half electric acceleration:
The magnetic rotation is
followed by the other half electric acceleration:
The implementation uses the standard Boris rotation with .
Form the candidate position with the trapezoidal rule
Section titled “Form the candidate position with the trapezoidal rule”After velocity is updated, the candidate position uses same-time input and output velocities in the trapezoidal rule:
For a uniform electric field alone, this matches the constant-acceleration velocity and displacement. Regression tests for a smooth spatial electrostatic field verify second-order convergence of candidate position and velocity when combined with the predicted-midpoint field sample.
Split the step at collisions and boundary crossings
Section titled “Split the step at collisions and boundary crossings”The equations above produce a full-step candidate . It becomes the accepted state when the candidate trajectory has no triangle collision or box-boundary crossing.
Triangle collisions and ordinary box crossings are ordered along the straight trajectory segment within the step that
connects and . A triangle collision absorbs the particle at the hit point. If a reflection
action (reflect or redistributed_reflect) or periodic face is crossed first, BEACH obtains the position from the chord
parameter. The event velocity follows the chord tangent and is normalized to the speed implied by the discrete work of the
predicted-midpoint electric field,
BEACH then constructs a new Boris candidate for the remaining interval. This keeps the normal velocity direction consistent
with the chord crossing and preserves event speed for any pure magnetic field. A non-positive or non-finite reconstructed
speed fails closed. However, BEACH also uses the chord crossing fraction as the remaining-time fraction; it does not solve the
exact physical crossing time under acceleration or magnetic rotation. This is a time-discretization approximation of the
trajectory-chord event model, so runs that use boundary actions or the potential-barrier decision must check convergence with
dt, dt/2, and, when needed, dt/4. At the z-high outer interface, the
applicable coupling path refines crossing time from a quadratic trajectory consistent with the Boris endpoints. See
Particle collision and boundary events.
Properties of the Boris update
Section titled “Properties of the Boris update”| Condition | Property |
|---|---|
| Pure B | Preserves to roundoff |
| Prescribed uniform E/B | Velocity update is reversible under a sign change of |
| Smooth prescribed field | Current same-time update is second order in position and velocity |
| Mesh collision or open-boundary escape | Irreversible process that ends tracking at the collision or boundary point |
| Self-consistent field changing between batches | Snapshot fixed within a batch and refreshed after charge commit |
Choose dt from trajectories and charging results
Section titled “Choose dt from trajectories and charging results”dt must resolve particle rotation, spatial field variation, and collision geometry:
- cyclotron angle
- transit time over the spatial electric-field variation scale
- transit time near triangles and box faces
- transit time through a rapidly changing outer-interface profile
Triangle intersections use the straight trajectory segment within a step. When an orbit bends strongly in one step or passes
fine geometry, reduce the time step until collision positions converge. Compare dt, dt/2, and when needed dt/4 using
trajectories, hit elements, absorption and escape statistics, and post-batch element charge. Keeping max_step fixed halves the
maximum physical tracking time when dt is halved, so adjust max_step when comparing the same time horizon.
Code reference
Section titled “Code reference”- Boris velocity rotation and trapezoidal position:
bem_pusher.f90 - Predicted-midpoint field and remainder reintegration:
bem_particle_stepper.f90 - E/B, pure-B conservation, reversibility, and convergence tests:
test_dynamics_basic.f90 - Charged-mesh and field-sample tests:
test_particle_stepper.f90