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

Charges in a conductor and Gauss's Law

Developed by Larry Engelhardt

In this activity, students simulate and visualize the motion of charges in a conductor (both a sphere and a cube) in three-dimensional space, without any external electric field. Students also compute the electric field from the conductor and discuss the results in the following three regimes: (1) Far from the conductor, (2) Close to the conductor, and (3) Inside the conductor
Subject Area Electricity & Magnetism
Levels First Year and Beyond the First Year
Learning Objectives
Students will be able to: - Calculate the number of electrons for a total charge (**Exercise 1**) - Observe and describe both the *approach* to equilibrium (the "transient" dynamics) and the final arrangement for charges in a conductor [**Exercises 2 (sphere); and 7, 8, and 9 (cube)**] - Write a computer function that will compute the net electric field from a system of system of charged particles (**Exercise 3**) - Validate their numerical E-field results (**Exercises 4 (sphere) and 10 (cube)**) - Test Gauss' Law numerically, and describe the results in the vicity of a conductor [**Exercises 5 (close to a sphere), 6 (inside a sphere), 11 (close to a cube), and 12 (inside a cube)**]
Time to Complete 150 min
**Exercise 1**: Number of electrons Throughout this activity, you will use the computer to visualize charges in a conductor, and we will let the net charge on the conductor be $Q = -5$ $\mu$C. Given this value of $Q$, calculate the number of excess electrons in the conductor. Open a new Word document, put the names of both lab partners at the top, type in your answer, and save your Word document. (You will add to this document throughout today’s lab.) **Exercise 2**: Observing the motion of $N = 200$ charges in a conducting sphere For Exercise 1, you should have calculated a very large number of electrons. It would be nice to visualize the position of every electron in the conductor, but a computer can only do about 1 billion mathematical operations per second, and if a computer were made much faster, it would melt! Hence, it is impossible to visualize every electron, even with today’s fastest computers. Instead, we will treat this net charge as being composed of $N = 200$ particles, each with charge $q = Q/N$, so each of the $N$ charges will actually represent many electrons. The following computer program simulates the motion of N charges inside of a conducting sphere of radius $R = 0.1$ m: - Trinket version: [https://trinket.io/glowscript/88da27559b]( https://trinket.io/glowscript/88da27559b) - Glowscript version: [http://www.glowscript.org/#/user/engelhardt.larry/folder/My_Programs/program/ChargesInASphericalConductor](http://www.glowscript.org/#/user/engelhardt.larry/folder/My_Programs/program/ChargesInASphericalConductor) In this program, the charges start out being distributed throughout the volume of the sphere with random initial positions. Then the charges exert forces on one another and move. What happens to the charges? Where do the charges end up? Note, for $N > 100$, it will take several seconds for the charges to equilibrate, and perhaps up to a minute. You can control-drag to look from different angles, and alt-drag to zoom in and out. After the charges have reached equilibrium, use “Snipping Tool” to take a picture of the arrangement of the charges. Paste the picture in your Word document, and below the picture, briefly describe the arrangement of charges. **Exercise 3**: Writing a function to compute the electric field Inside of the program that you just executed, you are provided with the following incomplete code: ``` # FUNCTION THAT YOU NEED TO FILL IN: def computeEfield(P): ''' Computes the total electric field at point P, which is a 3D vector. YOU WILL NEED TO COMPLETE THIS FUNCTION!! ''' E_net = vec(0, 0, 0) # PUT YOUR LINES OF CODE HERE TO COMPUTE THE E-FIELD return E_net # This sends the computed value back to the main loop P = vec(1, 0, 0) # UPDATE THIS POSITION VECTOR # ``` In order to modify the code, you will need to log in. Then complete this function so that the function will compute the net electric field at point P. **Tip**: Look at the function `computeForces` that is defined just above `computeEField` and copy and paste code from `computeForces` into `computeEField`. (Computing the net electric field is very similar to computing the net forces, but computing the net electric field is ***simpler*** since you don’t need to go through every *pair* of particles.) Remember, whenever you write a computer program, it won’t work right away. That is okay! Try things, be patient, and ask for help as needed. Once you have completed your code, copy and paste your code into your Word document, and write a sentence or two to briefly describe what your code does. **Exercise 4**: Validating the E-field far from a conducting sphere: $r = 0.5$ m, $R = 0.1$ m Using Coulomb’s Law, calculate the electric field that you would expect to observe at a distance of $r = 0.5$ meters away from a charge $Q = -5$ $\mu$C. Record your answer in your Word document. Execute your program using $N = 200$ charges, and use your program to compute the electric field at a point P located along the x axis, a distance $r = 0.5$ meters away from the center of the conducting sphere: `P = vec(0.5, 0, 0)` Verify that the electric field that you compute from the distribution of $N = 200$ charges is indeed consistent with Coulomb’s Law for $r = 0.5$ meters. If the answers are not consistent, then something is wrong that you will need to fix. Report your results in your Word document. **Exercise 5**: E-field close to a conducting sphere: $r = 0.15$ m and $R = 0.10$ m In your program, change the position of point P to `P = vec(0.15, 0, 0)` which is relatively close to the spherical conductor of radius $R = 0.1$ m. Execute your program using this value of P, and compare your results with the value predicted by Gauss’ Law for $r = 0.15$ m. Why/how is Guass’ Law relevant here? Report your results in your Word document. **Exercise 6**: E-field *inside* of a conducting sphere: $r = 0.05$ m and $R = 0.10$ m In your program, change the position of point P to `P = vec(0.05, 0, 0)` which is inside the spherical conductor of radius $R = 0.1$ m. Execute your program using this value of P. What do you observe for the electric field? In particular, how does the value of $E$ change while the $N = 200$ charges approach equilibrium? What value do you observe for $E$? How is this related to Gauss’ Law? Report your results in your Word document. **Exercise 7**: Observing the motion of $N = 8$ charges in a conducting cube The following program again simulates the motion of N charges in a conductor, but now the conductor is shaped as a ***cube*** instead of being shaped as a ***sphere***: - Trinket version: [https://trinket.io/glowscript/e8720c9884]( https://trinket.io/glowscript/e8720c9884) - Glowscript version: [http://www.glowscript.org/#/user/engelhardt.larry/folder/My_Programs/program/ChargesInARectangularConductor](http://www.glowscript.org/#/user/engelhardt.larry/folder/My_Programs/program/ChargesInARectangularConductor) Execute this program using $N = 8$ charges, and observe what the charges do. Repeat the simulation a few times (by refreshing the web browser). What happens, and why does is make sense? After the charges have reached equilibrium, use “Snipping Tool” to take a picture of the arrangement of the charges. Paste the picture in your Word document, and below the picture, briefly discuss the arrangement of charges. **Exercise 8**: Observing the motion of $N = 20$ charges in a conducting cube Repeat Exercise 7, this time using $N = 20$ charges inside the conducting cube. Again, paste the picture in your Word document, and below the picture, briefly discuss the arrangement of charges. **Exercise 9**: Observing the motion of $N = 200$ charges in a conducting cube Repeat Exercise 8, this time using $N = 200$ charges inside the conducting cube, and look very closely at the arrangement of the charges. Is there anywhere that the charges are closer together? Is there anywhere that the charges are farther apart? Again, paste the picture in your Word document, and below the picture, briefly discuss the arrangement of charges. **Exercise 10**: Validating the E-field far from a conducting cube: $r = 0.5$ m, $L = 0.1$ m In Exercise 3 you wrote some code to compute the net electric field produced by N charges. Copy and paste this code into the simulation of the cube. You can copy and paste it from your Word document and add the line `computeEField(P)` after the lines of code that make sure that the charges don’t leave from the conductor. Execute your program using $N = 200$ charges with a net charge of $Q = -5$ $\mu$C, and compute the electric field at a point P located along the x axis, a distance $r = 0.5$ meters away from the center of the conducting cube: `P = vec(0.5,0,0)` Compare your results with Coulomb’s Law (from **Exercise 4**), and verify that the electric field that you compute from the distribution of $N = 200$ charges is indeed consistent with Coulomb’s Law for $r = 0.5$ meters. If the answers are not consistent, then something is wrong that you will need to fix. Report your results in your Word document. **Exercise 11**: E-field close to a conducting cube: $x = 0.1$ m and $L = 0.1$ m In your program, change the position of point P to `P = vec(0.1, 0, 0)` which is relatively close to the conducting cube. (The cube is centered at the origin with a length of $L = 0.1$ m, extending from $x = -L/2$ to $x = +L/2$.) Execute your program using this value of P, and record the value of the electric field produced by the charged cube. Can you use Gauss’ Law to calculate an analytical value of the electric field at this point P? Why or why not? Report your results in your Word document. **Exercise 12**: E-field inside a conducting cube: $x = 0.01$ m and $L = 0.1$ m In your program, change the position of point P to `P = vec(0.01, 0, 0)` which is 1 cm away from the center of the conducting cube. Execute your program using this value of P. What do you observe for the electric field? In particular, how does the value of E change while the $N = 200$ charges approach equilibrium? What value do you observe for $E$? (To get accurate results, you might need to increase $N$ to $N = 500$ or $N = 1000$.) How are your results related to Gauss’ Law? Report your results in your Word document. After you are all done, make sure that the names of both lab partners are at the top of your Word document, save your Word document as a PDF file, and submit it on Blackboard. After you are sure that you have submitted your report, delete your Word and PDF files from the computer.

Download Options

Credits and Licensing

The instructor materials are ©2017 Larry Engelhardt.

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

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license