You are on page 1of 27

Motion Of charge

Particle In Electric
And Magnetic Field

Submitted By:
Harjot Kaur
Sukhwinder
Singh

DIFFERENCE BETWEEN
ELECTRIC AND MAGNETIC
FORCES
ELECTRIC FORCES

MAGNETIC FORCES

particle due to an electric

field is parallel
(antiparallel) to the
electric field vector for a
positive charge ( a
negative charge)

The magnetic force on a

charge particle is
orthogonal to the
magnetic field vector.

of the particle.

MOTION OF CHARGED PARTICLE IN

UNIFORM ELECTRIC FIELD
When a charge q is placed in an electric field
E, the electric force on the charge is
F = Eq
From Newtons second law,
F = ma
therefore,
ma = Eq
The acceleration of the charge is:
a=E.q / m

E is uniform then acc . is

constant
q = positive ,
acc. in
direction of field
q = negative , acc. in
opposite direction of field

If an electron is projected horizontally into an

electric field with an initial velocity V0, it will be
accelerated by the electric field.
Final vertical speed:
Vyf = Vyi + a.t
Vyi = 0
because the electron
enters the field horizontally.
Vertical displacement:
y = (Vyi).t + (1/2) (a).t
a = 2(y)/t
F = m.a = m.2y/t = qV/d

y = q.V.x/(2m.d.v) Parabolic path

Horizontal displacement:

x = (Vx)t

Once the electron leaves the uniform electric field, it

continues to move in a straight line with a speed
greater than its original speed.
The angle at which the electron exits the electric field is
given by:

tan = Vyf / Vx

The gravitational force acting on the mass
of the electron has been neglected
F = 9.11 x 10-31 kg 9.8 m/s2
= 8.9278 x 10-30 N,
which is small in comparison to the electric
force acting on the electron

Magnetic force on a moving

charge
The magnetic force F on a moving charged

particle with a velocity v in a magnetic field B

at an angle is given by
F = Bqv sin

The direction of the

force can be
determined by
Flemings left hand
rule.

Motions of charged particles in uniform

magnetic field
The motion of a charged particle in a uniform

magnetic field B depends on the angle between

its initial velocity v and the direction of the field.
= 0 or 180

F=0

Circular Motion
The magnetic force, acting perpendicular to the velocity
of the particle, will cause circular motion.
F = qvB = qvB sin
= 900
F = qvB = mv/r

r = mv/(qB) Radius of curvature of path of particle

f = qB/(2m) Cyclotron frequency

Helical Motion
If the velocity is not perpendicular to the magnetic field,
Component of vel. perpendicular to field produces circular motion
Component of velocity parallel to field remains unaffected
And thus resultant produces helical motion

Motion of charged particle in

electric and magnetic field
A particle of mass m, charge q moving in uniform
electric field E and magnetic field B. Suppose
E.B = 0 ,
Lorentz force acting on particle :
F = q ( E + (v B) )
Consider E along y - axis and B along z axis
Ex = 0 , Ez= 0 ,
Bx = 0 , By = 0 ,
a = (q/m)( E+(vB))
ax = (q/m)(vy.Bz)
ay = (q/m)(Ey-vx.Bz)
az = 0

Example -: Cyclotron
A cyclotron is a type of particle accelerator in
which charged particles accelerate outwards
from the center along a spiral path. The particles
are held to a spiral trajectory by a static
magnetic field and accelerated by a rapidly
varying electric field

Euler method
A numericalprocedure for

solvingordinary differential
equations(ODEs) with a giveninitial value.
For the initial value problem we begin by
approximating solution y = (t) at initial point t0

y y0 f t0 , y0 t t0

slope f (t0, y0). The line tangent to the

solution at this initial point is

y f (t , y ), y (t0 ) y0 ,

The tangent line is a good approximation to solution.

Thus if t1 is close enough to t0, we can approximate

(t1) by y1 y0 f t0 , y0 t1 t 0

Serves as a base to construct predictor-corrector

method.

EULER FORMULA
For a point t2 close to t1, we approximate (t2) using the line passing

through (t1, y1) with slope f (t1, y1):

y2 y1 f t1 , y1 t 2 t1

Thus we create a sequence yn of approximations to (tn):

y1 y0 f 0 t1 t 0
y 2 y1 f1 t 2 t1

y n 1 y n f n t n 1 t n

For a uniform step size h = tn tn-1, Eulers formula becomes

yn 1 yn f n h, n 0,1, 2,

FORWARD EULER METHOD:

The forward difference approximation for first
derivative

yn 1 yn
yn '
, h t n 1 t n
h

yn yn 1
yn '
, h t n t n 1
h

,

Truncation erroris the error made by truncating an infinite

sum and approximating it by a finite sum .
Types:
1.) Local truncation errors the error caused by one
iteration. It is difference b/w exact and numerical solution.

yn 1 yn f n h 21! y '' h 2
yn f n h O(h 2 )
Eulers approx.

2.)Global truncation errors the cumulative error caused by

many iterations. The number of steps is easily determined
to be(t-to)/h, which is proportional to 1/h, so that error
committed in each step is proportional to h. Thus global
error is 0(h).

LIMITATIONS OF EULER
METHOD
Truncation errors It is approximately
proportional to h^2. This makes the Euler method
less accurate than other higher-order techniques
such asRunge-Kutta methods for which the local
truncation error is proportional to a higher power
of the step size.
Numericallyunstable - The numerical solution
grows very large for equations where the exact
solution does not. This can be illustrated using
the linear equation
The exact solution is
which decays
to zero as
.However if euler method is
applied with h=1 then numerical solution is
oscillates and grows.

Solution of computed with the

Euler method with step size h=1
(blue squares) and h=0.7 (red
circles). The black curve shows the
exact solution.

ALGORITHM
Define class.
Declare q,m,E,ti,tf as an integer and x , y ,h ,vx ,vy

,ax ,ay,n,t as a floating.

Declare member functions getdata() and
calculate().
Define initial values of position x=y=0
Define initial and final time ti and tf respectively
.The width of time step is h, and calculate the no. of
integral time steps
n=(tf-ti)/h

electric and magnetic field ,initial velocity

components vx and vy.
Start a for loop.In loop calculate
ax=(q*vy*B)/m
ay=((q*E)/m)-((q*vx*B)/m)
vx=vy+(ax*h)
vy=vy+(ay*h)
x=x+(h*vx)
y=y+(h*vy)
Declare main function .
Call the member functions with the help of an
object.
Return zero value to main function.

PROGRAM
#include<iostream>
#include<cmath>
#include<fstream>
ofstream output(o.txt);
using namespace::std;
using std::fstream;
class charge
{
int q,m,E,B,ti,tf;
float x,y,h,vx,vy,ax,ay,n,vy,t;
public:
void getdata();
void calculate();
};

void charge::getdata()
{
x=0;
y=0;
vx=5;
vy=0;
q=-1;
m=1;
E=0;
B=1;
ti=0;
tf=100;
h=0.001;
}

Void particle::calculate()
{
n=(tf-ti)/h;
for ( t=0;t<=n;t++)
{
ax=(q*vy*B)/m;
ay=((q*E)/m)-((q*vx*B)/m);
vx=vx+(ax*h);
vy=vy+(ay*h);
x=x+(h*vx);
y=y+(h*vy)
output<<x<< <<y<<endl;
}
}
int main()
{
charge p;
p.getdata();
p.calculate();
return 0;