Drift-Lorentz mover

This is for expert use only.

In the presence of strong magnetic fields, Warp can use a particle mover that interpolates between drift kinetics and a full Lorentz advance. This mover allows using a time step that is greater than the cyclotron gyro-period. The detailed gyro-motion is lost, but the correct gyro-radius is maintained, along with various drifts, including ExB and grad-B. Please see the reference http://dx.doi.org/10.1016/j.nima.2007.02.035 for more information.

The mover can be turned on for specific species, most likely for electrons. To turn it on for species number js, do the following:

w3d.interpdk[js] = 1

To get the grad-B drift correct, the gradients must be calculated. The recommended method is to set the following:

w3d.igradb = 1

This specifies that a look up table of gridded data is to be used. This data can be setup by calling the routine setbsqgrad from the loadbradb.py module. It should be called only after all of the applied B fields are setup and after the generate.

from loadgradb import setbsqgrad


The grid size, nx,ny,nz and grid dimensions must be set appropriately. Note that when using cylindrical geometry, use xmin,xmax,ymin,ymax = -Rmax,Rmax,-Rmax,Rmax.

When setting the time step size, make sure that the courant limits on the ions and on the parallel dynamics of the interpolated species are obeyed.

Once the above it setup, the simulation can proceed as normal, using the step command.