jonapost / field_propagation

Module for integrating a track's trajectory in a field, whether magnetic, electric, combined electromagnetic, or also including gravity or other forces.
6 stars 20 forks source link

Compare accuracy and performance of Nystrom steppers for uniform field #9

Open jonapost opened 9 years ago

jonapost commented 9 years ago

Compare the error of the position, momentum and number of field evaluations in new Nystrom steppers versus an established stepper ( ClassicalRK4 or CashKarpRKF45 ) and potentially a representative new non-Nystrom stepper.

( Issue to group these comparisons, and separate from other topics. )

jonapost commented 9 years ago

Below is a copy of Jason's post from Issue #8

"The first 3 plots are for a Uniform field (I also included a 3dplot of the trajectory). Compute Step Size is 2000 mm. This is with all the geometry in tPMF, so intersections are checked for etc... Error would be lower in general without corrections for intersections with volumes.

position_step_size_2000mm_geometryon_uniform_mag_field

Whatever was causing the dubious momentum error plots is not occurring anymore:

momentum_step_size_2000mm_geometryon_uniform_mag_field

functioncalls_step_size_2000mm_geometryon_uniform_mag_field

Trajectory (from tPMF). As you can see it makes at least one full rotation. The Radius of curvature is 970.4907... mm:

trajectory3d_uniform_field

(End of copy of post)