This Exercise Set has been submitted for peer review, but it has not yet been accepted for publication in the PICUP collection.
Particle Accelerator!
Developed by Chris Orban
This exercise illustrates a charged particle being accelerated through two charged plates. The student will explore how changing the mass, charge, and the spacing between the plates affects the final velocity of the particle.
Although looking at the code is an important part of this exercise, there is only a small amount of coding involved. The student will change the values of a few different variables. Much of the work of this exercise is in doing analytic calculations for the final speed of the particle.
Coding is still important to this exercise because there is a "Particle repulsion" exercise that will follow this one in which the student will modify the code to allow two particles to repel from each other.
This exercise will use a programming language called [p5.js](http://p5js.org) that is very similar to C and C++ programming. (Note: If you are familiar with C or C++ the main difference you will see is that there is no main() function and instead the draw() function serves this role.) **Importantly, this exercise can be completed using any computer or chromebook without downloading any software!**
This exercise is broken up into two parts because there are two different, equivalent ways to think about the acceleration of a proton from two charged plates: You can think of the proton as having a constant acceleration due to the electric field until it leaves the plates, or you can think of the proton as being accelerated over a "potential" that increases its kinetic energy by an amount that depends on the electric field and spacing between the plates. Either way you get the same answer, but it's interesting to think about it from two different points of view.
This exercise is designed for an algebrabased physics class at the college or high school level. It may also be useful for calculusbased physics for nonmajors (e.g. engineering & science majors). This exercise is part of a series of exercises developed by Prof. Chris Orban. The next exercise is on the [Replusion between two charges (with application to fusion!)](http://www.compadre.org/PICUP/exercises/exercise.cfm?I=253&A=ParticleRepulsion)
There are preandpost assessment questions associated with this exercise (not available here) that are being used in an educational research study. If interested to collaborate on that study please email Prof. Chris Orban (orban@physics.osu.edu). The first paper from this study [is available at this link](https://arxiv.org/abs/1701.01867), the second paper which discusses the electromagnetism exercises [is available at this link](https://arxiv.org/abs/1707.00185)
Subject Area  Electricity & Magnetism 

Levels  High School and First Year 
Learning Objectives 
1. Students will gain experience applying kinematics equations from classical mechanics to a situation with a proton being accelerated from between two charged plates. This will involve performing an analytic calculation for the final speed of the proton that should closely match the result of the simulation.
2. Students will gain intuition on how the charge and mass of a particle affects its behavior in an electric field by modifying the code to change the charge, mass and direction of the electric field and seeing what happens. After making these changes students will also perform analytic calculations for the final speed of the particle that should match the result of the simulation.
3. Students will also learn how to think about charged plates in terms of potential difference. Students will perform analytic calculations that use potential difference to determine the final speed of the particle.

Time to Complete  60 min 
Part 1. Electric fields and acceleration!
In this exercise we will make a simulation of a particle being accelerated between two plates. The relevant equations in this case are these: $$v_{xf} = v_{xi} + a_x \Delta t \nonumber $$ $$v_{xf}^2 = v_{xi}^2 + 2 a_x \Delta x \nonumber $$ $$F_x = m a_x \nonumber $$ $$F_x = q E \nonumber $$ We will use some [unusual force and electric field units](http://www.physics.ohiostate.edu/~orban/physics_coding/units.html) in this exercise, but other things should be more familiar. Step. 1. Check out this nice animation of a [proton being accelerated through two charged plates](http://www.physics.ohiostate.edu/~orban/physics_coding/accelerator/accelerator.html). In the animation, notice that the initial x velocity ($v_{xi}$) is nonzero. Step 2. Try out the accelerator code in an editor [Click on this link to open the accelerator code in a p5.js editor](http://alpha.editor.p5js.org/ChrisOrban/sketches/B1Odu7Cb) Press play there to run the code. It should behave the same way it did [with the link you were given in Step 1](http://www.physics.ohiostate.edu/~orban/physics_coding/accelerator/accelerator.html) Important! Create an account with the editor or sign in to your account. Then click "Duplicate" so you can have your own version of the code! Step 3. Try to make sense of the code behind the animation. Think especially about this section:if ( ( x > x_plate_left) & (x < x_plate_right)) { deltaVx = (q*E/mass)*dt; }This is the change in velocity each timestep (
deltaVx
) when the particle is inbetween the two plates. The quantity in the parenthesis (q*E/mass)
is acceleration.
Step 4. The final velocity at the end of the animation is 55.5 meters per second. (Ok, really it's pixels per second but let's just think about it as meters per second. The width of the screen would be 750 meters.) The initial velocity was 10 meters per second and the acceleration occurs over 300 meters. Use the equations above to explain why the final velocity is 55.5 meters per second. Write your explanation in the comments in your code or in a separate file. Do not simply use the 55.5 meters per second result to figure out what the acceleration was! Even without knowing the final velocity you should be able to predict the acceleration from the force on the cahrge. Make sure you predict both the acceleration and the final velocity in your response. This [discussion of the units used in the code](http://www.physics.ohiostate.edu/~orban/physics_coding/units.html) may help.
Step 5. See what happens if the charge of the particle is doubled. Set q = 2.0
instead of 1.0
. Does the charge of the particle affect the final velocity? why or why not?
Step 6. See what happens if the mass of the particle is 2.0
instead of 1.0
. Change the charge of the particle back to 1.0 so that the simulation is like accelerating a Deuteron instead of a proton.
Note: Deuterons have about twice the mass as protons because a Deuteron is a proton and a neutron that are stuck together by nuclear forces. Protons and neutrons have roughly the same mass so the total mass of a Deuteron is about twice that of the proton. The net charge of the Deuteron is the same as the proton because neutrons are electrically neutral particles (no charge).
Predict the final velocity of the Deuteron and check to see if your expectation is proven right! Show your calculation, prediction and measurement in what you turn in for this lab.
Step 7. What happens if you change the electric field from 5 (the default value) to 5? Notice that the direction of the field lines changes when you do this. How fast does a Deuteron need to be traveling in order to get through the plate? Determine the minimum speed for the Deuteron to get through. Calculate why it has to be this fast!
Optional: Step 8. (Extra Credit) Modify the program in some way (choose one or more)
Suggestions/inspiration for modifying the program:
 add a component of the initial velocity in the y direction and predict the final speed
 Copy paste the rocket thruster code from planetoids so that the charge can fly around and be accelerated by the plates.
 Make the code smart enough to use negative(x,y) if the charge is less than zero and positive(x,y) if the charge is greater than zero.
How to get full credit for Part 1!!!
In what you turn in you should answer the questions asked in this programming lab: 1. Make sure to explain why the final velocity turned out to be 55.5 meters per second (Step 4) As best you can write down the equation that you used to calculate your number and write down the number you got. You may not get exactly 55.5 but that's ok. Try to get within 10% of that number. 2. Say in words whether increasing the charge of the particle from 1.0 to 2.0 affects the final velocity (Step 5) Just write a sentence. Say whether the final velocity increases, decreases or stays the same. No calculation necessary. 3. Change the mass to 2.0 and the charge back to 1.0 so that the particle is a Deuteron. Predict the final velocity and measure it (Step 6) Make sure your calculation matches the measured result to 10%. 4. Describe what happens when the electric field is negative and figure out how fast the Deuteron needs to be traveling (Step 7) Just change the initial velocity of the Deuteron until it passes through. Then calculate why it had to be this way. Write down the number for how fast it should be going. It may not match your empirical result exactly, but it should agree to maybe 10% 5. The extra credit really is optional You can still get full credit without doing the extra credit as long as you've done everything else correctlyPart 2. Electric fields and electric potential!
Thinking about the problem in terms of potential difference, the relevant equations are: $$\Delta V = E d \nonumber $$ $$\Delta KE = q \Delta V \nonumber $$ $$KE = \frac{1}{2} m v_x^2 \nonumber $$ $$\Delta KE = KE_f  KE_i \nonumber$$ where $d$ is the distance between the plates. It should be clear from the animation that the initial kinetic energy is nonzero (because $v_{xi}$ is nonzero). The purpose of this programming lab is to show that the potential difference way of thinking about the problem is just as useful as thinking about the problem in terms of forces, and maybe even more useful, if the energy is what we care about!!! You can also use your code from the previous exercise so long as you **change the charge of the particle back to +1 and the mass of the particle back to 1.0!!!** Step 3. The final velocity at the end of the animation is 55.5 meters per second. The initial velocity was 10 meters per second and the acceleration occurs over 300 meters. Go back to the previous programming lab and remember how you were able to explain why the final velocity is 55.5 meters per second. In the last programming lab we thought about the problem in terms of forces. Write down the equation that explains the 55.5 meters per second in what you turn in for this lab. Step 4. The potential difference between the plates is $\Delta V = E d$ where $E$ is 5 and $d$ is 300 meters. The potential difference is therefore $\Delta V = E d = 1500$. Choose a different value for $E$, and choose a different value for $d$ by changing the variablesx_plate_left
and x_plate_right
. Make sure that the new values of $d$ multiply to $\Delta V = 1500$ and make sure $d < 750$ or else one of the plates will be offscreen. Check to see if approximately the same final velocity (55.5 meters per second) is achieved. (The final velocity should be the same because the potential difference is the same. This is one reason why the potential difference is such a useful concept.) When you turn in this lab make sure your code has the values of $E$ and $d$ that you chose and write down the measured value of the velocity to confirm that this worked.
Step 5. With your new values for $E$ and $d$, check to see what happens if the charge of the particle is doubled. Set q = 2.0
instead of 1.0
. Does the charge of the particle affect the final velocity? why or why not? Do you get the same final velocity with the original values of $E$ and $d$? Is it faster or slower?
Step 6. With your new values for $E$ and $d$, check to see what happens if the mass of the particle is 2.0
instead of 1.0
and change the charge of the particle back to 1.0. As mentioned in the last programming lab, this is like changing the particle from a proton to a deuteron. Predict the final velocity and check to see if your expectation is proven right. Do this calculation two ways: (1) thinking about the problem in terms of forces, as in the previous programming lab, and (2) thinking about the problem in terms of the potential difference. You should be able to show that both approaches give essentially the same answer.
How to get full credit for Part 2!!!
In what you turn in you should answer the questions asked in this programming lab: 1. Write down the equation that gave 55.5 meters per second from Part 1 Feel free to look back at the last programming lab and just put this same equation here 2. Choose new values for $E$ and $d$ (Step 4a) Make sure that the code you submit contains the new values for $E$ and $d$. These should multiply to $\Delta V = Ed = 1500$ and make sure $d < 750$ or else one of the plates will be off screen. 3. State whether you get approximately the same final velocity with the new values of $E$ and $d$ (Step 4b) This is just a yes or no question. The answer should be yes (as mentioned in step 4) or else you've done something wrong. 4. Say whether increasing the charge of the particle increases the final speed (Step 5) This is just a yes/no question. Make sure you change $E$ and $d$ before you test this. 5. Change the mass and show two ways to calculate the final velocity (Step 6) You can calculate the final velocity using forces or using the change in potential. Write down the equations as best you can in the comments. Don't just show the result. You should get approximately the same answer.
Download Options
Credits and Licensing
The instructor materials are ©2017 Chris Orban.
The exercises are released under a Creative Commons AttributionNonCommercialShareAlike 4.0 license