Magnetic Field of a Long Straight Wire: Difference between revisions

From Physics Book
Jump to navigation Jump to search
 
(45 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Main Idea==
Edited by Priya Sharma (Fall 2019)
 
==History==
The magnetic field of a wire was first discovered during an experiment by '''Hans Christian Oersted''' (1777-1851) of Denmark in 1820. This experiment consisted of running a current through a wire and placing a compass underneath it to see if there was any effect. The effect he found changed the world forever: he had discovered the important relationship between electricity and magnetism. Before this, the world had taken note of the similarities between electricity and magnetism but nobody had truly "proved" this relationship up until this point. Oersted then went on to write his groundbreaking scientific paper "Experiments on the effect of a current of electricity on the magnetic needle," which shocked and awed the rest of the scientific world. This was the birth of Physics 2. If it had not been for Oersted, we might not be taking this very class at Georgia Tech! While this finding falls directly into the category of "Magnetic Field of a Long Straight Wire," it also may very well be the most important discovery by any physicist in history (this is up for debate but this is just my opinion on the topic; nonetheless, it is extremely crucial).
 
==Summary==
A long straight wire, that is carrying some current I, will generate it's own magnetic field. The shape of the magnetic field will be concentric  circles centered around the wire. The magnetic field lines are identical and the spacing of these lines increases as the distance increased. The direction of the magnetic field lines can be observed by placing small compass needles on a circle close to the wire. If there is no current, then the needles will align with the Earth's magnetic field and if there is a current, then the needles will point tangent to the circle. If the wire is vertical and the current is facing upwards, then on the left side of the wire, the magnetic field will come out towards you. On the right side of the wire, the magnetic field would go in towards the other direction. If the current was going downwards, then the magnetic field would reverse directions but would still be in concentric circles around the wire. The second form of the right hand rule in terms of the wire would be used so that the thumb is going in the direction of the current, and the fingers will go in the direction of the magnetic field. The closer you get to the wire, the stronger the magnetic field. The further you get from the wire, the weaker the magnetic field. As the magnetic field gets spread out, it is distributed over a wider circumference. The mathematical interpretation of the magnetic field is detailed below.
 
==Models==


===Mathematical Model===
===Mathematical Model===
Imagine centering a wire of length <math>L</math> on the y-axis, and having a current <math>I</math> run through the wire in the +y direction. We are interested in finding the magnetic field at some point along the z axis, say <math> (0,0,z) </math>.
From here, we use the Biot-Savart Law:
::<math> d\mathbf{B} = \frac{\mu_{0}}{4\pi} \frac{I d\mathbf{L} \times \mathbf{\hat r}}{r^2}</math>
In our case, <math>\mathbf{\hat r}</math> is simply a unit vector in the direction of a point along the wire <math>(0,y,0)</math> to a point along the z-axis <math>(0,0,z)</math>. This can be represented by:
::<math>\mathbf{\hat r} = \frac{\mathbf{r}}{|\mathbf{r}|} = \frac{(0,0,z) - (0,y,0)}{\left|(0,0,z) - (0,y,0) \right|} = \frac{(0,-y,z)}{\left|(0,-y,z)\right|} = \frac{(0,-y,z)}{\sqrt{y^2 + z^2}}</math>
In our case, <math>d\mathbf{L}</math> is simply a vector pointing along a length of the wire. Since our wire is solely along the y-axis, this can be reduced as follows:
::<math>d\mathbf{L} = d \Bigr[(0,y,0)\Bigr] = (0,dy,0)</math>
Now we can compute the absolute value of the cross product between <math>\mathbf{\hat r}</math> and <math>d\mathbf{L}</math>, where <math>r = \sqrt{y^2 + z^2}</math>:
::<math>|d\mathbf{L} \times \mathbf{\hat r}| = \left|\begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 0 & -\frac{y}{r} & \frac{z}{r} \\ 0 & dy & 0 \end{vmatrix}\right| = \Biggr| \ \mathbf{i} \biggr[0 \times \left(- \frac{y}{r}\right) - \frac{z}{r} dy \biggr] - \mathbf{j} \biggr[0 - 0 \times \frac{z}{r} \biggr] + \mathbf{k} \biggr[0 \times dy - 0 \times \left(-\frac{y}{r}\right) \biggr] \ \Biggr| = \Biggr| \ \mathbf{i}\biggr[-\frac{z}{r}dy \biggr] - \mathbf{j}\biggr[0 \biggr] + \mathbf{k}\biggr[0 \biggr] \ \Biggr| = \Biggr| \ \left(-\frac{z}{r}dy,0,0\right) \ \Biggr| = \left(\frac{z}{r}dy, 0, 0\right)</math>
Thus we have:
::<math>d\mathbf{B} = \frac{\mu_{0}}{4\pi} \frac{I \left(\frac{z}{r}dy, 0, 0\right)}{r^2} = \frac{\mu_{0}}{4\pi} \frac{Iz}{r^3}dy = \frac{\mu_{0}}{4\pi} \frac{Iz}{(y^2 + z^2)^{3/2}}dy</math>
To find the total magnetic field at a point along the z-axis due to the wire, we integrate from one end of the wire to the other end of the wire, or in this case:
::<math>-\frac{L_0}{2}</math> to <math>\frac{L_{0}}{2}</math>, since the wire is centered at the origin and along the y-axis.
The integral then is:
::<math>\int d\mathbf{B} = \int_{-L_0/2}^{L_0/2} \frac{\mu_{0}}{4\pi} \frac{Iz}{(y^2 + z^2)^{3/2}}dy = \frac{\mu_0}{4\pi} \frac{IL}{z\sqrt{z^2 + (L/2)^2}}</math>
Therefore, the total magnetic field <math>B</math> due to a wire of length <math> L </math> with current <math> I </math> at a distance <math> z </math> away from the wire is:
::<math>B = \frac{\mu_0}{4\pi} \frac{IL}{z\sqrt{z^2 + (L/2)^2}}</math>
====Approximation====
If it is known that <math>L >> z</math>, then the denominator of the above formula can be approximated by:
::<math> \sqrt{z^2+(L/2)^2} \approx \frac{L}{2} </math>
Therefore, if you have a really long wire, and you are trying to find the magnetic field of a point relatively close to the rod, you can use the approximation:
::<math> B = \frac{\mu_0}{4\pi} \frac{2I}{z} </math>  [1]
In most situations, at least in the scope of this course, it is stated in the question whether or not you can use the approximation. This can come in a few different forms: "assume z<<L," "assume the length of the wire is much longer than than the distance from the wire to the observation location," etc. However, if it is not explicitly stated, a good rule of thumb is that if the length of the wire is 100 times+ the <math>z</math>, we can use the approximation formula. Otherwise, it is smart to just play it safe and use the full formula.


==Magnetic Field Near a Midpoint of the Wire==
===Computational Model===
===Computational Model===
This can be found in the mathematical model section where the infinitesimal piece is integrated.
This can also be done in Glowscript as shown below:
:d = display(height=400, width=1000)
:d.background = color.white
:d.forward = vector(-0.2,-0.2,-1)
:L = 1
:d.range = 0.2*L
:d.center = vector(0.15*L,0,0)
:d.caption = """Magnetic field of a long straight current-carrying wire. Click to advance dl. After first value of B it will run continuously.
:Magenta arrow: dl. Red arrow: r. Cyan arrow: B."""


==Examples==
:I = 5
:kmag = 1e-7
:N = 20
:dx = L/N
:dl = vector(dx,0,0)
:r1 = 0.1
:r2 = 0.2
:Bscale = 1e4
:wire = []
:for x in arange(-L/2,L/2,dx):
:::c = cylinder(pos=vector(x,0,0), axis=dl*0.9, radius=0.005, color=color.orange)
:::wire.append(c)
   
:arr = []
:da = L/8
:for x in arange(-L/2+2*da, L/2-da, da):
:::for theta in arange(0, 2*pi, pi/4):
:::b = arrow(pos=vector(x,-r1*sin(theta), r1*cos(theta)), color=color.cyan,
::::::shaftwidth = 0.008, axis=vector(0,0,0))
:::arr.append(b)
:for x in arange(-L/2+2*da, L/2-da, da):
:::for theta in arange(0, 2*pi, pi/4):
::::::b = arrow(pos=vector(x,-r2*sin(theta), r2*cos(theta)), color=color.cyan,
:::::::::shaftwidth = 0.004, axis=vector(0,0,0))
::::::arr.append(b)
:ra = arrow(pos=vector(0,0,0), axis=vector(0,0,0), color=color.red, shaftwidth=0.005)
:dla = arrow(pos=vector(0,0,0), axis=vector(0,0,0), color=color.magenta, shaftwidth=0.005)
:dl_label = label(pos=dla.pos, text="dl", yoffset=8, xoffset=3, color=dla.color, opacity=0, box=0, line=0, height=24)
:r_label = label(pos = ra.pos + ra.axis/2, color=ra.color, text="r", yoffset=-7, xoffset=5, opacity=0, box=0, line=0, height=24)
 
:count = 0
:rateval = 200
:for a in arr:
:::for s in wire:
::::::rate(rateval)
::::::r = a.pos - (s.pos+dl/2)
::::::ra.pos = (s.pos+dl/2)
::::::ra.axis = r
::::::r_label.pos = ra.pos + ra.axis/2
::::::dla.pos = s.pos+vector(0,0.011,0)
::::::dla.axis = dl
::::::dl_label.pos = dla.pos
::::::a.axis = a.axis +Bscale*kmag*I*cross(dl, norm(r))/mag(r)**2
::::::if count < 20:
:::::::::d.waitfor('click')
::::::elif count < 2*N:
:::::::::rateval = 2
::::::elif count < 8*N:
:::::::::rateval = 5
::::::elif count < 40*N:
:::::::::rateval = 50
::::::else:
:::::::::rateval = 100
::::::count = count+1
 
:ra.visible = False
:dla.visible = False
:r_label.visible = False
:dl_label.visible = False
 
====Application with a Compass====
 
If you run a current through a wire and place a compass near it, the needle of the compass deflects due to the magnetic field from this wire. With no current in the wire, the compass will face North. When approximately .314A is run through a wire, the compass deflects by approximately 20 degrees. In fact, the amount of deflection that there is from the wire can actually help you calculate the approximate magnetic field of the wire. This is because there is a particular relationship between the needle of the compass, the magnetic field of the wire, and the magnetic field of the Earth itself that looks like this:
 
::<math> |B_w| = |B_E| \text{tan}\theta </math>
 
The Earth itself has a magnetic field anywhere on the Earth (based on location it varies slightly, but it is easier to assume it is constant) of approximately <math>2e^{-5} \ \text{T}</math> which is why the compass points notes. In the formula above, theta is the amount of degrees that, when placed directly above or underneath, the compass needle deflects from North. This is a very useful formula to have in lab or in the real world if it is unknown how much current is running through a wire.


===Simple===


===Middling===
==Examples==
===Easy===


===Difficult===
The magnitude of the magnetic field <math>50 \ \text{cm}</math> from a long, thin, straight wire is<math> 8.0 \ \text{μT}</math>.


==Connectedness==
:'''a) What is the approximate current through the long wire?'''


==History==
::Using the approximation formula for a long, thin straight wire,


==See also==
:::<math>B = \frac{\mu_{0}}{4\pi}\frac{2I}{r}</math>


===Further Reading===
::we see the current needed to supply the stated magnetic field is:
===External Links===


==References==
:::<math>I = \frac{4\pi r B}{2 \mu_{0}} = \frac{4\pi \times 0.5 \times 8.0 \times 10^{-6}}{2 \times 4\pi \times 10^{-7}} = 20 \ \text{A}</math>


In many cases, we are interested in calculating the electric field of a long, straight wire. Wires can create magnetic fields if they have a current flowing through them. If no current is flowing, then there will be no magnetic fields created. Below are steps that explain the derivation of the formula for calculating the magnetic field as well as how to calculate the direction of magnetic field. [1]
:'''b) An ordinary compass that points north when not in the vicinity of a magnetic field is pointing at <math>\theta_{1} = 325^{&deg;}</math>. A wire with a current is then placed directly above the compass and the needle now points at <math>\theta_{2} = 240^{&deg;}</math>. What is the approximate magnitude of the magnetic field of this wire?'''


==Calculation of Magnetic Field==
::Using our useful lab formula:


===Derivation===
:::<math> |B_{wire}| = |B_E| \text{tan}(\theta)</math>
Imagine centering a wire on the y-axis and having a current run through the wire in the +y direction. We are interested in finding the magnetic field at some point along the z axis, say <math> (0,0,z) </math>.


From here, it is an integral problem where you take an arbitrary piece of the rod and plug it into the generic formula for change in magnetic field: <math> \vec{B}  =\frac{\mu_0}{4\pi} \frac{I(\vec{l} \times \hat{r})}{y^2+z^2}  </math>
::<math>\theta</math> will equal the difference between the initial angle and the final angle:


First, you can find the <math> \hat{r} </math>. The directional vector <math> \vec{r} </math> is equal to <math> (0,0,z) - (0,y,0) = (0,-y,z) </math>. You get this by doing final position - initial position.
:::<math>\theta = \theta_{2} - \theta_{1} = 240 - 325 = -85&deg; </math>
Next, you can find the magnitude of r, and you will get <math> \sqrt{(z^2+y^2)} </math>. As a result, your <math> \hat{r} = \frac{(0,-y,z)}{\sqrt{(z^2+y^2)}} </math>


The last thing we need to calculate is the <math>\Delta \vec{L}</math>. This is nothing more than a unit vector that tells us what direction the current is flowing. Since we know that the current is flowing in the +y axis, our <math>\Delta \vec{L} = \Delta{y} (0,1,0) </math>.
::Therefore:


Now that we have everything we need, we can plug it into the equation and evaluate the cross product. As a result we get <math> \Delta \vec{B}  =\frac{\mu_0}{4\pi} \frac{I \Delta {y}}{(z^2+y^2)^{3/2}} (z,0,0) </math>
:::<math>|B_w| = 2e^{-5} \times \text{tan}(-85&deg;)</math>


The final step is to integrate this. Since it is centered at the origin, we have to integrate from -L/2 to L/2. So our equation looks like <math> \int\limits_{-L/2}^{L/2}\ \Delta \vec{B}  =\frac{\mu_0}{4\pi} \frac{I}{(z^2+y^2)^{3/2}} (z,0,0) \delta {y}</math>
:::<math>|B_w| = 2.29 \times 10^{-4} \ \text{T} </math>


Integrating this, we get the expression <math> B = \frac{\mu_0}{4\pi} \frac{LI}{z(\sqrt{z^2+(L/2)^2})} </math>  [1]
===Medium===


===Approximation===
The current through a thin, straight wire that is <math>2 \ \text{m}</math> long is <math>74 \ \text{A}</math>.


If you know that L>>r, then you know that <math> \sqrt{r^2+(L/2)^2} = L/2 </math>. Therefore, if you have a really long wire and you are trying to find the magnetic field of a point relatively close to the rod, you can use the approximation <math> B = \frac{\mu_0}{4\pi} \frac{2I}{r} </math> [1]
:'''a) What is the magnitude of the magnetic field at a location <math>0.35 \ \text{m}</math> away and perpendicular to the center of the wire?'''


In most situations, at least in the scope of this course, it is stated in the question whether or not you can use the approximation or not. This can come in a few different forms: "assume r<<L," "assume the length of the wire is much longer than than the distance from the wire to the observation location, etc.". However, if it is not explicitly stated, a good rule of thumb is that if the length of the wire is 100 times+ the r, we can use the approximation formula. Otherwise, it is smart to just play it safe and use the full formula.
::Using the full formula:


==Application with a Compass==
:::<math> B = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} </math>


As you have already seen in lab (or you will see soon, depending on how far along the semester you are), if you run a current through a wire and place a compass near it, the needle of the compass deflects due to the magnetic field from this wire. In fact, the amount of deflection that there is from the wire can actually help you calculate the approximate magnetic field of the wire. This is because there is a particular relationship between the needle of the compass, the magnetic field of the wire, and the magnetic field of the Earth itself that looks like this:
:::<math> B = \frac{\mu_0}{4\pi} \frac{2 \times 74}{0.35\sqrt{0.35^2+(2/2)^2}} </math>


<math> |B_w| = |B_E|*tan(theta) </math>
:::<math> B = 39.912 \ \mu \text{T}</math>


The Earth itself has a magnetic field anywhere on the Earth (obviously based off location it varies slightly but it is easier to assume so) of approximately 2e^-5 T. We ourselves normally do not notice this by looking at an ordinary compass, but it is actually the reason that a compass' needle points north! In the formula above, theta is the amount of degrees that, when placed directly above or underneath, the compass needle deflects from North. This is a very useful formula to have in lab or in the real world if it is unknown how much current is running through a wire.
===Difficult===


==Direction of Magnetic Field==
There are two wires, separated by a distance of <math>80</math> meters on the x-axis. The left wire has a current running through it of <math>5 \ \text{A}</math>, while the right wire has a current running through it of <math>12 \ \text{A}</math>. The length of the left wire is <math>2</math> meters, while the length of the right wire is <math>3</math> meters.


If you are simply interested in finding the direction of the magnetic field, all you have to do is use the right hand rule. Point your right thumb in the direction of the current, and your hand will curl in the direction of the magnetic field. So, for this situation, we point our thumb in the y direction and, at a point on the +z axis, we can see that our fingers curl right, or towards the +x direction. [1]
:'''a) Find the total magnetic field at a point on the x-axis directly in between the two wires.'''


Example 1:
::Using the full formula, the magnetic field due to the left wire is:


A wire sits directly in the z-axis with current flowing out of the page (positive z direction). In what direction is the magnetic field at a point to the right of the wire?
:::<math> B_L = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} </math>


Solution:
:::<math> B_L = \frac{\mu_0}{4\pi} \frac{2 \times 5}{40\sqrt{40^2+(2/2)^2}} </math>


If you point your thumb in the direction of the current, you can see that on the right side of your curled fingers, your fingers curl directly up, so the direction of the magnetic field is the positive y direction.
:::<math> B_L = 6.25 \times 10^{-10} \ \text{T}</math>


Example 2:
::The magnetic field due to the right wire then is:


A wire sits directly in the x-axis with current flowing in the negative direction. In what direction is the magnetic field at a point below the wire (-y relative to the wire)?
:::<math> B_R = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} </math>


Solution:
:::<math> B_R = \frac{\mu_0}{4\pi} \frac{3 \times 12}{-40\sqrt{(-40)^2+(3/2)^2}} </math>


If you point your thumb to the right, you see that at the bottom of your curled fingers, your fingers curl directly into the page, so the direction of the magnetic field is into the page (-z direction).
:::<math> B_R = -2.25 \times 10^{-9} \ \text{T}</math>


Example 3:
::The total magnetic field will be the sum of the two magnetic fields:


A wire sits directly in the z-axis with current flowing out of the page (positive z direction). In what direction is the magnetic field at a point along the wire?
:::<math> B_T = B_L + B_R </math>


Solution:
:::<math> B_T = 6.25 \times 10^{-10} - 2.25 \times 10^{-9} </math>


This is somewhat of a trick question. You may not be able to see this by the right rule, but if we look at the actual formula of the magnetic field, the direction is based off the cross product of IL and rhat. Because they are both in the same direction the crossproduct is 0, so the magnetic field at this point is also 0.
:::<math> B_T = -1.62 \times 10^{-9} \ \text{T}</math>


==Connectedness==
==Connectedness==
I am very interested in clean energy storage and production, which typically involves long wires at some point between where the energy is generated and where electricity is used. It is important to understand all the forces involved with an electrical current, so that if something goes wrong, you can determine where the problem is and why it might be occurring so that you can fix it. [1]
I am very interested in clean energy storage and production, which typically involves long wires at some point between where the energy is generated and where the electricity is used. It is important to understand all the forces involved with an electrical current, so that if something goes wrong, you can determine where the problem is and why it might be occurring so that you can fix it.


I am an electrical engineer major, so all of the material within this class is vastly important, not only for the following courses required for a EE major, but also for the field once we graduate and find a job. However, this concept specifically interests me because for a while I had a very difficult time finding the direction of the magnetic field in situations such as these, so this is my way of giving back in an effort to make sure future students don't run into the same problem. [2]
I am an Electrical Engineering major, so all of the material within this class is vastly important, not only for the following courses required for an EE major, but also for the field once we graduate and find a job. However, this concept specifically interests me because for a while I had a very difficult time finding the direction of the magnetic field in situations such as these, so this is my way of giving back in an effort to make sure future students don't run into the same problem.


==History==
I am an Industrial Engineering major and think that it is really interesting to see the theory behind how compasses are affected by currents within a wire and their associated magnetism. A compass is such an everyday item but I had never looked into why it works the way it does, and this specific topic gave me a lot of insight into that. Additionally, it is really intriguing to learn about the second form of the right hand rule and its applications.  
The magnetic field of a wire was first discovered during an experiment by '''Hans Christian Oersted''' (1777-1851) of Denmark in 1820. There are many rumors of this story that this discovery was actually an accident, but Oersted claims that it was, indeed, based off predictions that he had made beforehand. This experiment consisted of running a current through a wire and placing a compass underneath it to see if there was any effect. And the effect he found changed the world forever: he had discovered the important relationship between electricity and magnetism. Before this, the world had taken note of the similarities between electricity and magnetism but nobody had truly "proved" this relationship up until this point. Oersted then went on to write his groundbreaking scientific paper "Experiments on the effect of a current of electricity on the magnetic needle," which shocked and awed the rest of the scientific world. This was the birth of physics 2. If it had not been for Oersted, we might not be taking this very class at Georgia Tech! While this finding falls directly into the category of "Magnetic Field of a Long Straight Wire," it also may very well be the most important discovery by any physicist in history (this is up for debate but this is just my opinion on the topic; nonetheless, it is extremely crucial). To wrap up the story, the content of Oersted's paper was marvelous . . . and, thus, Emag was born!


==References==
==See also==
[1] Matter and Interactions Vol. II


[2] OpenStax University Physics
===Further Reading===
*[http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/Biosav.html HyperPhysics Biot-Savart Law]<br>
*[https://www.youtube.com/watch?v=nfSJ62mzKyY Bozeman Science Magnetic Field of a Wire]<br>
*[https://phys.libretexts.org/Bookshelves/University_Physics/Book%3A_University_Physics_(OpenStax)/Map%3A_University_Physics_II_-_Thermodynamics%2C_Electricity%2C_and_Magnetism_(OpenStax)/12%3A_Sources_of_Magnetic_Fields/12.2%3A_Magnetic_Field_due_to_a_Thin_Straight_Wire]<br>
*[https://projects.ncsu.edu/PER/Articles/LunkBFieldArticle.pdf]<br>


[3] Skulls in the Stars
===External Links===
*[[Magnetic Field of a Loop]]<br>
*[[Magnetic Field of a Disk]]<br>
*[[Biot-Savart Law for Currents]]<br>
*[[Magnetic Field]]<br>
*[[Moving Point Charge]]<br>


==References==
*Matter and Interactions Vol. II


This page was created by Arjun Patra
*OpenStax University Physics


This page was edited by Brandon Baker
*Skulls in the Stars

Latest revision as of 22:06, 27 September 2023

Edited by Priya Sharma (Fall 2019)

History

The magnetic field of a wire was first discovered during an experiment by Hans Christian Oersted (1777-1851) of Denmark in 1820. This experiment consisted of running a current through a wire and placing a compass underneath it to see if there was any effect. The effect he found changed the world forever: he had discovered the important relationship between electricity and magnetism. Before this, the world had taken note of the similarities between electricity and magnetism but nobody had truly "proved" this relationship up until this point. Oersted then went on to write his groundbreaking scientific paper "Experiments on the effect of a current of electricity on the magnetic needle," which shocked and awed the rest of the scientific world. This was the birth of Physics 2. If it had not been for Oersted, we might not be taking this very class at Georgia Tech! While this finding falls directly into the category of "Magnetic Field of a Long Straight Wire," it also may very well be the most important discovery by any physicist in history (this is up for debate but this is just my opinion on the topic; nonetheless, it is extremely crucial).

Summary

A long straight wire, that is carrying some current I, will generate it's own magnetic field. The shape of the magnetic field will be concentric circles centered around the wire. The magnetic field lines are identical and the spacing of these lines increases as the distance increased. The direction of the magnetic field lines can be observed by placing small compass needles on a circle close to the wire. If there is no current, then the needles will align with the Earth's magnetic field and if there is a current, then the needles will point tangent to the circle. If the wire is vertical and the current is facing upwards, then on the left side of the wire, the magnetic field will come out towards you. On the right side of the wire, the magnetic field would go in towards the other direction. If the current was going downwards, then the magnetic field would reverse directions but would still be in concentric circles around the wire. The second form of the right hand rule in terms of the wire would be used so that the thumb is going in the direction of the current, and the fingers will go in the direction of the magnetic field. The closer you get to the wire, the stronger the magnetic field. The further you get from the wire, the weaker the magnetic field. As the magnetic field gets spread out, it is distributed over a wider circumference. The mathematical interpretation of the magnetic field is detailed below.

Models

Mathematical Model

Imagine centering a wire of length [math]\displaystyle{ L }[/math] on the y-axis, and having a current [math]\displaystyle{ I }[/math] run through the wire in the +y direction. We are interested in finding the magnetic field at some point along the z axis, say [math]\displaystyle{ (0,0,z) }[/math].

From here, we use the Biot-Savart Law:

[math]\displaystyle{ d\mathbf{B} = \frac{\mu_{0}}{4\pi} \frac{I d\mathbf{L} \times \mathbf{\hat r}}{r^2} }[/math]

In our case, [math]\displaystyle{ \mathbf{\hat r} }[/math] is simply a unit vector in the direction of a point along the wire [math]\displaystyle{ (0,y,0) }[/math] to a point along the z-axis [math]\displaystyle{ (0,0,z) }[/math]. This can be represented by:

[math]\displaystyle{ \mathbf{\hat r} = \frac{\mathbf{r}}{|\mathbf{r}|} = \frac{(0,0,z) - (0,y,0)}{\left|(0,0,z) - (0,y,0) \right|} = \frac{(0,-y,z)}{\left|(0,-y,z)\right|} = \frac{(0,-y,z)}{\sqrt{y^2 + z^2}} }[/math]

In our case, [math]\displaystyle{ d\mathbf{L} }[/math] is simply a vector pointing along a length of the wire. Since our wire is solely along the y-axis, this can be reduced as follows:

[math]\displaystyle{ d\mathbf{L} = d \Bigr[(0,y,0)\Bigr] = (0,dy,0) }[/math]

Now we can compute the absolute value of the cross product between [math]\displaystyle{ \mathbf{\hat r} }[/math] and [math]\displaystyle{ d\mathbf{L} }[/math], where [math]\displaystyle{ r = \sqrt{y^2 + z^2} }[/math]:

[math]\displaystyle{ |d\mathbf{L} \times \mathbf{\hat r}| = \left|\begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 0 & -\frac{y}{r} & \frac{z}{r} \\ 0 & dy & 0 \end{vmatrix}\right| = \Biggr| \ \mathbf{i} \biggr[0 \times \left(- \frac{y}{r}\right) - \frac{z}{r} dy \biggr] - \mathbf{j} \biggr[0 - 0 \times \frac{z}{r} \biggr] + \mathbf{k} \biggr[0 \times dy - 0 \times \left(-\frac{y}{r}\right) \biggr] \ \Biggr| = \Biggr| \ \mathbf{i}\biggr[-\frac{z}{r}dy \biggr] - \mathbf{j}\biggr[0 \biggr] + \mathbf{k}\biggr[0 \biggr] \ \Biggr| = \Biggr| \ \left(-\frac{z}{r}dy,0,0\right) \ \Biggr| = \left(\frac{z}{r}dy, 0, 0\right) }[/math]

Thus we have:

[math]\displaystyle{ d\mathbf{B} = \frac{\mu_{0}}{4\pi} \frac{I \left(\frac{z}{r}dy, 0, 0\right)}{r^2} = \frac{\mu_{0}}{4\pi} \frac{Iz}{r^3}dy = \frac{\mu_{0}}{4\pi} \frac{Iz}{(y^2 + z^2)^{3/2}}dy }[/math]

To find the total magnetic field at a point along the z-axis due to the wire, we integrate from one end of the wire to the other end of the wire, or in this case:

[math]\displaystyle{ -\frac{L_0}{2} }[/math] to [math]\displaystyle{ \frac{L_{0}}{2} }[/math], since the wire is centered at the origin and along the y-axis.

The integral then is:

[math]\displaystyle{ \int d\mathbf{B} = \int_{-L_0/2}^{L_0/2} \frac{\mu_{0}}{4\pi} \frac{Iz}{(y^2 + z^2)^{3/2}}dy = \frac{\mu_0}{4\pi} \frac{IL}{z\sqrt{z^2 + (L/2)^2}} }[/math]

Therefore, the total magnetic field [math]\displaystyle{ B }[/math] due to a wire of length [math]\displaystyle{ L }[/math] with current [math]\displaystyle{ I }[/math] at a distance [math]\displaystyle{ z }[/math] away from the wire is:

[math]\displaystyle{ B = \frac{\mu_0}{4\pi} \frac{IL}{z\sqrt{z^2 + (L/2)^2}} }[/math]

Approximation

If it is known that [math]\displaystyle{ L \gt \gt z }[/math], then the denominator of the above formula can be approximated by:

[math]\displaystyle{ \sqrt{z^2+(L/2)^2} \approx \frac{L}{2} }[/math]

Therefore, if you have a really long wire, and you are trying to find the magnetic field of a point relatively close to the rod, you can use the approximation:

[math]\displaystyle{ B = \frac{\mu_0}{4\pi} \frac{2I}{z} }[/math] [1]

In most situations, at least in the scope of this course, it is stated in the question whether or not you can use the approximation. This can come in a few different forms: "assume z<<L," "assume the length of the wire is much longer than than the distance from the wire to the observation location," etc. However, if it is not explicitly stated, a good rule of thumb is that if the length of the wire is 100 times+ the [math]\displaystyle{ z }[/math], we can use the approximation formula. Otherwise, it is smart to just play it safe and use the full formula.

Magnetic Field Near a Midpoint of the Wire

Computational Model

This can be found in the mathematical model section where the infinitesimal piece is integrated. This can also be done in Glowscript as shown below:

d = display(height=400, width=1000)
d.background = color.white
d.forward = vector(-0.2,-0.2,-1)
L = 1
d.range = 0.2*L
d.center = vector(0.15*L,0,0)
d.caption = """Magnetic field of a long straight current-carrying wire. Click to advance dl. After first value of B it will run continuously.
Magenta arrow: dl. Red arrow: r. Cyan arrow: B."""
I = 5
kmag = 1e-7
N = 20
dx = L/N
dl = vector(dx,0,0)
r1 = 0.1
r2 = 0.2
Bscale = 1e4
wire = []
for x in arange(-L/2,L/2,dx):
c = cylinder(pos=vector(x,0,0), axis=dl*0.9, radius=0.005, color=color.orange)
wire.append(c)
arr = []
da = L/8
for x in arange(-L/2+2*da, L/2-da, da):
for theta in arange(0, 2*pi, pi/4):
b = arrow(pos=vector(x,-r1*sin(theta), r1*cos(theta)), color=color.cyan,
shaftwidth = 0.008, axis=vector(0,0,0))
arr.append(b)
for x in arange(-L/2+2*da, L/2-da, da):
for theta in arange(0, 2*pi, pi/4):
b = arrow(pos=vector(x,-r2*sin(theta), r2*cos(theta)), color=color.cyan,
shaftwidth = 0.004, axis=vector(0,0,0))
arr.append(b)
ra = arrow(pos=vector(0,0,0), axis=vector(0,0,0), color=color.red, shaftwidth=0.005)
dla = arrow(pos=vector(0,0,0), axis=vector(0,0,0), color=color.magenta, shaftwidth=0.005)
dl_label = label(pos=dla.pos, text="dl", yoffset=8, xoffset=3, color=dla.color, opacity=0, box=0, line=0, height=24)
r_label = label(pos = ra.pos + ra.axis/2, color=ra.color, text="r", yoffset=-7, xoffset=5, opacity=0, box=0, line=0, height=24)
count = 0
rateval = 200
for a in arr:
for s in wire:
rate(rateval)
r = a.pos - (s.pos+dl/2)
ra.pos = (s.pos+dl/2)
ra.axis = r
r_label.pos = ra.pos + ra.axis/2
dla.pos = s.pos+vector(0,0.011,0)
dla.axis = dl
dl_label.pos = dla.pos
a.axis = a.axis +Bscale*kmag*I*cross(dl, norm(r))/mag(r)**2
if count < 20:
d.waitfor('click')
elif count < 2*N:
rateval = 2
elif count < 8*N:
rateval = 5
elif count < 40*N:
rateval = 50
else:
rateval = 100
count = count+1
ra.visible = False
dla.visible = False
r_label.visible = False
dl_label.visible = False

Application with a Compass

If you run a current through a wire and place a compass near it, the needle of the compass deflects due to the magnetic field from this wire. With no current in the wire, the compass will face North. When approximately .314A is run through a wire, the compass deflects by approximately 20 degrees. In fact, the amount of deflection that there is from the wire can actually help you calculate the approximate magnetic field of the wire. This is because there is a particular relationship between the needle of the compass, the magnetic field of the wire, and the magnetic field of the Earth itself that looks like this:

[math]\displaystyle{ |B_w| = |B_E| \text{tan}\theta }[/math]

The Earth itself has a magnetic field anywhere on the Earth (based on location it varies slightly, but it is easier to assume it is constant) of approximately [math]\displaystyle{ 2e^{-5} \ \text{T} }[/math] which is why the compass points notes. In the formula above, theta is the amount of degrees that, when placed directly above or underneath, the compass needle deflects from North. This is a very useful formula to have in lab or in the real world if it is unknown how much current is running through a wire.


Examples

Easy

The magnitude of the magnetic field [math]\displaystyle{ 50 \ \text{cm} }[/math] from a long, thin, straight wire is[math]\displaystyle{ 8.0 \ \text{μT} }[/math].

a) What is the approximate current through the long wire?
Using the approximation formula for a long, thin straight wire,
[math]\displaystyle{ B = \frac{\mu_{0}}{4\pi}\frac{2I}{r} }[/math]
we see the current needed to supply the stated magnetic field is:
[math]\displaystyle{ I = \frac{4\pi r B}{2 \mu_{0}} = \frac{4\pi \times 0.5 \times 8.0 \times 10^{-6}}{2 \times 4\pi \times 10^{-7}} = 20 \ \text{A} }[/math]
b) An ordinary compass that points north when not in the vicinity of a magnetic field is pointing at [math]\displaystyle{ \theta_{1} = 325^{&deg;} }[/math]. A wire with a current is then placed directly above the compass and the needle now points at [math]\displaystyle{ \theta_{2} = 240^{&deg;} }[/math]. What is the approximate magnitude of the magnetic field of this wire?
Using our useful lab formula:
[math]\displaystyle{ |B_{wire}| = |B_E| \text{tan}(\theta) }[/math]
[math]\displaystyle{ \theta }[/math] will equal the difference between the initial angle and the final angle:
[math]\displaystyle{ \theta = \theta_{2} - \theta_{1} = 240 - 325 = -85&deg; }[/math]
Therefore:
[math]\displaystyle{ |B_w| = 2e^{-5} \times \text{tan}(-85&deg;) }[/math]
[math]\displaystyle{ |B_w| = 2.29 \times 10^{-4} \ \text{T} }[/math]

Medium

The current through a thin, straight wire that is [math]\displaystyle{ 2 \ \text{m} }[/math] long is [math]\displaystyle{ 74 \ \text{A} }[/math].

a) What is the magnitude of the magnetic field at a location [math]\displaystyle{ 0.35 \ \text{m} }[/math] away and perpendicular to the center of the wire?
Using the full formula:
[math]\displaystyle{ B = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} }[/math]
[math]\displaystyle{ B = \frac{\mu_0}{4\pi} \frac{2 \times 74}{0.35\sqrt{0.35^2+(2/2)^2}} }[/math]
[math]\displaystyle{ B = 39.912 \ \mu \text{T} }[/math]

Difficult

There are two wires, separated by a distance of [math]\displaystyle{ 80 }[/math] meters on the x-axis. The left wire has a current running through it of [math]\displaystyle{ 5 \ \text{A} }[/math], while the right wire has a current running through it of [math]\displaystyle{ 12 \ \text{A} }[/math]. The length of the left wire is [math]\displaystyle{ 2 }[/math] meters, while the length of the right wire is [math]\displaystyle{ 3 }[/math] meters.

a) Find the total magnetic field at a point on the x-axis directly in between the two wires.
Using the full formula, the magnetic field due to the left wire is:
[math]\displaystyle{ B_L = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} }[/math]
[math]\displaystyle{ B_L = \frac{\mu_0}{4\pi} \frac{2 \times 5}{40\sqrt{40^2+(2/2)^2}} }[/math]
[math]\displaystyle{ B_L = 6.25 \times 10^{-10} \ \text{T} }[/math]
The magnetic field due to the right wire then is:
[math]\displaystyle{ B_R = \frac{\mu_0}{4\pi} \frac{LI}{z\sqrt{z^2+(L/2)^2}} }[/math]
[math]\displaystyle{ B_R = \frac{\mu_0}{4\pi} \frac{3 \times 12}{-40\sqrt{(-40)^2+(3/2)^2}} }[/math]
[math]\displaystyle{ B_R = -2.25 \times 10^{-9} \ \text{T} }[/math]
The total magnetic field will be the sum of the two magnetic fields:
[math]\displaystyle{ B_T = B_L + B_R }[/math]
[math]\displaystyle{ B_T = 6.25 \times 10^{-10} - 2.25 \times 10^{-9} }[/math]
[math]\displaystyle{ B_T = -1.62 \times 10^{-9} \ \text{T} }[/math]

Connectedness

I am very interested in clean energy storage and production, which typically involves long wires at some point between where the energy is generated and where the electricity is used. It is important to understand all the forces involved with an electrical current, so that if something goes wrong, you can determine where the problem is and why it might be occurring so that you can fix it.

I am an Electrical Engineering major, so all of the material within this class is vastly important, not only for the following courses required for an EE major, but also for the field once we graduate and find a job. However, this concept specifically interests me because for a while I had a very difficult time finding the direction of the magnetic field in situations such as these, so this is my way of giving back in an effort to make sure future students don't run into the same problem.

I am an Industrial Engineering major and think that it is really interesting to see the theory behind how compasses are affected by currents within a wire and their associated magnetism. A compass is such an everyday item but I had never looked into why it works the way it does, and this specific topic gave me a lot of insight into that. Additionally, it is really intriguing to learn about the second form of the right hand rule and its applications.

See also

Further Reading

External Links

References

  • Matter and Interactions Vol. II
  • OpenStax University Physics
  • Skulls in the Stars