E cross B drift

I’m confused with the example of particle stepper code
the electric field is in the y direction and magnetic field in the x direction, so E cross B drift points
to z-axis negative direction, but the plot shows proton moves in the postive direction of z axis
I know it’s a basic question but I can’t figure out what’s going wrong.
Any help will be appreciated.

That’s weird. With the Efield in y-hat and the Bfield in x-hat, the drift should be in the negative z-direction. @stanczakdominik Can you take a look at what’s going on?

Oh crud, I think I know what this is. While I was doing that tracker https://github.com/PlasmaPy/PlasmaPy/pull/675/, I might (it was a while ago!) have found a sign error there. Since that PR grew overlarge and got abandoned, and I haven’t yet had the time to go through it again, I completely forgot about that, so thank you for the reminder. I feel pretty silly now.

What I will do is this: over the weekend, I’ll try to go through those changes again and apply any bug fixes to the tracker ASAP.

Apologies for any confusion this caused!

1 Like

I started https://github.com/PlasmaPy/PlasmaPy/pull/953 as fixing the first most likely place where the issue could be located; doesn’t look like a hit, but I’ll probably get there eventually. :slight_smile: