Charged Particle Motion in EM Fields Back
Electromagnetism / Plasma Physics

Charged Particle Motion in EM Fields Simulator

Real-time visualization of particle orbits based on Lorentz force $\mathbf{F}=q(\mathbf{E}+\mathbf{v}\times\mathbf{B})$ using Boris integration. Verify Larmor radius, E×B drift, and cyclotron period.

Parameters
Electric field Eₓ
V/m
Electric field Eᵧ
V/m
magnetic field Bz
T
Particle Selection
Initial velocity v₀
Initial angle θ₀
°
Trajectory length
pt
Display 4 particles simultaneously at 90° intervals from θ₀
Advance 1 frame or change speed while paused
Save current trajectory to compare with varying conditions (up to 5)
Drag on canvas to directly set initial velocity direction and magnitude
Results
Current speed |v|
Larmor radius rL
E×Bdrift vd
cyclotron period Tc
Trail length (pt)
CAE & Plasma Physics Applications Particle tracking in magnetic confinement fusion (tokamak/helical) / Drift motion in ionosphere and space plasma / Design of mass spectrometers (mass filters) and cyclotron accelerators / Convergence and divergence calculation in charged-particle beam optics.
Theory & Key Formulas

Lorentz force: $\mathbf{F}= q(\mathbf{E}+ \mathbf{v}\times \mathbf{B})$

Acceleration in 2D with perpendicular Bz:

$$a_x = \frac{q}{m}(E_x + v_y B_z), \quad a_y = \frac{q}{m}(E_y - v_x B_z)$$

Larmor radius:$r_L = \dfrac{mv_\perp}{|q|B}$

E×BdriftVelocity:$v_d = \dfrac{|\mathbf{E}\times \mathbf{B}|}{B^2}= \dfrac{E_\perp}{B}$

cyclotron period:$T_c = \dfrac{2\pi m}{|q|B}$

Numericalintegration:Boris integrator、$\Delta t = 0.02$

Was this tool helpful? Please share your feedback.

Related Tools

Double pendulum(Chaos)Simulator
Numerically integrate Lagrange equations with RK4 and visualize chaotic orbits
Battery & Electrochemical Potential Calculator
Calculate electrochemical cell EMF, activity, and equilibrium potential using the Nernst equation
Snell's Law & Light Refraction Simulator
Calculate light refraction at a two-medium interface using Snell's law
Thin Lens Formula & Imaging Simulator
Calculate object distance, image distance, and magnification using the thin lens formula

What is Charged Particle Motion in EM Fields?

🙋
What exactly is the Lorentz force? I see it's the core of this simulator, but what's it doing to the particle?
🎓
Basically, it's the combined force a charged particle feels from electric (E) and magnetic (B) fields. The electric part, $q\mathbf{E}$, pushes it in a straight line. The magnetic part, $q(\mathbf{v}\times \mathbf{B})$, pushes it sideways, perpendicular to both its velocity and the field. In this simulator, the magnetic field is set by the "magnetic field Bz" slider, pointing straight out of the screen. Try setting Bz to a high value and watch the particle curve!
🙋
Wait, really? So if I set the electric fields (Eₓ and Eᵧ) to zero and just have a magnetic field, it should just go in a circle? What determines the size of that circle?
🎓
Exactly! That circular motion is called cyclotron motion. The size is the Larmor radius. It depends on the particle's mass, charge, speed, and the magnetic field strength. That's why you have the "Particle Selection" and "q/m ratio" controls—a heavy proton makes a much wider circle than a light electron with the same speed. Try switching from an electron to a proton while keeping "v₀" and "Bz" the same, and you'll see the orbit size explode.
🙋
Okay, that makes sense. But what's this "E×B drift" I see mentioned? What happens when I turn the electric field back on?
🎓
Great question! That's the cool part. When you have both E and B fields perpendicular to each other—like setting Eᵧ to a positive value while Bz is on—the particle doesn't just get pulled by the electric field. Instead, it "drifts" sideways! The drift velocity is given by $\mathbf{v}_d = (\mathbf{E}\times \mathbf{B})/B^2$. In practice, you'll see the particle's tight circular motion slowly translate. For instance, set Eᵧ=1, Bz=1, and watch the proton's spiral move steadily to the right.

Physical Model & Key Equations

The simulator calculates the motion by solving Newton's second law with the Lorentz force. The acceleration in the x and y directions is determined by these coupled equations:

$$a_x = \frac{q}{m}(E_x + v_y B_z), \quad a_y = \frac{q}{m}(E_y - v_x B_z)$$

Here, $q$ is the particle charge, $m$ is its mass, $v_x$ and $v_y$ are velocity components, $E_x$ and $E_y$ are the electric field components you set with sliders, and $B_z$ is the out-of-plane magnetic field.

For pure magnetic fields ($E=0$), the particle undergoes uniform circular motion. The key characteristics are the cyclotron frequency and Larmor radius:

$$\omega_c = \frac{|q|B}{m}, \quad r_L = \frac{m v_\perp}{|q|B}$$

$\omega_c$ is the angular frequency of rotation (how fast it spins), and $r_L$ is the radius of the circle. $v_\perp$ is the speed perpendicular to the magnetic field, controlled by your "Initial velocity v₀" and "Initial angle θ₀" settings.

Frequently Asked Questions

The initial velocity of the particles may be too high, or the magnetic field may be too weak. Try lowering the initial velocity or increasing the magnetic field B value to reduce the Larmor radius, making it easier for the trajectory to stay within the screen. Also, try setting the electric field E to zero to check.
Set the electric field E in the x-direction and the magnetic field B in the z-direction (depth direction of the screen), and set the initial velocity to appropriate values (e.g., vx=0, vy=0). You will observe the particles performing cyclotron motion while slowly drifting in the E×B direction (in this case, the y-direction).
In the Larmor radius formula r_L = mv⊥/(|q|B), v⊥ is the velocity component perpendicular to the magnetic field. If the initial velocity has a component along the magnetic field direction, v⊥ will be smaller than the total velocity. Additionally, the presence of an electric field complicates the trajectory, so first check with the electric field E=0.
Yes, you can intuitively understand the basics of charged particle helical motion and mirror effects in a magnetic field. However, this simulator is a 2D (magnetic field fixed in the z-direction) single-particle tracker and does not include multi-particle collisions or self-consistent field calculations. Please use it as a tool for learning the principles.

Real-World Applications

Magnetic Confinement Fusion (Tokamaks): In devices like ITER, immensely strong magnetic fields confine a hot plasma of charged particles. Simulating individual particle orbits, including their drifts, is crucial for designing magnetic coils that keep the plasma stable and away from the reactor walls.

Space & Ionospheric Physics: The Earth's magnetic field traps charged particles from the solar wind, creating the Van Allen radiation belts. The E×B drift you see in the simulator explains how these particles move around the planet, a process critical for understanding space weather and satellite safety.

Mass Spectrometers: These instruments use precisely controlled E and B fields to separate ions based on their charge-to-mass ratio ($q/m$). By adjusting fields like the ones in this simulator, only ions with a specific $q/m$ will follow a stable path to the detector, allowing scientists to identify substances.

Particle Accelerators (Cyclotrons): In a cyclotron, particles are accelerated in a spiral path by an oscillating electric field within a constant magnetic field. The constant cyclotron frequency ($\omega_c$) is key to the design, ensuring the electric field stays in sync with the particles as they gain energy.

Common Misconceptions and Points to Note

First, you might think that "applying electric and magnetic fields simultaneously results in a trajectory that is a simple sum of circular and linear motions," but this is incorrect. Try turning on both the electric field Ey and the magnetic field Bz in the simulator. The particle will trace a complex trochoidal path (a curve similar to a cycloid). This happens because acceleration from the electric field affects the instantaneous velocity, which in turn changes the radius of rotation due to the magnetic field; it is not a simple superposition. Next, do not overlook the importance of dimensionless parameters. For example, if you increase the magnetic field strength B by a factor of 10, the period of the circular motion becomes 1/10. However, if the simulation's "time step" is too large, only a few points are calculated per cycle, making the orbit appear distorted. In practice, choosing a time step sufficiently small relative to the particle's cyclotron period is key to accuracy. Finally, avoid casually deciding on an initial velocity like (1,0,0) without thought. For instance, if you give the particle an initial velocity perfectly parallel to the magnetic field (only a vz component), the particle will travel in a straight line without any curvature. You can verify this "no-force case" in the simulator by setting "initial velocity vₓ" to 0, "v_z" to 1, and applying a magnetic field Bz. If you want to observe the phenomenon, always provide a velocity component perpendicular to the magnetic field.