You are on page 1of 2

-------------- Assessment Task 2A LAB WEEK 3 --------------------------

Use MATLAB to solve the damped harmonic oscillator differential equation


for the case of critical damping with:

omega = 1.

Plot the function y(t) from t=0 to t=20 with initial conditions y(0)=1 and
dy/dt(0)=0. The plot will look just like damping with no hint that you
are right on the border between damping and oscillation. To verify that
you are right on the border increase tau by at least 50% and make the plot
again.

Create a script file called assessment2.m containing all the MATLAB code
needed to achieve this task.

Upload your MATLAB script file through Blackboard.

-------------- Assessment Task 2B , LAB WEEK 3 ---------------------------

m
er as
Here are the equations of motion for a charged particle of mass m and
charge q moving in a constant magnetic field B directed in the z-direction

co
and constant electric field E in the y-direction. These come from Newton's

eH w
second law with the Lorentz force law: F = q E + q cross(v, B).

o.
rs e d
--- x = v_x
ou urc
dt

d
--- y = v_y
o

dt
aC s
v i y re

d q B v_y
--- v_x = --------
dt m

d q E q B v_x
--- v_y = --- - --------
ed d

dt m m
ar stu

[a] Define these equations in Matlab and have Matlab solve them with:q=-
1.6e-19, m=9.11e-31, B=0.2, E[0]=3000 with initial conditions:
sh is

x(0) = 0
y(0) = 0
Th

v_x(0) = 20000
v_y(0) = 0.

[b] Make plots in the x-y plane of the particle orbits


x(t)
and
y(t)
they must be parametric plots with t as the parameter. You will need to
choose a time interval for plotting and if you just choose something
simple like 1 or 2 s, you will get rubbish. Think about the physics of
the problem; in particular, think about the cyclotron frequency:
q B
omega_c = --- .
m

This study source was downloaded by 100000824784286 from CourseHero.com on 10-26-2021 07:53:48 GMT -05:00

https://www.coursehero.com/file/98370730/Assessment-Task-2pdf/
[c] Make x-y plane plots of
v[x](t)
and
v[y](t)

You should be able to see that the velocity goes around in a circle
(cyclotron motion). If the circle appears distorted (e.g. elliptical),may
need to use the 'scaling=constrained' plotting option - however,
withdefault settings the plot should be fine.

[d] Now see what happens when


E = E_0 cos(omega[c] t)
E_0 = 3000 .

[e] What is the kinetic energy of the electron after 1 second?

m
er as
co
eH w
o.
rs e
ou urc
o
aC s
v i y re
ed d
ar stu
sh is
Th

This study source was downloaded by 100000824784286 from CourseHero.com on 10-26-2021 07:53:48 GMT -05:00

https://www.coursehero.com/file/98370730/Assessment-Task-2pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like