Numerical Methods

Outline

Introduction

Linear
Equations

Interpolation

Numerical
Solutions

Computer
Measurement

      

A charged particle in electric and magnetic fields

When a charged particle moves in a electric field $\vec{E}$ and a magnetic field $\vec{B}$, the force on the particle is,

$\large \vec{F} = q(\vec{E} + \vec{v}\times \vec{B}),$

where $q$ is the charge of the particle and $m$ is the mass. Written out in terms of its three components, the Lorentz force is,

\[ \begin{equation} F_x = q(E_x+v_yB_z-v_zB_y), \\ F_y = q(E_y+v_zB_x-v_xB_z), \\ F_z = q(E_z+v_xB_y-v_yB_x). \end{equation} \]

In general, the three components of the electric and magnetic fields can be functions of space and time.

  $m=$  kg $q=$  C
  $E_x=$  V/m $E_y=$  V/m $E_z=$  V/m
  $B_x=$  T $B_y=$  T $B_z=$  T

The intitial conditions at $t=0$ are:
$x=$  m  $y=$  m  $z=$  m  $v_x=$  m/s  $v_y=$  m/s  $v_z=$  m/s

When a constant uniform electric field is perpendicular to a constant uniform magnetic field, the average velocity of the charged particle will be in the direction perpendicular to both the electric field and the magnetic field. Note that electrons move very fast so a short time step $\Delta t$ must be selected.

 Numerical 6th order differential equation solver 

$ \large \frac{dx}{dt}=$

$v_x$

$ \large \frac{dv_x}{dt}=$

$ \large \frac{dy}{dt}=$

$v_y$

$ \large \frac{dv_y}{dt}=$

$ \large \frac{dz}{dt}=$

$v_z$

$ \large \frac{dv_z}{dt}=$

Initial conditions:

$t_0=$

$\Delta t=$

$x(t_0)=$

$N_{steps}$

$v_x(t_0)=$

Plot:

vs.

$y(t_0)=$

$v_y(t_0)=$

$z(t_0)=$

$v_z(t_0)=$

 

 $t$   $x$   $v_x$   $y$   $v_y$   $z$   $v_z$