184_projects:f18_project_4_sol

Your team has been hired as part of a larger team that is developing a micro-particle accelerator. Your team is tasked with modelling the initial part of the accelerator, which uses a constant electric field to accelerate the charges. The concept is that the particles will enter a tube that is encapsulated by rings of charge. Your team needs to demonstrate that this concept will produce a constant electric field.

Part 1:

The first bit of code that you have received is from the previous team who were able to construct a single ring of charge and show the electric field due to that ring at some point. Your team should construct the electric field vectors for a circle inside the accelerator (smaller than the ring) at a distance of a few centimeters from the ring face.

#Set up constants
R = 0.02
r_obs = 0.05

Q = 1e-9 
N = 20
dq = Q/N

scale=1e-4
oofpez = 9e9 #1/(4pi epsilon_0) in N m^2/C^2

#Defining a ring at the origin
myring = ring(pos = vector(0,0,0), radius = R, axis = vector(0,0,1), color = color.blue, thickness = 0.02*R)

#Create an empty list for the charges
ChargeList=[]

#Set up the step size and angle for creating the charges
dtheta = 2*pi/N 
theta = dtheta/2 

#Create charges in a circle and add them to the ChargeList
while theta < 2*pi:
    rpiece = R*vector(cos(theta),sin(theta),0) #location of piece
    
    particle = sphere(pos = rpiece, radius = R/20, color = color.yellow)
    ChargeList.append(particle)
        
    theta = theta + dtheta

#Create an empty list for the observation points
ObsList = []

#Set up the step size and angle for creating the observation points
phi = 0
dphi = pi/4

#Create charges in a circle and add them to the ObsList
while phi < 2*pi:
    r_obs_piece = r_obs*vector(cos(phi),sin(phi),1) #location of piece
    
    obs_particle = sphere(pos = r_obs_piece, radius = R/20, color = color.red)
    
    ObsList.append(obs_particle)
        
    phi = phi + dphi

#Find the electric field at each observation point
for obs_point in ObsList:
        
    for charge in ChargeList:
        Enet=vec(0,0,0)      
Part 2

After you got this initial code working, your team was able to construct a model of a tube consisting of multiple rings, all with the same charge. But, the field doesn't look quite right - it's not constant as expected. Your bosses seem to think the field can be made constant in the tube, so it's up to you to figure out how.

Learning Goals

  • Review ideas of electric field, superposition, separation vectors, and distributions of charge
  • Review ideas of interpreting code: while and for loops, lists, creating objects/shapes
  • Explain how you created a constant electric field using rings of charge
  • Explain what would happen to a charge if it were placed in the electric field

Learning Issues

  • Understanding that you need a gradient to get a constant electric field. Having them draw pictures and build up the reasoning for what the electric field looks like for a single ring of charge, then two rings of charge, and so on can be useful here.
  • “Constant” electric field means both magnitude and direction.
  • The “Part 2” code works as is- they just have to change the signs of the charge (we do NOT want them to over complicate/change a lot in Part 2).
  • Make sure students focus on understanding and reading the code (this is good exam prep since they will be asked to do this). Commenting the code can be a good route for developing/ensuring understanding of the code. Since most of the code is written already, this is probably going to be the most viable option.

Timing Issues

  • This problem should take comparatively less time than other projects. As a result, there should be extra time at the end of class to go over questions about the material and have discussion about any misunderstandings that students have. Allocating this time at the end is not bad.

Part 1 is focused on getting the students to systematically calculate the electric field at different points. This is meant to move beyond copying and pasting to reproduce calculations for a different point and to move to setting up a list of locations at which the field will be calculated. In a sense, this is similar to Project 1B, 2B, and 3B where the students loop over locations to calculate electric field. They should be reminded of this (i.e., that they have done something similar before).

Almost all of the code is given to the students at the beginning. A large amount of their time should be focused on writing detailed comments and explaining what the code does. You should be checking in periodically and helping the students as needed, but make sure they are offering very thorough descriptions as to how the code operates. The only portion of the code that they have to change is the part at the end where they need to calculate the electric field. The following code is what they need to write. This should look very familiar to the students, but getting to this point requires them to understand a lot of what the above code does.

This is one way to do it, but there's many ways that someone could iterate through the observation locations and the chunks of charges. The important thing, again, is getting them to understand how the code creates all of the observation locations and chunks of charges. The fully solution is shown below and commented.

Part 1 Complete Solution

#Set up constants
##R represents the size that the ring object will be
R = 0.02
##The radius of the circle of points in space where we will examine the electric field
r_obs = 0.01

##Total charge of the ring
Q = 1e-9 
##The number of point charges to break the ring up into
N = 20
##The amount of charge each little chunk has
dq = Q/N

scale=1e-4
oofpez = 9e9 #1/(4pi epsilon_0) in N m^2/C^2

#Defining a ring at the origin
myring = ring(pos = vector(0,0,0), radius = R, axis = vector(0,0,1), color = color.blue, thickness = 0.02*R)

#Create an empty list for the charges
ChargeList=[]

#Set up the step size and angle for creating the charges
dtheta = 2*pi/N 
theta = dtheta/2 

#Create charges in a circle and add them to the ChargeList
while theta < 2*pi:
    rpiece = R*vector(cos(theta),sin(theta),0) #location of piece
    
    particle = sphere(pos = rpiece, radius = R/20, color = color.yellow)
    ChargeList.append(particle)
        
    theta = theta + dtheta

#Create an empty list for the observation points
ObsList = []

#Set up the step size and angle for creating the observation points
phi = 0
dphi = pi/4

#Create charges in a circle and add them to the ObsList
##These are the observation points in space where the electric field is being calculated at
##NOT the source of the charges themselves
while phi < 2*pi:
    r_obs_piece = r_obs*vector(cos(phi),sin(phi),1) #location of observation point
    
    obs_particle = sphere(pos = r_obs_piece, radius = R/20, color = color.red)
    
    ObsList.append(obs_particle)
        
    phi = phi + dphi

#Find the electric field at each observation point
for obs_point in ObsList:
    
    Enet=vec(0,0,0)
    
    ##Superposition of electric field
    ##For each of the little chunks of charge
    for charge in ChargeList:
        ##Calculate the separation vector between the observation point and the source of charge
        r_sep=obs_point.pos-charge.pos
        r_mag=mag(r_sep)
        ##Calculate the electric field for this chunk of charge
        E=oofpez*dq*r_sep/r_mag**3
        ##Add this electric field to the total electric field
        Enet=Enet+E
    ##Make a single arrow of the net electric field    
    Evector = arrow(pos = obs_point.pos, axis = scale*Enet, color = color.orange)

Discussion Prompts

  • Question: What changed when you moved your observation ring to be smaller than the radius of the charge ring?
  • Answer: The magnitude of the electric field increased (closer to the charges) and the direction became more uniform (all arrows point mostly in the z, rather than being spread out)
  • Question: What do each of the loops do in your code?
  • Answer: The first loop creates the ring of charges, the second loop creates the ring of observation points, the third/fourth loops (nested) calculate the electric field from all of the charges at each observation point.

Evaluation Questions

  • Question: How can you tell the electric field that you computed is right?
  • Expected Answer: Look at the direction of the electric field (away from positive toward negative). If you move it farther away the field should get smaller.
  • Question: How would you improve your model? (What would that do to the chunks of charge?)
  • Expected Answer: Increase the number of charges that we have around the ring, which would decrease the amount of q per charge
  • Question: What would you expect to happen if you placed a positive/negative charge in the center of your observation ring?
  • Answer: It would move away/toward the ring of charge.

Extension Questions

  • Question: If you wanted to compute the electric field at multiple locations (or with multiple rings), what would you need to change?
  • Expected Answer: Either duplicate the ring code (copy/paste) and change the x-value of the observation locations or create a second loop to vary the x position on each point

Part 2

For this code, all students need to figure out is that a charge gradient is what is needed. In order to get a constant magnetic field within the accelerator, there needs to be a surface charge gradient. This will become more clear and intuitive to the students when we start working with circuits. They only need to make it so that the rings of charge form a gradient. So the only line that needs to be changed is this one:

ring_charge = [-Q,-4*Q/5,-3*Q/5,-2*Q/5,-Q/5,0,Q/5,2*Q/5,3*Q/5,4*Q/5,Q]

This is not the only answer; any gradient will produce the desired effects. So long as there is a progression from larger to smaller amount of charge or vice-versa, the students should see a constant electric field in the accelerator. This could be from less positive on one end to more positive on the other, negative to positive, positive to negative, etc. There just has to be some kind of gradient. The more dramatic the gradient (i.e. the larger the difference between the smallest and largest charge on the rings), the bigger the constant electric field produced.

Conceptually, this will be hard, but is a big part of the pre-class reading. One way to help students make this connection is to lead them through a progression of reasoning. Have the students start with their understanding of the electric field from a single ring of charge and draw it out on the whiteboard. Then, have students include a second ring of charge in their illustration and use superposition to sketch the electric field due to the two rings of charge. Continue in this progression and have students build up this mental model of what needs to happen with the charges in order to get a constant electric field inside of the accelerator.

Possible tutor questions

Discussion Prompts

  • Question: Explain what the code is doing. Where you need to explain it, write comments to make sure that everyone understands what it is doing.
  • Expected Answer: (Do on own)
  • Question: How does it compute the electric field due to all the rings at a point? How does it cycle through the points? Can you draw a diagram or flow chart showing what it is doing?
  • Expected Answer: It creates points in a ring, then gives each of those ring a charge. Then in the loops it says for any given observation point, add up the E-field contributions from all the charges in all the rings.
  • Question: How did you make a constant electric field?
  • Expected Answer: Need to make a gradient of charge to get a constant electric field, constantly $\Delta Q$ between each pair of charges.
  • Question: How does this relate to current in a wire?
  • Expected Answer: We could approximate a wire as a cylinder of charge, in which case the charges would be the surface charges that create the constant electric field inside the wire (which then drives the electron current)

Evaluation Questions

  • Question: How did you simplify your model?
  • Expected Answer: point charges, approximate a cylinder of charge as multiple rings of charge, approximate multiple ring as points at evenly spaced thetas.
  • Question: How do you know your model is working well?
  • Expected Answer: Evaluation of output (E-field magnitude and direction match what we would predict), evaluation of assumptions

Extension Questions

  • Question: Does the gradient have to go from positive to negative?
  • Answer: Have them test out different kinds of gradients (more negative to less negative, lots of positive to less positive)
  • Question: Any lingering questions?
  • Expected Answer: ??
  • Question: How are you feeling about the exam? Are there any topics that you would like to go over?
Testing observations

Our testers had not experienced the gradient of rings of charge in their E&M class, so this involved a little more guiding. Once the concept was discussed, they knew precisely what to do. We had them talk through all the code before they made any changes to it. The found the list quickly and decided on their changes quickly.

warninglight.jpeg

You are working for The Jet Propulsion Laboratory (JPL) Division of NASA testing a new and highly experimental spacecraft capable of in atmosphere flight as well as outer orbit maneuvering. Lieutenant Pete “Maverick” Mitchell has been testing the new spacecraft now for a few weeks, and has had continuous issues with the warning light for power delivery failure to the stabilizers on the wings.

Maverick is convinced that the time between when the problem happens and when the warning light comes on is way too long, and this delay in relaying the warning to him could lead to a very problematic incident in the future. He does not want to loose another Goose. You have been given the task of explaining to Maverick why this could not be the case, and your boss, Clint Howard, has given you the following circuit diagram to try and aid you in your explanation to Maverick. The circuit diagram at this time does not include the warning light.

Maverick likes numbers, so part of your explanation should also include a calculation of the amount of time it takes the light to come on when the length of the wire in the circuit between the stabilizer control module switch and the warning light in the cockpit is 5.2$m$ distance. He should also understand what the electric field looks like in this circuit, and why it means that his original presumptions about the warning light “taking too long” cannot be correct. You should also correct this circuit diagram to include the warning light so that your boss has a more accurate circuit diagram to show people.

Learning Goals

  • Explain what happens to the surface charges and electric field in a circuit when wires are initially connected.
  • Explain why current starts to flow almost instantaneously (or rather why a light bulb turns on immediately after you flip the switch)
  • Explain why a light bulb would not turn on if it were only connected to the positive and negative of the battery.
  • Explain the role of the battery in lighting up the light bulb.

Learning Issues

  • Most of the learning goals this week are “explain” based learning goals. This problem is much more conceptually focused than previous problems. It's probably worth warning your students at the beginning of class that the goal of this problem is different.
  • If students are struggling with where to start ask them to first draw what the surface charges look like on the wires (using the fact that the wires are conductors).
  • $\Delta$t in the notes is NOT the time to run on the light bulb - this is the average time between collisions of the electrons in the wire.
  • Students may struggle with the distinction between surface charges and the charges moving in the wire (current) - these are different things!
  • It is easy to glaze over the intermediate steps in this problem. Make sure that students are explaining how the gradient of surface charges is set up, not that it just happens.

Timing Issues

  • Watch how much time you spend with each group. It's easy to spend 45 minutes with one group and ignore the other completely with this problem due to the conceptual focus. Students are going to ask more questions, which is fine, but be aware of the balance.

Other Issues

  • This is the day after the exams - students are probably worn out and may not be as prepped for this week after focusing on studying for the exam. Be aware of this.

This is a very qualitative solution, which is different than most of the previous solution. Make sure you have the groups thoroughly explain what is happening and why, and also draw pictures for the surface charge distributions.

Before the wires are connected

Suppose we have a battery, with one positive end and one negative end (could be either the chemical model or mechanical model of the battery). At each end, we connect a conductive wire. Before we connect the wires, what would the charge distribution look like along the wire?

The wire that is connected to the negative end of the battery would have a negative distribution of charge because the excess electrons would be able to spread along the length of the wire. Since the wire is a conductor, those excess charges would spread out along the surface of the wire, leaving the interior of the wire with a net electric field equal to zero. A similar process would occur for the wire connected to the positive end of the battery. An approximate charge distribution is shown in the figure, ignoring the exact details of the charge distribution.

If we zoom in on the gap between the wires, We can see an electric field at the end of the wires; however that electric field is canceled out by the electric field from the wire across the gap. So even in the ends of the wires, the net electric field is zero. There is a non-zero electric field only between the ends of the two wires.

  • Question: In the broken circuit diagram that you are given at the beginning of the problem can you sketch the electric field? What does the electric field look like between the two ends of the wires?
  • Expected Answer: The electric field points directly from the positive end of the wire to the negative end of the wire. (see above)
  • Question: At this point is there current flowing in the wire?
  • Answer: No. The electric field is zero in the wire. (There may be a small/short current when the charges from the plates spread out over the wires, but not after this process is over.)

Immediately after the wires are connected

If we complete the circuit by connecting the wires, what happens to the surface charges in the wire? The charges on the ends of the wires neutralize each other (so there is no net charge in the middle of the wires). This leaves a “tube” of surface charge on the outside of the wire. In the instant that the two wires touch, there is a strong discontinuity in the charge distributions along the wires - one side of the wire is positive and one side is negative with no smooth transition between the two. This means that there is a separation of charge and therefore there is now an electric field in the now-touching ends of the wires. The electric field in the rest of the wire is still 0. The electric field where the wires meet will point from the positive charges to the negative charges. Close to the edges, the electric field will point slightly toward the negative charge (like with the line of charge). This electric field will pull some of the negative surface charge toward the positive surface. This will create a small neutral zone which becomes important in the next time snapshot.

  • Question: What does the electric field look like immediately after the light bulb has been inserted and the connection has been made?
  • Expected Answer: The electric field points toward the center of the wire on the positive side and toward the edges on the negative side.
  • Question: What creates the constant electric field inside the wires?
  • Expected Answer: The surface charges create the electric field. There is a constant change (gradient) in surface charges along the wire to create the constant electric field.

A moment after the wires are connected

This neutral zone makes a couple of things happen. First, the electric field where the wires meet expands because the area between the positive charges, the neutral zone, and the negative charges is larger than when the charges have not cancelled out. This increased area between the regions causes the surface charges to spread out some because the positive charges will be repelled by the other positive charges further up the wire and move towards the negative region. The same is true about the negative charges. There are now parts of the positive wires which have more positive charges than the part close to where the wires meet. The electric field “spreads” because of this reason: the forming gradient causes there to an electric field further up the wire that points from more positive regions to less positive regions.

Because there is now an electric field in the wire, the mobile sea of electrons will start to move, which changes the surface charge distributions. This is a result of the neutral zone of surface charge discussed in the previous instant. Note that this starts happening after only fractions of a nano-second. Electrons moving toward the positive region of the wire will make the surface charge in that region less positive. Likewise, electrons moving away from the negative region of the wire will make that region less negative. In the middle of the wires, this creates a region with smaller amounts of charge, making that discontinuity of positive and negative charges less drastic, and setting up an electric field between the positive and negative regions.

A short time after the wires are connected

Again moments later (fractions of nano-seconds), the charge distributions in each side of the wire have rearranged. The excess negative charges have spread out so they have shifted away from the battery and more towards the center of the wire, with a similar process occurring for the positive charges. This creates regions in the wires where close to the battery there is a more concentrated surface charge and closer to the center there is a weaker surface charge. This sets up the continuous charge distribution that we see for the steady state. With this continuous charge distribution, there is now an electric field set up within the wire, which starts to move the electrons in the electron current.

The surface charges spread out some because the positive wire will repel some of the positive surface charges near the end (like charges repel, so the concentration of positive charges in that wire will spread some). The same thing happens with the negative wire. This spreading of charges bumps up against the neutral zone where there is less positive charge present. This means that there is now part of the positive wire that has more positives than the part close to where the wires meet. So, and electric field is present further up the wire that points from the more positive region of the wire to the less positive region of the wire (establishing a small, local gradient of charge). The same process occurs in the negative wire simultaneously. This electric field then starts to push the electrons in the middle of the wire and move the surface charges.

How long does this process take?

The electric field from the surface charges is set up between the two wires almost instantaneously. That electric field immediately starts pushing on the electrons in the region (from the electron sea), which then move. The electrons do not have to move very far to change the surface distribution of charge, which extends the electric field around the circuit. This causes a push on the electron in the region of the extended electric field, and so on. This means that the electric field is able to travel around the wire much more quickly than the individual electrons in the wires. In fact, the electric field travels at the speed of light ($3*10^8$ m/s) students may not know this ahead of time and may need prompting to look up, while the electrons in the wires are only traveling at close to $5*10^{-5} m/s$. So the circuit reaches a steady state long before a single electron makes a whole loop around the circuit. Once the steady state scenario has been reached, the electric field inside of the wire is constant. At that point, the only charges which are moving are the charges moving through the bulk of the wire. The surface charges at this point in time are stationary. The constant electric field is both constant in magnitude and direction (with the exception of the corners, or the kinks, in the wires, but we can make an assumption to ignore this). The current in the wire is constant because the electric field is constant and there is a constant force on the charges in the bulk of the wire (relatively speaking).

This explains why when you turn on a switch, the light comes on almost immediately. You are not waiting for an electron from the switch to travel all the way to the light bulb. You are waiting for an electric field to be set up in the wire to push the electrons that are already in and near the light bulb. Thankfully that process is much shorter! Thus, it is the speed that the electric field moves through the wire that determines how quickly the current starts, not the speed of the electrons themselves.

Discussion Prompts

  • Question: Where does the current start flowing?
  • Expected Answer: Electric field starts in the middle where the wires are connected, thus the charges first start moving in the middle of wire. But the electric field spreads almost immediately through the wire, so the charges everywhere in the wire move almost immediately. The charges do not start from the battery, but the electric field in the wire pushes the electrons that are already in the wire.
  • Question: Based on what you found, what does it mean for the circuit to be in a steady state?
  • Expected Answer: Steady state happens when the surface charges are no longer moving. This means that the electric field in the wires is CONSTANT and makes a constant current everywhere in the circuit. It is automatically not a steady state if the current is changing.
  • Question: How fast does the electric field travel compared to the drift velocity of the electrons?
  • Expected Answer: The drift velocity of the electrons is much slower. The drift speed is approximately $10^{-4}-10^{-5} m/s$ whereas the electric field travels at the speed of light.
  • Question: Why does the light bulb turn on quickly when the switch is flipped if the electron velocity is so slow?
  • Expected Answer: Because the field travels fast, which starts pushing electrons in all parts of the wire almost instantly. So a current is established everywhere within nanoseconds, even though it may take a very long time for an electron to start at the battery and reach the light bulb.
  • Question: Why does the light bulb turn on quickly when the switch is flipped if the electron velocity is so slow?
  • Expected Answer: Because the field travels fast, which starts pushing electrons in all parts of the wire almost instantly. So a current is established everywhere within nanoseconds, even though it may take a very long time for an electron to start at the battery and reach the light bulb.
  • Question: What is the role of the battery in lighting up the light bulb? (It may be easier to answer this question as: what would happen if that battery were removed?)
  • Answer: Initially the battery provides the excess surface charges, which then creates the electric field in the wire. Afterwards, the battery maintains the surface charge gradient and provides the electrons that move around the wire (i.e. the electrons in the electron current.)

Evaluation Questions

  • Question: In doing this problem, we have made a model of how current flows in a circuit. What are some of the things we have simplified/ignored in this situation? (Assumptions and approximations?)
  • Answer: We did not talk about how the electrons bend around the corners of the wires, we simplified the battery to a pair of charged parallel plates (keeping the voltage constant), we're simplifying a cylinder of surface charges to a couple +/-'s on each wire (this really happens in 3D around the surface of the wire).

Extension Questions

  • Question: Would a light bulb turn on if it were only connected to the positive end of the battery?
  • Answer: No. If this were true there would only be positive surface charges, which means the electric field inside the wire would be zero - therefore, there is nothing to push the electrons through the wire so there is no current and the light bulb would not turn on.
  • Question: Any lingering questions for this week? Anything still confusing?
Testing Observations

We (meaning Daryl) had too much about this process written into the notes. Since then, this page of notes has been removed and students are expected to reason through this on their own.

  • 184_projects/f18_project_4_sol.txt
  • Last modified: 2018/09/15 17:31
  • by nathawk