This Exercise Set has been submitted for peer review, but it has not yet been accepted for publication in the PICUP collection.

Repulsion between two point charges (with application to fusion!)

Developed by Chris Orban

This exercise shows the repulsion between two point charges, which is an important barrier to nuclear fusion. The student will modify the code to implement the repulsive electric force between the charges. Students should have completed the [Particle Accelerator exercise]( before working on this exercise. This exercise will use a programming language called [p5.js]( 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 designed for an algebra-based physics class at the college or high school level. It may also be useful for calculus-based physics for non-majors (e.g. engineering & science majors). This exercise is part of a series of exercises developed by Prof. Chris Orban. There are pre-and-post 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 e-mail Prof. Chris Orban ( The first paper from this study [is available at this link](, the second paper which discusses the electromagnetism exercises [is available at this link](
Subject Area Electricity & Magnetism
Levels High School and First Year
Learning Objectives
1. Students will modify a computer code to cause two charges to electrostatically repel in a realistic way. This simulation will show the distance of closest approach for two positively charged particles. 2. Students will use energy conservation to calculate the distance of closest approach. The result will match up well with the result of the simulation. 3. Students will change the charge and the mass of the incoming particle to gain an intuition for how this affects the distance of closest approach (which is an important concern if one's goal is to produce nuclear fusion reactions)
Time to Complete 60 min
Ever since scientists realized that the sun is powered by nuclear fusion reactions, people have been thinking about causing these reactions to occur in the laboratory in order to create a clean and abundant energy source. For at least five decades, this dream has been frustrated by a repulsive problem. The problem is that fusion involves bringing two positively charged nuclei very close to each other. The force between two charges is given by this equation: $$F_e = \frac{k q_1 q_2}{r^2}$$ Equivalently, the electric field from a point charge is given by: $$ E = \frac{k q_1}{r^2}$$ where the force on a nearby charge is $F = qE$. As the distance, $r$, between the two charges becomes small, the electric field becomes dramatically larger. This creates a huge repulsive force, which is the main reason why fusion energy sources haven't been developed yet. In this exercise, there will be two charges but one of these charges will be fixed in place so it can't move. This charge is called the "target" because we are throwing the other particle towards it a little bit like an arrow trying to hit the bullseye. ![](images/ParticleRepulsion/repulsion2.png "") 1. Open up the repulsion code in an editor [Click on this link to open the repulsion code in an editor]( When you click play you will notice that [the two particles pass right through each other without interacting]( Important! Create an account with the editor or sign in to an existing account. Then click "Duplicate" so you can have your own version of the code! 2. Fill in the blanks! Put in a formula for the distance between the charges and the electric field of a point charge Look closely at these lines of code:
  //r = ???; // fix this!!

  if (x < x_target) 
    E = 0; // fix this!!
  } else if (x > x_target) {
    E = 0; // fix this!!

  deltaVx = (q*E/mass)*dt;
Uncomment the first line and write down a formula for the distance, r, between the charges. The last line deltaVx = (q*E/mass)*dt should be familiar from the [Particle Accelerator!]( exercise. Use the formula for the electric field from a point charge to fix the if statement. (And we definitely need an if statement here because the electric field of a positive particle always points away from it. Thus for x < x_target the electric field should point to the left, but for x > x_target the electric field should point to the right. Is +x to the right or the left?) If you make these changes correctly, the code should [the code should behave like this]( 3. Calculate the expected distance of closest approach We can use energy conservation and potential energy to figure out how close two particles will get to each other: $$KE_i + PE_i = KE_f + PE_f = {\rm constant}$$ Imagine that there is some particle with some initial velocity, $v_i$, heading directly towards another particle. For simplicity, let's make the second particle stationary. The kinetic energy of this incoming particle is just this: $$KE_i = \frac{1}{2} m v_i^2$$ We will ignore the kinetic energy of the other particle because it is held fixed. The potential energy of two point charges is given by: $$PE = \frac{k q_1 q_2}{r}$$ This means that the initial potential energy is $PE_i = k q_1 q_2 / r_i$ and the final potential energy is $PE_f = k q_1 q_2 / r_f$ where $r_i$ is the initial distance between the two charges and $r_f$ is the final distance between the two charges. We want to know what is the distance of the closest approach that the two particles make. This is the distance where the incoming particle turns around and starts moving away from the other particle. So when the particle is closest, its velocity will be zero, and as a result $KE_f = 0$. The energy conservation equation simplifies to this: $$KE_i + PE_i = PE_f$$ $$\frac{1}{2} m v_i^2 + \frac{k q_1 q_2}{r_i} = \frac{k q_1 q_2}{r_f}$$ Solve for $r_f$ in terms of $m$, $v_i$, $k$, $q_1$, $q_2$ and $r_i$. Leave your answer symbolic for now! 4. Does your measurement of $r_f$ match the expectation? (Hint: it should!) **Write down your expected $r_f$ and the measured $r_f$ in what you submit for this lab.** These numbers should be within 10% of each other or else something has gone wrong. Note that in this example k = 100000; instead of the usual value of $9 \cdot 10^9$, which would push the particles apart faster than it would be enjoyable to watch. 5. How fast does the incoming particle need to be traveling in order to come so close to the other particle that the edges of the particles begin to overlap? Change the line float vx = 50.0; to something else. 6. Does it help if the charge of the incoming particle is larger or smaller? why? 7. Does it help if the mass of the incoming particle is larger or smaller? why? 8. Does it help if the charge of the stationary particle is larger or smaller? why? Challenge #1: Add something fun to the program that only happens when the two particles are very close to each other. For example, write "Fusion!" to the screen. Challenge #2: What happens if the incoming particle has a small velocity in the vertical direction? How does that affect the distance of closest approach? Is it a big difference? What if the incoming particle does not start at exactly the same y position as the target? Challenge #3: Let both particles move in response to each other. Try to calculate and measure the closest distance that they reach.

Download Options

Credits and Licensing

The instructor materials are ©2017 Chris Orban.

The exercises are released under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license