{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Fo nt 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 255 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 12 0 0 0 1 2 2 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 81 "PHYSICS RESOURCE PACKETS P ROJECT File: EBFIELDS.MWS" }}{PARA 0 "" 0 "" {TEXT -1 110 "Rose-Hulman Institute of Technology \+ Authors: Perry Peters & Greg Williby" }}{PARA 0 "" 0 "" {TEXT -1 97 "http://www.rose-hulman.edu/~moloney \+ Software: Maple V Release 4" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 526 "The file 'ebfields' (ebf ields.ms or ebfields.ma) contains a general solution of the motion of \+ a particle in constant electric and magnetic fields. For any (Ex, Ey, \+ Ez), (Bx, By, Bz), one can plot the motion of a particle of mass M, ch arge q and velocity (vx, vy, vz). From this general case, it speciali zes to the motion of a particle in 'crossed' E and B fields such that \+ the particle travels in a straight line. The particular choices are q \+ =1.61 x 10^-19 C , M = 1.67 x 10^-27 kg , Bz = 0.50 T , and vx = 8.4 x10^6 m/s. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 135 "a) Before opening one of these files, figure out what values a re needed for (Ex,Ey,Ez) so the particle will travel in a straight lin e. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 223 "b ) Now imagine reversing the particle's velocity, and predict what sort of motion it will undergo. (Straight line, motion in a plane, shape o f motion etc.) Now make the changes and compare the results to your p redictions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 156 "Going Further: c) Predict what will happen in the crossed fiel ds when a particle is released from rest. Try it out and compare resul ts to your predictions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT -1 310 "d) Given the height H bet_ween the top and bottom limits of the y-motion, what can you say about the velocity of the pa rticle at the top and bottom y-limits ofthe motion? [v=0 at bottom whe re it is released. At top the kinetic energy is mvx^2 which is equal t o the work done on the particle by Ey, W = qEy H.]" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 82 "Execute all the cells i n this notebook until you get to the problem input section." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linalg):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "Tell maple that all of the components are real to ea se the calculations." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 192 "assume(Ex, real);assume(Ey,real);assume(Ez,real);assume(Bx,real);assume(By,real); assume(Bz,real);assume(vx0,real);assume(vy0,real);assume(vz0,real);ass ume(t,real);assume(q,real);assume(m,real);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "Define vectors for general solution" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Efield:=vector([Ex,Ey,Ez]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "Bfield:=vector([Bx,By,Bz]);" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 31 "v:=vector([vx(t),vy(t),vz(t)]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "v0:=vector([vx0,vy0,vz0]);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 16 "Define Equations" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 15 "Biot-Savart law" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 "F:=evalm(q*Efield+q*crossprod(v,Bfi eld))=evalm(m*map(diff,v,t));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 36 " Initial acceleration of the particle" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "a0:=evalm((q*Efield+q*crossprod(v0,Bfield))/m);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Split up force vector into its three comp onents." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Fx:=lhs(F)[1]=rhs(F)[1]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Fy:=lhs(F)[2]=rhs(F)[2] ;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Fz:=lhs(F)[3]=rhs(F)[3 ];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 97 "Solve the three equations f or the vx(t), vy(t), and vz(t), and tell maple the initial conditions. " }}{PARA 0 "" 0 "" {TEXT -1 51 "Also simplify the output. This will \+ take a moment." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 135 "sol:=simplify(ds olve(\{Fx,Fy,Fz,vx(0)=v0[1],vy(0)=v0[2],vz(0)=v0[3],D(vx)(0)=a0[1],D(v y)(0)=a0[2],D(vz)(0)=a0[3]\},[vx(t),vy(t),vz(t)]));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "Now collect like terms." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 77 "This will put the solutio n in the form: A*t + B*sin(theta) + C*cos(theta) + D" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "sol2:=map(collect,sol,\{sin(q*sqrt(%1)*t/m),cos( q*sqrt(%1)*t/m),t\});" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 32 "General solution to the problem:" }} {PARA 0 "" 0 "" {TEXT -1 56 "************** INPUT SECTION FOR PROBLEM* ***************" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 283 "Now substitute in values the problem. Values may be cha nged as desired. Values in this section can be changed over and over \+ again without executing the top part of the notebook again. Vectors a re in x,y,z component form. Execute all cells between this and the ne xt input section." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "EfieldVect:=[0 ,0,0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "BfieldVect:=[0,0, 2/10];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "VelocityVect:=[0, -1,0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "charge:=1.6*10^(- 19);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "mass:=1.67*10^(-27) ;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 60 "************************************************************" }} {PARA 0 "" 0 "" {TEXT -1 53 "Substitute in above values into the gener al solution." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 196 "sub:=subs(\{Ex=Efi eldVect[1],Ey=EfieldVect[2],Ez=EfieldVect[3],Bx=BfieldVect[1],By=Bfiel dVect[2],Bz=BfieldVect[3],vx0=VelocityVect[1],vy0=VelocityVect[2],vz0= VelocityVect[3],q=charge,m=mass\},sol2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "Change to floating point format." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "velocity:=map(evalf,sub);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "Integrate the xyz velocity components to find the positio n." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 66 "position:=subs(velocity,[int( vx(t),t),int(vy(t),t),int(vz(t),t)]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 23 " Evaluate the integrals" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "positionxyz:=map(value,position);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "Location on graph where particle is at t=0." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "positionxyz0:=map(evalf,subs(t=0,positionxyz) );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 62 "************* INPUT SECTION FOR GRAPHICAL OUTPUT ************* " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 397 "Valu es in this section may be repeatedly changed without executing the upp er cells again. The three scalar variables control how large the E, B , and velocity vectors will be drawn on the graph. If too large a val ue is used, the vector will dominate the plot and the path of the part icle will be too small to see. If too small a value is used, the vect or will be too small to tell its direction." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "scalarE:=1/5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "scalarB:=1/5;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "scalarV:=1/10;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 328 "The path of the particle is plotted from t=0 to the time entered for tmax. If the output on t he graph looks like \"star\" patterns, the value of tmax is probably t oo large. If the output looks like a straight or nearly straight line , tmax is probably too small. Execute the remaining cells in this not ebook to get the solution." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 67 "************************************************* ******************" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 16 "tmax:=2*10^(-7);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "Generates the curve for the path of the particle and the field \+ & velocity vectors." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 155 "Path:=space curve(\{positionxyz,evalm(EfieldVect*scalarE*t),evalm(BfieldVect*scala rB*t),evalm(positionxyz0+VelocityVect*scalarV*t)\},t=0..tmax,numpoints =100):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 47 "Locate the position for the end of each vector." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Eend:=evalm(EfieldVect*scalarE*tmax);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "Bend:=evalm(BfieldVect*scal arB*tmax);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "Vend:=evalm(p ositionxyz0+VelocityVect*scalarV*tmax);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 38 "Draws letters identifying each vector." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 122 "Labels:=textplot3 d(\{[Eend[1],Eend[2],Eend[3],`E`],[Bend[1],Bend[2],Bend[3],`B`],[Vend[ 1],Vend[2],Vend[3],`v`]\},color=red):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 37 "Display everything on the same graph." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "display(\{Path,Labe ls\},title=`Motion of particle through E and B fields`);" }}}}{MARK "0 2 0" 97 }{VIEWOPTS 1 1 0 1 1 1803 }