But are magnetic fields uniform?
In reality, because magnetic field lines have to be "closed", magnetic fields tend not to be uniform. Since charged particles become "attached" to field lines and simply move along the magnetic field lines gyrating as they go, sooner or later they will enter a region where the magnitude of the magnetic field is different. It is useful to consider two idealistic cases; a magnetic field which varies along the field lines, and one that varies perpendicular to the field lines.
What is the motion of a charged particle in a magnetic field which varies along the field lines?
The configuration here is one in which the field lines get closer together along their direction as seen in the sketch. That is to say the field strength increases in this direction. This means that the field lines are not parallel but are converging.
IMAGE - A magnetic field.
This magnetic field increases from right to left.
Now consider a charged particle which is gyrating about the field lines but is also moving along the field lines in the direction of increasing field. Since the charged particle cannot cross the filed lines it is forced into a smaller orbit of gyration. But the Lorentz force is not any longer perpendicular to the axis of the field; it still has a radial component which maintains the circular motion but it now also has a component in the direction opposite to the longitudinal motion of the particle. This decreases the longitudinal velocity and, since the total kinetic energy is conserved, the orbital velocity of the particle therefore increases. The overall effect is that the particle moves in tighter and tighter circles moving faster and faster in those orbits whilst slowing down in it longitudinal motion.
The particles longitudinal motion can be thus arrested and reversed with the effect that the constriction in the magnetic field has "reflected" the particle. This is called magnetic mirroring.
If we were to have two such constrictions separated by some distance, then a particle could be continuously reflected by each constriction successively thus "trapping" the particle within the confines of its field without their coming into contact with anything material (such as a containing wall). Such a configuration is called a magnetic bottle and is used to contain very high temperature plasmas.
IMAGE - A magnetic field.
Please click on this image for more details about the magnetic bottle.
The magnetic bottle is used extensively in physics laboratories to store hot plasmas. A similar device called the tokamak is used to house a hydrogen plasma in the hope of harnessing the Sun's source of energy - FUSION.
What is the motion of a charged particle in a magnetic field which varies perpendicular to the field lines?
If we consider particles which only have motion perpendicular to the field lines the effect is simply that the particles must execute smaller circles in the stronger part of the field and larger circles in the weaker part of the field. If you try and draw this such that the path of the particle is continuous, you find that the particle has to move across the field lines.
Oppositely charged particles drift across the field lines in opposite directions.
Thus we could expect that electrons and positive ions which have the same velocity will execute paths as shown in the diagram.