.MCAD 304020000 1 74 133 0 .CMD PLOTFORMAT 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 0 0 1 1 NO-TRACE-STRING 0 2 1 0 1 1 NO-TRACE-STRING 0 3 2 0 1 1 NO-TRACE-STRING 0 4 3 0 1 1 NO-TRACE-STRING 0 1 4 0 1 1 NO-TRACE-STRING 0 2 5 0 1 1 NO-TRACE-STRING 0 3 6 0 1 1 NO-TRACE-STRING 0 4 0 0 1 1 NO-TRACE-STRING 0 1 1 0 1 1 NO-TRACE-STRING 0 2 2 0 1 1 NO-TRACE-STRING 0 3 3 0 1 1 NO-TRACE-STRING 0 4 4 0 1 1 NO-TRACE-STRING 0 1 5 0 1 1 NO-TRACE-STRING 0 2 6 0 1 1 NO-TRACE-STRING 0 3 0 0 1 1 NO-TRACE-STRING 0 4 1 0 1 1 NO-TRACE-STRING 0 1 1 21 15 0 0 3 .CMD FORMAT rd=d ct=10 im=i et=3 zt=300 pr=3 mass length time charge temperature tr=0 vm=0 .CMD SET ORIGIN 0 .CMD SET TOL 0.001000000000000 .CMD SET PRNCOLWIDTH 8 .CMD SET PRNPRECISION 4 .CMD PRINT_SETUP 1.200000 1.218750 1.200000 1.200000 0 .CMD HEADER_FOOTER 1 1 *empty* *empty* *empty* 0 1 *empty* *empty* *empty* .CMD HEADER_FOOTER_FONT fontID=14 family=Arial points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD HEADER_FOOTER_FONT fontID=15 family=Arial points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFAULT_TEXT_PARPROPS 0 0 0 .CMD DEFINE_FONTSTYLE_NAME fontID=0 name=Variables .CMD DEFINE_FONTSTYLE_NAME fontID=1 name=Constants .CMD DEFINE_FONTSTYLE_NAME fontID=2 name=Text .CMD DEFINE_FONTSTYLE_NAME fontID=4 name=User^1 .CMD DEFINE_FONTSTYLE_NAME fontID=5 name=User^2 .CMD DEFINE_FONTSTYLE_NAME fontID=6 name=User^3 .CMD DEFINE_FONTSTYLE_NAME fontID=7 name=User^4 .CMD DEFINE_FONTSTYLE_NAME fontID=8 name=User^5 .CMD DEFINE_FONTSTYLE_NAME fontID=9 name=User^6 .CMD DEFINE_FONTSTYLE_NAME fontID=10 name=User^7 .CMD DEFINE_FONTSTYLE fontID=0 family=Times^New^Roman points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=1 family=Times^New^Roman points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=2 family=Arial points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=4 family=Arial points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=5 family=Courier^New points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=6 family=System points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=7 family=Script points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=8 family=Roman points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=9 family=Modern points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD DEFINE_FONTSTYLE fontID=10 family=Times^New^Roman points=10 bold=0 italic=0 underline=0 colrid=-1 .CMD UNITS U=1 .CMD DIMENSIONS_ANALYSIS 0 0 .CMD COLORTAB_ENTRY 0 0 0 .CMD COLORTAB_ENTRY 128 0 0 .CMD COLORTAB_ENTRY 0 128 0 .CMD COLORTAB_ENTRY 128 128 0 .CMD COLORTAB_ENTRY 0 0 128 .CMD COLORTAB_ENTRY 128 0 128 .CMD COLORTAB_ENTRY 0 128 128 .CMD COLORTAB_ENTRY 128 128 128 .CMD COLORTAB_ENTRY 192 192 192 .CMD COLORTAB_ENTRY 255 0 0 .CMD COLORTAB_ENTRY 0 255 0 .CMD COLORTAB_ENTRY 255 255 0 .CMD COLORTAB_ENTRY 0 0 255 .CMD COLORTAB_ENTRY 255 0 255 .CMD COLORTAB_ENTRY 0 255 255 .CMD COLORTAB_ENTRY 255 255 255 .CMD COLORTAB_ENTRY 0 64 128 .TXT 2 1 43 0 0 Cg b73.000000,73.000000,28 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}{\f1\fcharset0\fnil Times New Roman;}} \plain\cf1\fs20 \pard {\cf2\f1\b COPYRIGHT MIRON KAUFMAN 1997}} .TXT 4 20 42 0 0 Cg a70.000000,70.000000,52 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}{\f1\fcharset0\fnil Britannic Bold;}} \plain\cf1\fs20 \pard {\cf2\f1\fs36\b Physics B PHY232/235\par Computer Project\par Laboratory #3a}} .TXT 11 -20 45 0 0 Cg a71.000000,71.000000,491 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 We study the motion of a particle of charge q and mass m in a magnetic field }{\cf2\b B}{\cf2 and in an electric field }{\cf2\b E}{\cf2 . The force acting on the particle is given by the Lorentz formula: }{ \cf2\b F}{\cf2 = q}{\cf2\b E}{\cf2 + q}{\cf2\b v}{\cf2 x}{\cf2\b B }{ \cf2 where}{\cf2\b v }{\cf2 is the velocity vector. For small enough velocities, v << c, we can use Newtonian mechanics to describe the motion of the charged particle: m}{\cf2\b a}{\cf2 = }{\cf2\b F}{\cf2 . Lorentz formula and Newton's second law give: d}{\cf2\b v}{\cf2 /dt = (q/m)}{\cf2\b E}{\cf2 + (q/m)}{\cf2\b v}{\cf2 x}{\cf2\b B. \par }{ \cf2 First we input the mass and charge of the particle, proton for example.}} .EQN 13 2 3 0 0 {0:q}NAME:1.6*(10)^(-19) .EQN 0 18 56 0 0 {0:m}NAME:1.67*(10)^(-27) .TXT 6 -20 119 0 0 Cg a72.000000,72.000000,133 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 Next we input the magnetic field }{\cf2\b B}{\cf2 and the electric field }{ \cf2\b E. \par }{\cf2 In this computation we will study the case of no electric field}{\cf2\b E}{\cf2 = 0.}} .EQN 8 0 51 0 0 {0:B}NAME:({3,1}ö0.0001ö0ö0) .EQN 0 12 85 0 0 {0:E}NAME:({3,1}ö0ö0ö0) .TXT 6 -12 57 0 0 Cg a73.000000,73.000000,59 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}{\f1\fcharset2\fnil Symbol;}}\plain \cf1\fs20 \pard {\cf2 The Larmor (cyclotron) angular velocity }{\cf2\f1 w}{ \cf2 and period are T:}} .EQN 5 1 46 0 0 {0:\w}NAME:({0:q}NAME*|({0:B}NAME))/({0:m}NAME) .EQN 0 15 59 0 0 {0:T}NAME:(2*{0:\p}NAME)/({0:\w}NAME) .EQN 5 -1 111 0 0 {0:T}NAME={0}?_n_u_l_l_ .TXT 5 -15 61 0 0 Cg a73.000000,73.000000,85 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 We will compute the position and velocity of the particle 1000 times during a period.}} .EQN 5 2 60 0 0 {0:\Dt}NAME:({0:T}NAME)/(1000) .EQN 4 0 8 0 0 {0:n}NAME:0;5000 .EQN 3 0 6 0 0 ({0:t}NAME)[({0:n}NAME):{0:n}NAME*{0:\Dt}NAME .TXT 5 0 63 0 0 Cg a71.000000,71.000000,58 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 The initial velocity is }{\cf2\b v}{\cf2\b\dn 0}{\cf2 and the initial position is}{\cf2\b r}{\cf2\b\dn 0}{\cf2 .}} .EQN 6 0 64 0 0 ({0:v}NAME)[(0):({3,1}ö(10)^(5)ö0ö(10)^(6)) .EQN 0 13 67 0 0 ({0:r}NAME)[(0):({3,1}ö0ö0ö0) .TXT 15 -15 110 0 0 Cg b73.000000,73.000000,28 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}{\f1\fcharset0\fnil Times New Roman;}} \plain\cf1\fs20 \pard {\cf2\f1\b COPYRIGHT MIRON KAUFMAN 1997}} .TXT 5 2 81 0 0 Cg a71.000000,71.000000,239 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}{\f1\fcharset2\fnil Symbol;}}\plain \cf1\fs20 \pard {\cf2 We integrate numerically the equation of motion }{ \cf2\b a}{\cf2 = }{\cf2\b F}{\cf2 /m by using }{\cf2\b a}{\cf2 = d}{ \cf2\b v}{\cf2 /dt = (}{\cf2\b v}{\cf2\b\dn n+1}{\cf2\b }{\cf2 - }{ \cf2\b v}{\cf2\b\dn n}{\cf2 )/}{\cf2\f1 D}{\cf2 t and }{\cf2\b v}{\cf2 = (}{\cf2\b r}{\cf2\b\dn n+1}{\cf2 - }{\cf2\b r}{\cf2\b\dn n}{\cf2 )/}{ \cf2\f1 D}{\cf2 t. This implementation is called the Euler method and its accuracy depends on the smallness of the time interval: }{\cf2\f1 D}{ \cf2 t << T. }} .EQN 7 1 70 0 0 ({0:v}NAME)[({0:n}NAME+1):({0:v}NAME)[({0:n}NAME)+{0:\Dt}NAME*((({0:q}NAME)/({0:m}NAME))*({0:v}NAME)[({0:n}NAME){50}{0:B}NAME+({0:q}NAME)/({0:m}NAME)*{0:E}NAME) .EQN 4 0 71 0 0 ({0:r}NAME)[({0:n}NAME+1):({0:r}NAME)[({0:n}NAME)+{0:\Dt}NAME*({0:v}NAME)[({0:n}NAME) .TXT 5 -2 82 0 0 Cg a72.000000,72.000000,75 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 To graph the trajectory, I use the 3d scatter plot available in Mathcad 6.}} .EQN 10 3 75 0 0 ({3,1}ö({0:v.z}NAME)[({0:n}NAME)ö({0:v.y}NAME)[({0:n}NAME)ö({0:v.x}NAME)[({0:n}NAME)):({0:v}NAME)[({0:n}NAME) .EQN 0 21 77 0 0 ({3,1}ö({0:z}NAME)[({0:n}NAME)ö({0:y}NAME)[({0:n}NAME)ö({0:x}NAME)[({0:n}NAME)):({0:r}NAME)[({0:n}NAME) .EQN 12 -25 120 0 0 {0:x}NAME,{0:y}NAME,{0:z}NAME{3 5 3 45 35 0 69 33 0 1 1 1 4 -1 1 0 1 1 1 4 -1 1 0 1 1 1 4 -1 1 22 4194368 65408 1 100 2 NO-TITLE}{57} 2 5 21 21 0 1 1.5 7 1 0 4 3 1 4 1 4 3 1 2 0.1 .TXT 39 0 83 0 0 Cg a73.000000,73.000000,148 {\rtf\ansi \deff0{\colortbl;\red0\green64\blue128;\red0\green0\blue128;}{ \fonttbl{\f0\fcharset0\fnil Arial;}}\plain\cf1\fs20 \pard {\cf2 So when E = 0 the trajectory is a helix. To see what happens in the presence of the electric field click to get the following file: }{\cf2 \b\ul\link1 Phyblab3b.mcd}{\cf2 \par }{\cf2\fs24\b \par }} .ATT .ATT_END .ATT .LINK file:C:\WINMCAD\mirmcd\Phyblab3b.MCD .ATT_END