Student handout: Electrostatic potential of spherical shell
Computational Physics Lab II 2022
Students solve numerically for the potential due to a spherical shell of charge. Although this potential is straightforward to compute using Gauss's Law, it serves as a nice example for numerically integrating in spherical coordinates because the correct answer is easy to recognize.
Now consider a spherical shell of charge with uniform surface charge density \(\sigma\).
Decide which coordinate system to use for the point where you are asking the potential, and which coordinate system to use for locating your point on the surface.
Write down on paper an integral to find the potential.
Write a python function \(V(\vec r)\) that returns the electrostatic potential at a specified point in space.
Once you have written the above function, use it to plot the electrostatic potential versus position in the three cartesian directions.
Show (by plotting) that your potential at large distances converges to the potential of a point charge with the same total charge as your sphere.
Try constructing other visualizations.
Extra fun
Modify your code to find the potential of one octant of a spherical shell (e.g. the portion when \(x>0\) and \(y>0\) and \(z>0\)). Do your visualizations still all make sense?
Solid fun
Try a solid sphere of charge only if you have done all the tasks above. How does it behave inside the sphere?