Calculating Magnetic field strength of a magnet

Click For Summary
SUMMARY

This discussion focuses on calculating the magnetic field strength (B) of a cylindrical magnet to determine its magnetic flux (Φ) using the equation Φ=∮BdAcosθ. The Biot-Savart law is suggested as a potential method for this calculation, although simulations using tools like COMSOL are commonly employed for complex geometries. The conversation also touches on the use of scalar and vector potentials in magnetostatics, particularly for hard ferromagnets, and the application of Green's functions in solving related equations.

PREREQUISITES
  • Understanding of magnetic flux and its calculation using Φ=∮BdAcosθ
  • Familiarity with the Biot-Savart law for magnetic field calculations
  • Knowledge of magnetostatics and the macroscopic Maxwell equations
  • Experience with Green's functions and their application in solving differential equations
NEXT STEPS
  • Study the Biot-Savart law and its applications in calculating magnetic fields
  • Learn about the use of COMSOL for simulating magnetic fields and flux
  • Explore scalar and vector potentials in magnetostatics
  • Investigate the properties and applications of Green's functions in physics
USEFUL FOR

Physicists, electrical engineers, and anyone involved in the design or analysis of magnetic systems, particularly those working with permanent magnets and their applications in various technologies.

  • #61
Charles Link said:
The ## B_z(\rho, z) ## field outside the magnet (## \rho>a ##) should be ok. If I'm not mistaken, (I will need to double-check this), for ## \rho<a ## with ## -L/2<z<+L/2 ##, all that may be necessary is to add a term ## +\mu_o M ## to ## B_z(\rho, z) ##.
Meanwhile, to answer post 59, the integrals are being done numerically.
Is the OP doing them?
 
Physics news on Phys.org
  • #63
bob012345 said:
Is the OP doing them?
See posts 45 and 46 and 49. That's the direction that I'm hoping it goes. It appears even numerical integration may be new to the OP.
 
  • #64
Charles Link said:
See posts 45 and 46 and 49. That's the direction that I'm hoping it goes. It appears even numerical integration may be new to the OP.
I think it would be instructive to use your simplified model first so the OP can get the mechanics of the problem down by direct integration. Once the essential features of the physics are captured, the numerical integration can be attempted but it is up to the OP.
 
  • Like
Likes   Reactions: Charles Link
  • #65
bob012345 said:
I think it would be instructive to use your simplified model first so the OP can get the mechanics of the problem down by direct integration. Once the essential features of the physics are captured, the numerical integration can be attempted but it is up to the OP.
Looking it over some more, I think my result of post 60 is correct, and that makes things easier than I originally anticipated. The physics including the pole model could be explained in more detail, but the numerical integrals should be very manageable, and I look forward to seeing how the OP @Einstein44 does with them. :) Posts 25, 45, and 60 contain most of what the OP needs. (Note: I've added some detail to posts 45 and 60 to make them easier to follow).

Note in post 25 that the ## R ## in the numerators is actually from being part of ## dA=R \, dR \, d \Phi ##, but that doesn't change the computation that you perform.

Item of interest is we recently did something similar on Physics Forums with this thread:
See https://www.physicsforums.com/threa...agnetic-induction.1003690/page-5#post-6502079
@alan123hk You might find our latest exercise here of interest, where we are computing the waveform as the magnet is moved through the coil.
 
Last edited:
  • Like
Likes   Reactions: Einstein44 and bob012345
  • #66
Charles Link said:
and a follow-on: It might be asking a lot for you to follow some of the advanced physics and complicated integrals above, when there is a shortcut that should get you reasonably accurate results:
(Note: I see I did make one error above: ## B_z(\rho) ## should be ## B_z(\rho, z) ##).
Here we are going to have an approximation for ## B_z ## that is independent of ## \rho ##, and we will call it ## B_z(z) ##:
## B_z(z)=\mu_o M (\frac{ a^2}{4})(\frac{1}{(z-L/2)^2}-\frac{1}{(z+L/2)^2}) ##
and flux ## \phi=B_z(z) \pi b^2 ##, where ## b ## is the radius of the coil. (If you have ## N ## loops in the coil, you need to multiply by ## N ##).
Here ## \mu_o M=1.28 ## T.
The above formulas involve approximations, Edit: and I see I goofed. They don't work as good as I thought they might. They only work well if ## z-L/2>> a ## and it helps to have ## z-L/2>> b ## as well.
For the part where you say that the flux would have to be multiplied by N loops, don't you simply have to multiply this using Faradays Law for N loops at then end? Or are you saying you also have to multiply the flux before hand
 
  • #67
Einstein44 said:
For the part where you say that the flux would have to be multiplied by N loops, don't you simply have to multiply this using Faradays Law for N loops at then end? Or are you saying you also have to multiply the flux before hand
Faraday’s experiments showed that the EMF induced by a change in magnetic flux depends on only a few factors. First, EMF is directly proportional to the change in flux Δ. Second, EMF is greatest when the change in time Δt is smallest—that is, EMF is inversely proportional to Δt. Finally, if a coil has N turns, an EMF will be produced that is N times greater than for a single coil, so that EMF is directly proportional to N. The equation for the EMF induced by a change in magnetic flux is;

$$EMF=−N\frac{ΔΦ}{Δt}$$ or in the limit;

$$EMF =−N\frac{dΦ}{dt}$$

https://courses.lumenlearning.com/b...ter/magnetic-flux-induction-and-faradays-law/
 
Last edited:
  • Like
Likes   Reactions: Charles Link and Einstein44
  • #68
bob012345 said:
Faraday’s experiments showed that the EMF induced by a change in magnetic flux depends on only a few factors. First, EMF is directly proportional to the change in flux Δ. Second, EMF is greatest when the change in time Δt is smallest—that is, EMF is inversely proportional to Δt. Finally, if a coil has N turns, an EMF will be produced that is N times greater than for a single coil, so that EMF is directly proportional to N. The equation for the EMF induced by a change in magnetic flux is;

$$EMF=−N\frac{ΔΦ}{Δt}$$ or in the limit;

$$EMF =−N\frac{dΦ}{dt}$$

https://courses.lumenlearning.com/b...ter/magnetic-flux-induction-and-faradays-law/
Exactly what I meant, so since the N turns are already mentioned in Faradays Law for N loops, there is no need to multiply the flux by the number of loops am I correct? Just making sure because that's what @Charles Link mentioned.
 
  • Like
Likes   Reactions: Charles Link
  • #69
bob012345 said:
I found this free Python package that computes magnetic fields for various shapes;

https://www.sciencedirect.com/science/article/pii/S2352711020300170?via=ihub
I tried downloading this, had a few issues so I tried something different (I don't know its validity)...
Just used this website that calculated the B field at a given position for a cylindrical magnet (N42) and this is what I got.
I selected a position in x from the center of the coil where the magnet is positioned to the coil, since this is where the magnetic field is going to interact with the coil.
(to at least have a value temporarily although I would have liked to work this out)
Is this the same thing as what you said I should do using the python code ? Or is there any important bits missing

Edit: I think the field lines are wrong...
 

Attachments

  • Screenshot 2021-08-12 at 07.11.40.png
    Screenshot 2021-08-12 at 07.11.40.png
    14.7 KB · Views: 144
  • #70
Charles Link said:
and a follow-on: It might be asking a lot for you to follow some of the advanced physics and complicated integrals above, when there is a shortcut that should get you reasonably accurate results:
(Note: I see I did make one error above: ## B_z(\rho) ## should be ## B_z(\rho, z) ##).
Here we are going to have an approximation for ## B_z ## that is independent of ## \rho ##, and we will call it ## B_z(z) ##:
## B_z(z)=\mu_o M (\frac{ a^2}{4})(\frac{1}{(z-L/2)^2}-\frac{1}{(z+L/2)^2}) ##
and flux ## \phi=B_z(z) \pi b^2 ##, where ## b ## is the radius of the coil. (If you have ## N ## loops in the coil, you need to multiply by ## N ##).
Here ## \mu_o M=1.28 ## T.
The above formulas involve approximations, Edit: and I see I goofed. They don't work as good as I thought they might. They only work well if ## z-L/2>> a ## and it helps to have ## z-L/2>> b ## as well.
Where does that first expression even come from?
And why are you representing the flux in the form of ## \phi=B_z(z) \pi b^2 ##? I thought in this case it would rather be ## \phi =\oint BdAcos\theta ## --> ## \phi =\oint B_{z}(z)d\pi r^{2} ##

You said they don't work as well as you thought. So I assume I should not look at these, but I was still wondering.
 
  • #71
Charles Link said:
Looking it over some more, I think my result of post 60 is correct, and that makes things easier than I originally anticipated. The physics including the pole model could be explained in more detail, but the numerical integrals should be very manageable, and I look forward to seeing how the OP @Einstein44 does with them. :) Posts 25, 45, and 60 contain most of what the OP needs. (Note: I've added some detail to posts 45 and 60 to make them easier to follow).

Note in post 25 that the ## R ## in the numerators is actually from being part of ## dA=R \, dR \, d \Phi ##, but that doesn't change the computation that you perform.

Item of interest is we recently did something similar on Physics Forums with this thread:
See https://www.physicsforums.com/threa...agnetic-induction.1003690/page-5#post-6502079
@alan123hk You might find our latest exercise here of interest, where we are computing the waveform as the magnet is moved through the coil.
I will work this out now.
 
  • #72
Charles Link said:
The ## B_z(\rho, z) ## field outside the magnet (## \rho>a ##) should be ok for all z. If I'm not mistaken, (I will need to double-check this [Edit: I'm pretty sure I have it right]), for ## \rho<a ## with ## -L/2<z<+L/2 ##, all that may be necessary is to add a term ## +\mu_o M ## to ## B_z(\rho, z) ##. For ## z ## outside this interval, everything is ok as is.

This means the program needs to check each computation: If ## -L/2<z<+L/2 ##, and ## \rho<a ##, then an extra ## +\mu_o M ## needs to be added to the formula for ## B_z(\rho,z) ## of post 25. (The reason for this is the observation point is inside the magnet, and ## B=\mu_o H+\mu_o M ##, instead of just ## B=\mu_o H ##). This is really a very simple correction, and it should be easy to implement.

Meanwhile, to answer post 59, the integrals are being done numerically.
what does "a" represent as you say p>a?
and looking at the cylindrical coordinate system, ## \rho ## is going to be the radius of the cylinder, however you have already used a different letter b for this, so I am getting confused with the symbols. It would be helpful to have a clear description of what you have used for what in order to have some clarity.
 

Attachments

  • 480px-Coord_system_CY_1.svg.png
    480px-Coord_system_CY_1.svg.png
    11.9 KB · Views: 130
Last edited:
  • #73
## a ## is the radius of the cylindrical magnet, and ## b ## is the radius of the coil. ## \rho ## is an arbitrary radius in the cylindrical coordinate system.

If you look at the integrals of the "link" of post 25, they introduce ## a ## as the limit of the ## R \, dR \, d \Phi ## integration over the endface of the magnet. Meanwhile, I introduced the letter ## b ## for the radius of the coil in post 45.
 
Last edited:
  • Like
Likes   Reactions: Einstein44
  • #74
Einstein44 said:
Where does that first expression even come from?
And why are you representing the flux in the form of ## \phi=B_z(z) \pi b^2 ##? I thought in this case it would rather be ## \phi =\oint BdAcos\theta ## --> ## \phi =\oint B_{z}(z)d\pi r^{2} ##

You said they don't work as well as you thought. So I assume I should not look at these, but I was still wondering.
I believe because in this case, the field is a function of ##z## only while the loop is 90° to the ##z## axis so ##cos\theta = 1##. Therefore the flux it any ##z## on the axis is simply ## \phi = B_z(z) \oint dA = B_z(z)\pi b^2 ##
 
  • Like
Likes   Reactions: Delta2, Einstein44 and Charles Link
  • #75
Einstein44 said:
I tried downloading this, had a few issues so I tried something different (I don't know its validity)...
Just used this website that calculated the B field at a given position for a cylindrical magnet (N42) and this is what I got.
I selected a position in x from the center of the coil where the magnet is positioned to the coil, since this is where the magnetic field is going to interact with the coil.
(to at least have a value temporarily although I would have liked to work this out)
Is this the same thing as what you said I should do using the python code ? Or is there any important bits missing

Edit: I think the field lines are wrong...
Why do you think the field lines are wrong?

The Python program was just one way of calculating the field. You still need to integrate it. I thought it could be used as a subroutine. What I am getting at is if you have a math program on your computer that can evaluate those integrals from post #25?
 
Last edited:
  • #76
Einstein44 said:
Where does that first expression even come from?
And why are you representing the flux in the form of ## \phi=B_z(z) \pi b^2 ##? I thought in this case it would rather be ## \phi =\oint BdAcos\theta ## --> ## \phi =\oint B_{z}(z)d\pi r^{2} ##

You said they don't work as well as you thought. So I assume I should not look at these, but I was still wondering.
In the integrals of post 25, if ## a ## is small, the denominators can be simplified and come out of the integral after partial cancellation of the numerator. I think it is important here to treat the case where the magnet passes near and into the loop, and for that case the approximation doesn't work, so post 54 can be ignored.
 
  • Like
Likes   Reactions: Einstein44
  • #77
I want to take a couple minutes to describe the numerical integration process mentioned in post 45. I'm hoping you @Einstein44 have enough calculus to know that an integral is the area under the curve of the graph of the function. In doing the integration numerically, you don't get the exact answer, but you can get very close to it, if you use enough rectangles in approximating the area under the curve. Let me see if I can find you a "link" on the topic... See https://en.wikipedia.org/wiki/Numerical_integration
 
  • Like
Likes   Reactions: Einstein44
  • #78
bob012345 said:
I believe because in this case, the field is a function of ##z## only while the loop is 90° to the ##z## axis so ##cos\theta = 1##. Therefore the flux it any ##z## on the axis is simply ## \phi = B_z(z) \oint dA = B_z(z)\pi b^2 ##
why does the integral go away? The part with cos I got.
 
  • #79
Charles Link said:
I want to take a couple minutes to describe the numerical integration process mentioned in post 45. I'm hoping you @Einstein44 have enough calculus to know that an integral is the area under the curve of the graph of the function. In doing the integration numerically, you don't get the exact answer, but you can get very close to it, if you use enough rectangles in approximating the area under the curve. Let me see if I can find you a "link" on the topic... See https://en.wikipedia.org/wiki/Numerical_integration
I know enough calculus to solve all these integrals, which is not really my concern. It is more with all these components / length that you have added to these equations which make it hard to follow along. (Now I know what you mean by the dimensions.) Although here is what I don't get for instance:
what doe sit mean when you have ## B_{z}(\rho )\rho d\rho ##
Like what is the calculation you're supposed to do when you calculate B for a certain component like this, substitute its value into the bracket? (This is just me being confused as to what to do with it, once I figure that out I should be able to do to the calculations

Now I have to calculate this long integral for B?
 
Last edited:
  • #80
Einstein44 said:
why does the integral go away? The part with cos I got.
The integral doesn't go away, but when the plane of the loop is 90° to the axis, the integration is just the area of the loop which is ##\pi b^2##.
 
  • Like
Likes   Reactions: Einstein44
  • #81
bob012345 said:
The integral doesn't go away, but when the plane of the loop is 90° to the axis, the integration is just the area of the loop which is ##\pi b^2##.
Yes, ok I get it.
 
  • Like
Likes   Reactions: bob012345
  • #82
Einstein44 said:
Yes, ok I get it.
And only because in that example, ##B_z## was constant over the loop.
 
  • Like
Likes   Reactions: Delta2 and Einstein44
  • #83
bob012345 said:
And only because in that example, ##B_z## was constant over the loop.
By the way, so @Charles Link said that R was the radial distance in the plane of the enface. The distance to where exactly? How do I measure it?
 
  • #84
Einstein44 said:
By the way, so @Charles Link said that R was the radial distance in the plane of the enface. The distance to where exactly? How do I measure it?
desc4692526787817354723.png


desc6652179093552921152.png
.

These equations are for a magnet of length ##L## and radius ##a##. The coordinates in polar or cylindrical coordinates are ##z##, ##\rho## and ##\phi##. But at each point in space ##z, \rho## and ##\phi##, there is an integration over the face of the magnet which use variables ##R## and ##\phi##. ##R## is not measured, it is integrated over. The issue of complexity comes in because these integrals over ##R## and ##\phi## are not easily solved in closed form otherwise that integration would be done already and there would be no integral signs in the formula's for ##B_z## and ##B_{\rho}##.

Thus there are two separate integrations, one to get the fields at a point ##(z, \rho, \phi)## and another to integrate the field at every point in the plane of the loop.
 
Last edited:
  • Like
Likes   Reactions: Einstein44, Delta2, Charles Link and 1 other person
  • #85
I guess this is just derivable from the formula, I've given above for the magnetostatic scalar potential. You just have to take the gradient wrt. ##\vec{r}## to get these integrals for the field components. It's just written in cylinder coordinates, which is natural treating a homogeneously magnetized cylinder.
 
  • Like
Likes   Reactions: Delta2, Einstein44 and Charles Link
  • #86
vanhees71 said:
I guess this is just derivable from the formula, I've given above for the magnetostatic scalar potential. You just have to take the gradient wrt. ##\vec{r}## to get these integrals for the field components. It's just written in cylinder coordinates, which is natural treating a homogeneously magnetized cylinder.
That's how the "link" of post 25 does it also. I prefer to simply compute ## H ## from ## \sigma_m=M \cdot \hat{n} ##, and the inverse square law. Then ## B ## is obtained using ## B=\mu_o H+ M ##, which will work both outside and inside the magnet. See also post 60 for the extra detail.
 
  • #87
That's of course also equivalent to what I wrote. The reason is that for homogeneously magnetized materials
$$\rho_m=-\vec{\nabla} \cdot \vec{M}$$
is in fact an effective magnetic "surface charge", because
$$\vec{M}=\vec{M} \chi_V(\vec{x}),$$
where
$$\chi_V(\vec{x})=\begin{cases} 1 & \text{for} \quad \vec{x} \in V \\
0 & \text{for} \quad \vec{x} \notin V. \end{cases}$$
It's clear that ##\rho_{m}## is ##\delta##-function like along the boundary ##\partial V##.
The direct calculation of ##\vec{\nabla} \cdot \vec{M}## is not that simple as in the case of the sphere, where simply ##\chi_V(\vec{x})=\Theta(a-r)##, which I've used above as a shortcut.

The calculation can however be done using the integral formula for the surface divergence. Take a point on the surface and take an infinitesimal cylinder ##Z## around the point with two of it's surfaces parallel to ##\partial V##. Then you define
$$-\sigma_m\mathrm{Div} \vec{M}=\lim_{Z \rightarrow \{\vec{x} \}} \frac{1}{S_Z} \int_Z \mathrm{d}^2 \vec{f} \cdot \vec{M}(\vec{x}) = -\vec{n} \cdot \vec{M}(\vec{x}).$$
Then you find indeed
$$\Phi_m(\vec{x})=\int_{\partial V} \mathrm{d}^2 \vec{f}' \frac{\vec{M}(\vec{x}')}{4 \pi |\vec{x}-\vec{x}'|}.$$
For a cylinder polarized parallel to its axis you only need to consider the bottom and the top surfaces, because the ##\mathrm{d}^2 \vec{f}## along the mantle is ##\perp \vec{M}##.
 
  • Like
Likes   Reactions: Einstein44 and Charles Link
  • #88
bob012345 said:
View attachment 287447

View attachment 287448.

These equations are for a magnet of length ##L## and radius ##a##. The coordinates in polar or cylindrical coordinates are ##z##, ##\rho## and ##\phi##. But at each point in space ##z, \rho## and ##\phi##, there is an integration over the face of the magnet which use variables ##R## and ##\phi##. ##R## is not measured, it is integrated over. The issue of complexity comes in because these integrals over ##R## and ##\phi## are not easily solved in closed form otherwise that integration would be done already and there would be no integral signs in the formula's for ##B_z## and ##B_{\rho}##.

Thus there are two separate integrations, one to get the fields at a point ##(z, \rho, \phi)## and another to integrate the field at every point in the plane of the loop.
This will take a little work to write a program to do these integrations. The 2-D integral can be done with a two dimensional array and nested "Do" loops. Suggest a third Do loop to get the result for different z's. It shouldn't be too difficult to program, but if it's the first time for @Einstein44 , it might be a challenge. Perhaps wolfram has a routine to do this sort of thing?
 
  • Like
Likes   Reactions: vanhees71, Einstein44 and bob012345
  • #89
Einstein44 said:
So I am going to start from the beginning now:
My aim is to find the induced emf as a cylindrical N42 magnet falls through a coil of N loops.
To calculate this I use Faradays Law.
Now for that, I need to find the magnetic flux in the first place using the equation:
$$\phi =\oint BdAcos\theta$$
This is why I am now trying to find B for the magnet, in order to work out this problem.
I am attaching a picture below that might perhaps help with visualisation.
So yes, indeed involves a moving magnet.
So now that the issue of calculating the field is being addressed it is time to think about the setup of the problem as a whole. You might set it up something like this diagram where the center of the magnet is some distance, say ##nL## above the plane of the loop which is fixed. We have discussed getting the flux at anyone time above but how do you think you can calculate the change in flux as time becomes involved?
68161-13-12CQEI1.png
 
  • Like
Likes   Reactions: Charles Link and Einstein44
  • #90
bob012345 said:
So now that the issue of calculating the field is being addressed it is time to think about the setup of the problem as a whole. You might set it up something like this diagram where the center of the magnet is some distance, say ##nL## above the plane of the loop which is fixed. We have discussed getting the flux at anyone time above but how do you think you can calculate the change in flux as time becomes involved?View attachment 287455
Well that is the question. I am unsure of the correctness of this method, but I though it would be possible to approximate where the field lines first reach the coil, and then use this distance from + to - as it moves through the coil to take the time it takes to do so. Since then the component t is present in Faradays Law, I assumed this would solve the problem of the changing flux?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 41 ·
2
Replies
41
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
980
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K