# Magnetic field of a ferromagnetic cylinder

• cdummie

## Homework Statement

We have a very long ferromagnetic cylinder with square cross section, with side length a. Cylinder is homogeneosly magnetized over his volume so that the magnetization vector is parallel to the axis of cylinder. Cylinder is in vacuum. Find the current appeared in the cylinder because of the presence of the vector M. Find the vector H and B at the center of cylinder.

## The Attempt at a Solution

Since M=Jxn it means that current in the cylinder is equal to M by intensity with the direction shown in the picture But i don't know how to determine H and B in the center of the cylinder, i mean i could use generalized Amphere's law to find H and then easily find B but i don't know how, because i don't see what kind of symmetry would work here. Could anyone help me out here?

There are two methods to work this problem: The first is by magnetic surface currents. The magnetic surface current per unit length is given by ## K_m=M \times \hat{n} / \mu_o ## (M.K.S. units). In this method you compute the B using Biot-Savart from these surface currents due to the magnetization. That method can be mathematically difficult. The second method, the magnetostatic pole method, works much easier for this problem. The pole method ignores surface currents, but instead has magnetic surface charge per unit area ## \sigma=M* \hat{n} ## where this is a vector dot product. The magnetic surface charges which are sources of H are simply on the endfaces ( "+" magnetic pole on one face and a "-" magnetic pole on the other) and for a long cylinder are negligible for most of the length inside of the cylinder. Meanwhile the magnetic field ## B=\mu_o H+M ## (Note this is a pole method equation-the surface current method does not have any magnetic poles or H due to the poles) and the ## H ## from the endfaces is approximately zero. The result is ## B=M ## inside the cylinder. A Biot-Savart calculation using the surface currents would get you the same answer, but the integrals to get the answer are very clumsy mathematically. There is one method I overlooked with the Biot-Savart type solution: Use Ampere's Law on the surface current ## K_m ##. That should get you the same answer as the pole method.

Last edited:
• cdummie
Note that the surface current per unit formula reads ## K_m=M \times \hat{n}/ \mu_o ## In other units (e.g. c.g.s.) it has different constants, but it still has the form ## K_m=M \times \hat{n} ##. Ampere's law in integral form provides for a simple solution. You need to assume, just like with a long solenoid, that B=0 outside of the magnetized square cylinder. Also note, because of the formula ## K_m=M \times \hat{n} / \mu_o ## that the magnetic surface currents are geometrically analogous to those of the real currents that circulate around a solenoid (i.e. they circulate around the outer surface).

Last edited:
This problem is really quite an interesting one. Another question it could have asked is to compute the magnetic field ## B ## somewhere outside of the iron cylinder. In this case the magnetic field ## B ## can again be computed in either of two ways: 1) by magnetic surface currents (as shown in posts #2 and #3 above) and using Biot-Savart's law (Ampere's law would not be useful this time). These integrals are somewhat lengthy, but with today's computers, a numerical evaluation of the integrals can be readily performed. 2) ## B ## outside the iron can be computed from the pole method, with a magnetic surface charge density ## \sigma ## on each endface given by ## \sigma=M*\hat{n} ## (vector dot product) which will make a "+" pole on one endface and a "-" pole on the other. The ## H ## is computed using the inverse square law, just like the electric field ## E ## in electrostatics with ## \epsilon_o ## replaced by ## \mu_o ##. To compute the magnetic field ## B ##, ## B=\mu_o H +M ## , and ## M=0 ## outside of the cylinder so that ## B=\mu_o H ##. Both of these methods gets the exact same answer for the magnetic field ## B ##. (Note that because of the cross product and dot product formulas for magnetic surface current and magnetic surface charge density, there are no surface currents on the endfaces for this problem and there are also no magnetic surface charges on the side faces where the magnetic surface currents circulate.)

Last edited:
The OP hasn't responded as of yet, but I welcome feedback from anyone who may read the above solutions. The problem is very much a textbook type magnetostatics problem, but it is also one that seems to be pushed to the side in much of the present day physics curriculum. Griffith's presents magnetic surface currents in his E&M textbook, but he does it rather quickly and it is easily overlooked. Meanwhile, much of the previous generation were taught the magnetostatic pole method, but the underlying physics of magnetic fields in materials is only explained through the surface current method. Although the pole method gets the correct (and exact same) answer for the magnetic field B, the pole method can be misleading if one tries to use it to explain the physics of magnetic fields in materials.

• Lussimio16
One other item of interest in this problem is the magnetic field ## B ## inside the cylinder of finite length where the endfaces have an effect. Detailed calculations with the surface currents (and Biot-Savart's law) show that the pole method equation of ## B=\mu_o H+M ## gives the correct result for ## B ##. In this equation, ## H ## is the contribution from the magnetic surface charge on the endfaces using the inverse square law (a subtractive correction to ## M ##) , and ## \mu_o H ## is the precise correction to the magnetic field ## B=M+(\mu_o H) ## inside the material for the cylinder of finite length.

Last edited:
• Lussimio16
There are two methods to work this problem: The first is by magnetic surface currents. The magnetic surface current per unit length is given by ## K_m=M \times \hat{n} / \mu_o ## (M.K.S. units). In this method you compute the B using Biot-Savart from these surface currents due to the magnetization. That method can be mathematically difficult. The second method, the magnetostatic pole method, works much easier for this problem. The pole method ignores surface currents, but instead has magnetic surface charge per unit area ## \sigma=M* \hat{n} ## where this is a vector dot product. The magnetic surface charges which are sources of H are simply on the endfaces ( "+" magnetic pole on one face and a "-" magnetic pole on the other) and for a long cylinder are negligible for most of the length inside of the cylinder. Meanwhile the magnetic field ## B=\mu_o H+M ## (Note this is a pole method equation-the surface current method does not have any magnetic poles or H due to the poles) and the ## H ## from the endfaces is approximately zero. The result is ## B=M ## inside the cylinder. A Biot-Savart calculation using the surface currents would get you the same answer, but the integrals to get the answer are very clumsy mathematically. There is one method I overlooked with the Biot-Savart type solution: Use Ampere's Law on the surface current ## K_m ##. That should get you the same answer as the pole method.

Thank you very much for your answer, i am really sorry it took me so long to respond, but i appreciate your effort to help me on this one, since it was somehow confusing for me.

Anyway, only idea i thought of was the first idea you mentioned, but, as you stated, it is mathematically difficult and it would take too much time to solve it that way. Anyway, as you might noticed, i incorrectly stated in my first post that M=Jxn , but actually it should be J=Mxn which is, i think, exactly the same equation as yours σ=M∗^n just with different notation. So, i basically understand it up to that part, but then, i am not quite sure why H is zero at the endfaces (if by endfaces you mean the walls of the cylinder)? Again, i am really sorry it took me so long to respond to your answers.

Thank you very much for your answer, i am really sorry it took me so long to respond, but i appreciate your effort to help me on this one, since it was somehow confusing for me.

Anyway, only idea i thought of was the first idea you mentioned, but, as you stated, it is mathematically difficult and it would take too much time to solve it that way. Anyway, as you might noticed, i incorrectly stated in my first post that M=Jxn , but actually it should be J=Mxn which is, i think, exactly the same equation as yours σ=M∗^n just with different notation. So, i basically understand it up to that part, but then, i am not quite sure why H is zero at the endfaces (if by endfaces you mean the walls of the cylinder)? Again, i am really sorry it took me so long to respond to your answers.
## \sigma ## is magnetic surface charge (magnetic pole) density. This method (the magnetic pole method), is a completely separate approach to the problem. The ## \sigma=M *\hat{n} ## is a dot product, so that the poles appears on the endfaces. The magnetic poles do not exist at all in calculations of the magnetic surface current method, where ## B ## is computed from Biot-Savart using the magnetic surface current per unit length of ## K=M \times \hat{n} /\mu_o ##. Here we have a vector cross product and the magnet surface currents (these are actually bound electron currents-these are not moving magnetic charges) circulate around the sides of the cylinder. These magnetic surface currents are used to compute the magnetic field ## B ## for this problem, both inside and outside the cylinder. I know even your teacher might disagree with this statement, but in the magnetic surface current formalism, there is no ## H ##. It never enters into the computation. Both methods get the exact same answer for the magnetic field ## B ##, but the correct interpretation of the underlying physics is given by the magnetic surface current method. The magnetic pole method is a useful mathematical shortcut that gets the right answer for ## B ##, but any physics explanation that it might supply can be very misleading. Also be careful not to confuse the terms magnetic surface "charge" and magnetic surface "current". They are two completely separate entities. (Just as the magnetic surface charges (magnetic poles) do not exist in the magnetic surface current method, likewise the magnetic surface currents do not exist in the magnetic pole method.)

Last edited:
• cdummie
## \sigma ## is magnetic surface charge (magnetic pole) density. This method (the magnetic pole method), is a completely separate approach to the problem. The ## \sigma=M *\hat{n} ## is a dot product, so that the poles appears on the endfaces. The magnetic poles do not exist at all in calculations of the magnetic surface current method, where ## B ## is computed from Biot-Savart using the magnetic surface current per unit length of ## K=M \times \hat{n} ##. Here we have a vector cross product and the magnet surface currents (these are actually bound electron currents-these are not moving magnetic charges) circulate around the sides of the cylinder. These magnetic surface currents are used to compute the magnetic field ## B ## for this problem, both inside and outside the cylinder. I know even your teacher might disagree with this statement, but in the magnetic surface current formalism, there is no ## H ##. It never enters into the computation. Both methods get the exact same answer for the magnetic field ## B ##, but the correct interpretation of the underlying physics is given by the magnetic surface current method. The magnetic pole method is a useful mathematical shortcut that gets the right answer for ## B ##, but any physics explanation that it might supply can be very misleading.

Thanks again, i see now, i thought that it was the same formula as mine, but there's a dot product in yours, now that method isn't familiar to me, so it would be better if i use another method, like Ampere's law, i will try to solve it that way and then i will post my work here.

• Thanks again, i see now, i thought that it was the same formula as mine, but there's a dot product in yours, now that method isn't familiar to me, so it would be better if i use another method, like Ampere's law, i will try to solve it that way and then i will post my work here.
Incidentally, what you have here is a permanent magnet. The "pole" method treats it as a north and south pole, but you're really better off working the magnetic surface current method. And yes, Ampere's law will work with the magnetic surface currents. And one additional comment on the above: the letter ## H ## can also be used in both methods to indicate the magnetic field (i.e. it is proportional to the magnetic field ## B ##, ## B=\mu_o H ## ) from the currents in a solenoid (or any other electrical currents in conductors). ( e.g. in an ## M ## vs. ## H ## hysteresis curve-not part of this problem). In the pole method, ## H ## can come from two places=magnetic poles and free currents in a solenoid. In both methods, the ## H ## from the solenoid currents is computed by first computing ## B ## from Biot-Savart's law (or Ampere's law) and ## H=B/\mu_o ##. In the surface current method, the solenoid ## B ## (divided by ## \mu_0 ## ) can also be called an ## H ## , but the ## H ## from the magnetic poles is non-existent. In addition, the equation ## B=\mu_o H + M ## is exclusively a pole method equation that is not used in the surface current method. (This is a lot of extra info, but it might prove useful if you encounter a similar problem that includes a current carrying solenoid around the sample.)

Last edited:
Incidentally, what you have here is a permanent magnet. The "pole" method treats it as a north and south pole, but you're really better off working the magnetic surface current method. And yes, Ampere's law will work with the magnetic surface currents. And one additional comment on the above: the letter ## H ## can also be used in both methods to indicate the magnetic field (i.e. it is proportional to the magnetic field ## B ##, ## B=\mu_o H ## ) from the currents in a solenoid (or any other electrical currents in conductors). ( e.g. in an ## M ## vs. ## H ## hysteresis curve-not part of this problem). In the pole method, ## H ## can come from two places=magnetic poles and free currents in a solenoid. In both methods, the ## H ## from the solenoid currents is computed by first computing ## B ## from Biot-Savart's law (or Ampere's law) and ## H=B/\mu_o ##. In the surface current method, the solenoid ## B ## (divided by ## \mu_0 ## ) can also be called an ## H ## , but the ## H ## from the magnetic poles is non-existent. In addition, the equation ## B=\mu_o H + M ## is exclusively a pole method equation that is not used in the surface current method. (This is a lot of extra info, but it might prove useful if you encounter a similar problem that includes a current carrying solenoid around the sample.)

Again, sorry it took me so long to respond.

I tried to find vector B using Ampere's law and this is it: That little contour i drew is the contour on which i will implement Ampere's law, anyway, the general for of Ampere's law is:

## \int \vec H \vec dl = I_{through C} ## C is contour

## H2L=JL## where L is the length of the longer side of contour, and H exists only there due to right hand rule which means that magnetic field vector there is ##H=\frac{J}{2}## which means that ##B=\frac{\mu_{0}J}{2}## and this is not the same solution as yours, so i probably made a mistake, but unfortunately, i am not sure where exactly.

I need to make a correction to my post # 8. A fine detail, but an important one. In the pole model (and magnetic surface currents are non-existent in this model), ## H ## is computed from the magnetic poles with the inverse square law, and an additional ## H_a ## is added from any currents in conductors given by ## H_a=B_a/\mu_o ## where ##B_a ## is the applied ## B_a ## and ## H_a ## is the applied ## H ## computed from Biot-Savart. The equation ## B=\mu_o H +M ## is found to hold in all cases, and it gets the same answer for ## B ## as the magnetic surface current model. (Note that ## M## is a physical entity that is the same in both models.) Even though the ## H ## from the magnetic poles is totally ignored in the magnetic surface current model, and the magnetic surface currents and currents in conductors are the only sources of the magnetic field ## B ## in this model, the equation ## B=\mu_o H +M ## will still be valid in computing ## H ##. In addition, hysteresis curves of ## M ## vs. ## H ## will still be valid, even though the magnetic poles are not used to determine the magnetic field ## B ##. In the magnetic surface current model, ## H ## can be defined as ## (B-M)/\mu_o ## and it is completely mathematically valid. (It can even be used to compute the ## H ## from the poles.) Outside the material, (in the absence of currents in conductors), ## B=\mu_o H ## where ## H ## is the ## H ## from the poles. Incidentally, inside the material, since ## B=\mu_o H +M ##, ## \mu_o H ## is not the magnetic field. The ## H ## from the poles along with currents in conductors can still be used with the magnetic surface current model with a hysteresis curve of ## M ## vs. ## H ##, by computing ## H=(B-M)/\mu_o ##.

Let's first compute ## B ## from ampere's law: Around a rectangle where one long side is inside the cylinder and the other long side is outside the cylinder, ## \int B*dl=\mu_o * I ## where ## I ## is the current through the rectangle and is given by ## I=K_m * L ##. (The surface current per unit length ## K_m=M/\mu_o ##). ## B ## is assumed to be zero outside the cylinder. The result for the integral around the rectangle is ## B*L=\mu_o*K_m*L ## where B is the B field inside the cylinder in the +z direction. ## K_m=M/\mu_o ## so that ## B=M ## and points in the +z direction. ## H ## can be computed (see post # 12) and is ## H=(B-M)/\mu_o =0 ##. Additional item: Your equation ## \int H*dl=\mu_o *I ## is valid but the current ## I ## in this equation is only that of currents in conductors and does not include magnetic surface currents. In the equation ## \int B*dl=\mu_o *I ## , the ## I ## in this equation includes both currents in conductors and magnetic surface currents. Thereby, if you use the ## \int H*dl=\mu_o *I ## equation to compute ## H ##, you will get ## H=0 ## just as computed from ## H=(B-M)/\mu_o ##.

Last edited:
• cdummie
Let's first compute ## B ## from ampere's law: Around a rectangle where one long side is inside the cylinder and the other long side is outside the cylinder, ## \int B*dl=\mu_o * I ## where ## I ## is the current through the rectangle and is given by ## I=K_m * L ##. (The surface current per unit length ## K_m=M/\mu_o ##). ## B ## is assumed to be zero outside the cylinder. The result for the integral around the rectangle is ## B*L=\mu_o*K_m*L ## where B is the B field inside the cylinder in the +z direction. ## K_m=M/\mu_o ## so that ## B=M ## and points in the +z direction. ## H ## can be computed (see post # 12) and is ## H=(B-M)/\mu_o =0 ##. Additional item: Your equation ## \int H*dl=\mu_o *I ## is valid but the current ## I ## in this equation is only that of currents in conductors and does not include magnetic surface currents. In the equation ## \int B*dl=\mu_o *I ## , the ## I ## in this equation includes both currents in conductors and magnetic surface currents. Thereby, if you use the ## \int H*dl=\mu_o *I ## equation to compute ## H ##, you will get ## H=0 ## just as computed from ## H=(B-M)/\mu_o ##.

Thank you a lot, I've been struggling with this for a while (now it seems relatively simple, but it wasn't at the beginning though), but i think that i understand this now, anyway, thanks again!

• One very minor correction in my post #13. The ## H ## equation correctly reads in M.K.S. units ## \int H*dl=I ## (without a ## \mu_o ##). Once again the current ## I ## in the ## H ## equation is the current in conductors (such as a solenoid or a wire) and does not include magnetic surface currents.

One very minor correction in my post #13. The ## H ## equation correctly reads in M.K.S. units ## \int H*dl=I ## (without a ## \mu_o ##). Once again the current ## I ## in the ## H ## equation is the current in conductors (such as a solenoid or a wire) and does not include magnetic surface currents.
But there are magnetic surface currents here, right? What about them?

But there are magnetic surface currents here, right? What about them?
There is an equation in magnetic theory that says ## B=\mu_o H+M ## . The mathematics is somewhat advanced here, but you can take the curl of both sides of this equation and the result is ## curl B=(\mu_o)( curl H) +curl M ##. Now ## curl B=\mu_o J_{total} ## (Ampere's law in differential form) where ## J_{total}=J_{free}+J_{magnetic} ##. Also, ## curl M=\mu_o *J_{magnetic}## where the ## J ## represents current densities. (This curl M equation along with Stokes theorem is where the equation for the magnetic surface current per unit length ## K_m=(M \times \hat{n})/\mu_o ## originates) These equations are integrated over a surface area and Stokes theorem is applied. The result is ## \int B*dl=\mu_o *I_{total} ## (Ampere's law for ## B ## in integral form) where ## I_{total}=I_{free}+I_{magnetic} ##. (## I_{free} ## is the current in conductors). The other thing that comes out of this mathematics is the equation ## \int H*dl=I_{free} ##. (Ampere's law for ## H ## in integral form). Note: ## I_{free}=0 ## here. The magnetic surface currents can be used with the ## B ## equation (Ampere's law with ## B ##) to get the result that ## B=M ##. (The equation for ## B ## includes the magnetic surface currents.) When the ## H ## equation (basically Ampere's law with ## H ##) is used, since it only contains ## I _{free} ## which is equal to zero, the result is that ## H=0 ##. The magnetic surface currents are sources of ## B ##, but unlike the free currents, the magnetic surface currents are not sources of ## H ##. The mathematics here was somewhat advanced, but I think you should be able to work the two equations that emerged: ## \int B*dl=(\mu_o)(I_{free}+I_{magnetic} ) ## and ## \int H*dl=I_{free} ## where the integral around the loop is the current through the loop for these two equations.

Last edited:
And a follow-on to the above: There is a somewhat important concept that this homework problem illustrates. The magnetized ferromagnetic cylinder in the problem is a permanent magnet. The magnetic field ## B ## inside this magnet could be found quickly from the equation ## B=\mu_o H+M ## where ## H ## is the contribution from any poles (it's a long cylinder so that the ## H ## from any poles is negligible) along with the contribution to ## H ## from free currents (which is also zero for this problem). Thereby, the result from the ## B=\mu_o H +M ## equation is ## B=M ##. What this problem illustrates is that the magnetic field ## B=M ## inside a magnetic material and/or permanent magnet that has magnetization vector ## M ## actually originates from the magnetic field of the magnetic surface currents.

@Charles Link as you advised me I gave a look into this problem. I have a few questions though that I hope you can help me clarify. My doubts are in the expression you use (the constant ##\mu_0##). Shouldn't we use ? And ? However by doing that I get to ##B= \mu_0 M##. Is that wrong?

@Charles Link as you advised me I gave a look into this problem. I have a few questions though that I hope you can help me clarify. My doubts are in the expression you use (the constant ##\mu_0##). Shouldn't we use ? And ? However by doing that I get to ##B= \mu_0 M##. Is that wrong?
That is correct. There are actually two different M.K.S. definitions for magnetization ## \vec{M} ##. (They differ by a factor of ## \mu_o ##). If the equation , (and definition of ## \vec{M} ##), ## \vec{B}=\mu_o(\vec{H}+\vec{M}) ## is used, surface current per unit length ## \vec{K}_m=\vec{M} \times \hat {n} ##. ## \\ ## If the equation, (and definition of ## \vec{M} ## ), ## \vec{B}=\mu_o \vec{H} +\vec{M} ## is used, ## \vec{K}_m=\frac{\vec{M} \times \hat{n} }{\mu_o} ##. ## \\ ## The problem can be solved by Ampere's law, (if it is assumed ## B_z=0 ## outside of the cylinder), but the pole method, with no poles,(which are sources of ## \vec{H} ##), for a very long cylinder gives, (because ## \vec{B}=\mu_o (\vec{H}+\vec{M}) ## and ## \vec{H=}0 ##), that ##\vec{ B}=\mu_o \vec{M} ## immediately.

Last edited:
• Granger
That is correct. There are actually two different M.K.S. definitions for magnetization ## \vec{M} ##. (They differ by a factor of ## \mu_o ##). If the equation , (and definition of ## \vec{M} ##), ## \vec{B}=\mu_o(\vec{H}+\vec{M}) ## is used, surface current per unit length ## \vec{K}_m=\vec{M} \times \hat {n} ##. ## \\ ## If the equation, (and definition of ## \vec{M} ## ), ## \vec{B}=\mu_o \vec{H} +\vec{M} ## is used, ## \vec{K}_m=\frac{\vec{M} \times \hat{n} }{\mu_o} ##. ## \\ ## The problem in the "link" can be solved by Ampere's law, (if it is assumed ## B_z=0 ## outside of the cylinder), but the pole method, with no poles,(which are sources of ## \vec{H} ##), for a very long cylinder gives, (because ## \vec{B}=\mu_o (\vec{H}+\vec{M}) ## and ## \vec{H=}0 ##), that ##\vec{ B}=\mu_o \vec{M} ## immediately.

Ok, got it! This was a very interesting problem indeed, so thank you for your recommendation.

• 