Lab 1. Particle Accelerator

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$$ $$v_{xf}^2 = v_{xi}^2 + 2 a_x \Delta x$$ $$F_x = m a_x$$ $$F_x = q E $$

This should be fairly familiar to you by this point in the course. We will use some unusual force and electric field units 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. In the animation, notice that the initial x velocity ($v_{xi}$) is non-zero.

Step 2. Try out the accelerator code in an editor

Click on this link to open the accelertor code in a p5.js editor

Press play there to run the code. It should like the same it did with the link you were given in Step 1.

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 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:

How to get full credit for this programming lab!!!

In the comments section in the dropbox on carmen 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 neccessary.

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 correctly