This is an old revision of the document!


Forces on Current-Carrying Wire

Activity Information

Learning Goals

  • Understand the relationship of current direction and magnetic field direction in a current-carrying wire
    • current and magnetic field in parallel wires
  • HS-PS2-4 Motion and Stability: Forces and Interactions (ADD IN LINK)

Prior Knowledge Required

  • Right-Hand Rule
  • Magnetic force

Code Manipulation

  • Modify existing code
  • Create arrows showing magnetic force
  • Create sphere to represent movement of charge within the wire

—-

Activity

Handout

ACME Corporation Needs You! You have been hired by the Acme Corporation to develop a new detector for locating Road Runners (Accelleratti incredibus). A key portion of the detector has two wires that must run past each other for the length of the apparatus. However, it is important that they do not touch as that would cause an explosion, thereby harming the detector's only qualified user, Coyote (Carnivorous vulgaris). Your job is to assess the force acting on each of the wires as a result of a current passing through them. Here are the specifications:

  • Wires are 100 cm ling
  • Wires are 2.0 cm apart
  • Maximum permissible current is 4.5 A.
    • Current can run in the same direction or in the opposite direction through both wires

Code

  1. GlowScript 2.7 VPython
  2.  
  3. scene.width = 1000 #set the width of the window
  4. scene.height = 600 #set the height of the window
  5. scene.range = 30 #set the range of the scene - bigger to zoom out
  6.  
  7. #some constants that might be useful
  8. u = 2e-7
  9.  
  10. #location, location, location
  11. y1 = 10 #vertical location of wire 1
  12. y2 = -10 #vertical location of wire 2
  13. wirelength = 100
  14.  
  15. #define the wires objects
  16. wire1 = cylinder(pos = vec(-(wirelength/2),y1,0), length = (wirelength), color = vector(1,1,1), opacity = .2, radius = 1)
  17. wire2 = cylinder(pos = vec(-(wirelength/2),y2,0), length = (wirelength), color = vector(1,1,1), opacity = .2, radius = 1)

Answer Key

Handout

In order to first determine the force that each wire exerts on the other, the magnetic field $B$ must be calculated. This can be done using the Biot-Savart Law: $$\vec{B}=\dfrac{\mu_0}{4\pi}\dfrac{q\vec{v}}{}$$

Code

  1. GlowScript 2.7 VPython
  2.  
  3. scene.width = 1000 #set the width of the window
  4. scene.height = 600 #set the height of the window
  5. scene.range = 30 #set the range of the scene - bigger to zoom out
  6.  
  7. #some constants that might be useful
  8. u = 2e-7
  9.  
  10. #location, location, location
  11. y1 = 10 #vertical location of wire 1
  12. y2 = -10 #vertical location of wire 2
  13. wirelength = 100
  14.  
  15. #define the wires objects
  16. wire1 = cylinder(pos = vec(-(wirelength/2),y1,0), length = (wirelength), color = vector(1,1,1), opacity = .2, radius = 1)
  17. wire2 = cylinder(pos = vec(-(wirelength/2),y2,0), length = (wirelength), color = vector(1,1,1), opacity = .2, radius = 1)
  18.  
  19. #determine the distance between the wires
  20. r = wire1.pos - wire2.pos
  21.  
  22. #current and B-field calculation for wire 1
  23. I1 = vec(1,0,0) #current in amps - positive value means current is left to right - only change the x-field
  24. L = wirelength #length of wires
  25. B1 = (u*cross(I1,r))/(mag(r)**2) #magnetic field strength for current carrying wire 1 at the position of wire 2
  26.  
  27. #current and B-field calculation for wire 2
  28. I2 = vec(-1,0,0) #current in amps - positive value means current is left to right - only change the x-field
  29. B2 = (u*cross(I2,-r))/(mag(r)**2) #magnetic field strength for current carrying wire 2 at the position of wire 1
  30.  
  31. #F=ILB or more correctly L*IxB
  32. forcew2w1 = L*(cross(I2,B1))
  33. forcew1w2 = L*(cross(I1,B2))
  34. arrow(pos=wire1.pos+vec(wirelength/2,0,0), axis=(forcew2w1)*1e7, color=color.blue) #edit the axis multiplier to scale for current changes
  35. arrow(pos=wire2.pos+vec(wirelength/2,0,0), axis=(forcew1w2)*1e7, color=color.red) #edit the axis multiplier to scale for current changes
  36. arrow(pos=vec(0,y1,0), axis=(I1)*10) #arrows to indicate direction of current
  37. arrow(pos=vec(0,y2,0), axis=(I2)*10) #arrows to indicate direction of current
  38.  
  39. #define charges
  40. wirestartleft = -wirelength/2
  41. wirestartright = wirelength/2
  42.  
  43. if I1.x>0:
  44. start1 = wirestartleft
  45. x1=1
  46. else:
  47. start1 = wirestarright
  48. x1=-1
  49. if I2.x>0:
  50. start2 = wirestartleft
  51. x2=1
  52. else:
  53. start2= wirestartright
  54. x2=-1
  55.  
  56. Tin1 = text(pos = vec((start1),y1+(-5*x1),0),text='X X X X X X X X X X X X X')
  57. Tout1 = text(pos = vec((start1),y1+(5*x1),0),text='O O O O O O O O O O O O O')
  58.  
  59. Tin2 = text(pos = vec((start1),y2+(-5*x2),0),text='X X X X X X X X X X X X X')
  60. Tout2 = text(pos = vec((start1),y2+(5*x2),0),text='O O O O O O O O O O O O O')
  61.  
  62. counter = 0
  63.  
  64. while counter < 1000:
  65. charge1 = sphere(pos=vec((start1),y1,0), radius = .5, color = vec(1,0,0))
  66. charge2 = sphere(pos=vec((start2),y2,0), radius = .5, color = vec(1,0,0))
  67. while abs(charge1.pos.x) <= 50:
  68. rate(100)
  69. charge1.pos.x = (charge1.pos.x + (.5*x1))
  70. charge2.pos.x = (charge2.pos.x + (.5*x2))
  71. if charge1.pos.x >= 50:
  72. charge1.color = vector(0,0,0)
  73. charge2.color = vector(0,0,0)
  74.  
  75. counter = counter+1
  76.  

See Also

  • repository/forces_on_current_carrying_wire.1611003320.txt.gz
  • Last modified: 2021/01/18 20:55
  • by porcaro1