184_projects:charge_the_line_24

  1. What is superposition?
  2. If you had to calculate the electric field by hand (at a single observation point) from 3 point charges, what steps would you have to use?
  3. What is the difference between an insulator and conductor?

Things have gotten weird in the town of Lakeview. After sighting the strange cloud earlier in the week, the clouds only become more frequent. The town and surrounding landscape are now under a constant barrage of storms, and there are rumors of strange creatures lurking in the woods near town. Several people have been hit by lightning within the town, and it seems like any vehicle or person trying to leave the city limits of Lakeview is immediately struck by lightning. The number of deaths due to lightning strikes in Lakeview in the last week is more than the whole world has seen in the last 5 years. Your team is trapped in town under an emergency severe storm warning.

Jo Harding, an eccentric local scientist who has had a few run-ins with storms before, has proposed putting up giant metal T's, with the base of the T inserted into the ground, to protect the townspeople from being struck by lightning. Jo wants the base of the T to be made of wood and the horizontal top of the T to be made of metal. Mayor Rachel Wando is up for reelection and is willing to listen to any ideas to stop the rising death toll, but ever since the lightning storms started, she has been in non-stop meetings in which electric fields are being constantly talked about. She is becoming very concerned about what the electric fields around these T-shaped objects would be like. Mayor Rachel reached out to her friends at Stormchaser HQ for a model of what the electric field will be for one of these T's after it has been struck by lightning.

The code below is the beginnings of your team's work on modeling the electric field from the giant T. Complete the program above to first represent the total electric field just to the right and left of the line of charges. Then, calculate the total electric field at a range of points surrounding the line of charges.

## Creating the scene for the code to run in
scene.range = 2

## Constants
TotalCharge = 15 #C
pointcharge = TotalCharge/7  
k = 9e9  
vscale = 1e-4

## Objects
charge1 = sphere(pos=vec(-3,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge2 = sphere(pos=vec(-2,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge3 = sphere(pos=vec(-1,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge4 = sphere(pos=vec(0,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge5 = sphere(pos=vec(1,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge6 = sphere(pos=vec(2,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charge7 = sphere(pos=vec(3,0,0), Q=pointcharge,  color=color.red,  size=5e-1*vec(1,1,1))
charges = [charge1, charge2, charge3, charge4, charge5, charge6, charge7]

## Calculation Loop 1
E = vec(0,0,0)
point = vec(0,0,0)
for c in charges:
    r = point - c.pos
field = arrow(pos=point, axis=vscale*E, color = color.cyan)

## Calculation Loop 2
x = -5
dx = 0.5
xmax = 5
while x<=xmax:
    theta = 0
    dtheta = 0.1
    R = 0
    while theta < 2*pi:
        E = vec(0,0,0)
        point = vec(x, R*sin(theta), R*cos(theta))
        field = arrow(pos=point, axis = E*vscale, color = color.green)
        theta += dtheta
    x+=dx

Learning Goals

  • Understand what a list (or an array) does in the code and why you would want to use one
  • Understand how a “for” loop works and how it is similar/different from a “while” loop
  • Make a model of a line of charge using point charges and be able to describe how you would improve your model
  • Use superposition to calculate and visualize the electric field around a line of charge
  1. How do you know if your code is working correctly?
  2. How did you make use of superposition in the code? What line in your code uses superposition?
  3. We assumed in this problem that the charge was divided equally among the spheres in our model. Is that a good assumption for conductors? Is that a good assumption for insulators? Why or why not?
  4. If you change the radius for your observation points, what happens to your E-Field arrows? Is that expected? Why or why not?
  5. Is this how real lightning rods work (metal connected to an insulator)? Would the T be an effective lightning rod? Why or why not? (Feel free to google how lightning rods work!)
  6. What are the limitations of this model? How could you improve your model?
  • 184_projects/charge_the_line_24.txt
  • Last modified: 2024/01/09 15:09
  • by dmcpadden