Field Precision title

Trajectories that stop unexpectedly in Trak and OmniTrak

On occasion, users report calculations where particle trajectories stop in the middle of the solution space. They usually assume that there are subtle physical causes, but the resolution is often simpler. In this article, I'll review the causes of orbit stopping and methods to detect them.

At each integration step, the routines to advance trajectories in Trak and OmniTrak check for the following conditions:

  1. The number of steps exceeds NTrackMax.
  2. The elased time exceeds TMax.
  3. The total distance exceeds DMax.
  4. The particle leaves the solution boundary.
  5. The particle crosses a stopping plane
  6. There is an error in the electric or magnetic field calculation at the new particle position.

The user-definable variables NTrackMax, TMax and DMax are included to prevent infinite calculations with reflex or periodic orbits. The default values for the variables are quite large, but in some cases trajectories in user setups may exceed the limit. For instance, a short time step must be used in high magnetic fields so that the total number of integration steps may exceed NTrackMax. To correct the program, use the associated commands to increase the values.

The fourth condition is that the particle left the boundaries of the electric or magnetic field solution. In this case, it is no longer possible to calculate fields, so the program issues an error message unless the Ballistic flag is set (see the Boundary command). For the present discussion, we can disregard this condition because we are concerned with events inside the solution space. Similarly, the stopping plane condition would not cause a problem unless you forgot that it was set.

Regarding the final conditions, Trak and OmniTrak stop trajectories when there is an invalid field condition or when a particle enters a material region. Mysterious stopping may occur when a region that is supposed to be a Vacuum is set to the Material condition by an error or the default assignments in the codes. If a particle stops at a region boundary, check the listing file (TLS or OLS). It contains a table of material assignments for different regions. use the Material, Vacuum or Secondary commands to correct any errors.

Use the Orbinfo command if the cause of trajectory termination is not evident. In response to this command, the program makes a notation in the TLS or OLS file at the end of each orbit. In SCharge and RelBeam mode calculations, notations are made only for the final iteration. Here is an example:

Termination status of particle number 2
 Orbit outside the boundary of the electric field solution
 Final position: [ 5.4806E-03, 0.0000E+00, 3.9995E+00]
 Final momentum: [ -2.0874E-03, 0.0000E+00, 1.9884E-01]
 Final kinetic energy: 1.0006E+04

LINKS