Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Force between two fixed magnets

Please login with a confirmed email address before reporting spam

Hi,

I am having trouble understanding the force calculation between two permanent magnet in COMSOL. My attached model can find the force but this force is different from the analytical expression for the force which can be found here: (Force between two cylindrical magnets) en.wikipedia.org/wiki/Force_between_magnets#Force_between_two_bar_magnets. In COMSOL the force will change if I change the air sphere size? Any idea about the correct size of sphere with respect to size of magnets?


6 Replies Last Post 2015年1月3日 GMT-5 20:45
Nirmal Paudel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月2日 GMT-5 13:14
Hi,

The Force Calculation feature in COMSOL is based on the surface integration of the Maxwell Stress Tensor. This is very sensitive to the mesh size. So, you would probably need to further refine the mesh and calculate the force. Keep refining the mesh until you get almost constant force for successive mesh refinement. The size of the air domain should be such that the fields on the outer boundaries should be negligible. You could also try using the Infinite Element Domains or increase the air domain further.
Hope this helps.

Best Regards,
Nirmal
Hi, The Force Calculation feature in COMSOL is based on the surface integration of the Maxwell Stress Tensor. This is very sensitive to the mesh size. So, you would probably need to further refine the mesh and calculate the force. Keep refining the mesh until you get almost constant force for successive mesh refinement. The size of the air domain should be such that the fields on the outer boundaries should be negligible. You could also try using the Infinite Element Domains or increase the air domain further. Hope this helps. Best Regards, Nirmal

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月2日 GMT-5 17:34
In response to your instruction, I investigated incrementing the sphere radius and set mesh refinement to "Extremely Fine". My results were:

SphereRadius(m) ForceCalulated(N)
0.04 -0.78
0.05 3.48
0.06 1.24
0.07 -0.86
0.08 0.63
0.09 -2.07
0.10 -2.56
0.11 -0.083
--- ---
0.14 0.54
0.2 -3.22

I cannot see any clear trend here, and from the magnetic flux density plot, I think that increasing the sphere radius further will not reduce edge effects significantly. which suggests that I have made an error in setting up the force calculation (Model Builder > comp1 > mfnc > Force Calculation 1). Have I set up this calculation correctly? I am also unsure if I have set up boundary conditions appropriately.

Following the procedure outlined in [1], I was able to upload my model file without mesh and results which should help with resolving this problem.

[1]: www.comsol.com/support/knowledgebase/1098/
In response to your instruction, I investigated incrementing the sphere radius and set mesh refinement to "Extremely Fine". My results were: SphereRadius(m) ForceCalulated(N) 0.04 -0.78 0.05 3.48 0.06 1.24 0.07 -0.86 0.08 0.63 0.09 -2.07 0.10 -2.56 0.11 -0.083 --- --- 0.14 0.54 0.2 -3.22 I cannot see any clear trend here, and from the magnetic flux density plot, I think that increasing the sphere radius further will not reduce edge effects significantly. which suggests that I have made an error in setting up the force calculation (Model Builder > comp1 > mfnc > Force Calculation 1). Have I set up this calculation correctly? I am also unsure if I have set up boundary conditions appropriately. Following the procedure outlined in [1], I was able to upload my model file without mesh and results which should help with resolving this problem. [1]: http://www.comsol.com/support/knowledgebase/1098/


Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月2日 GMT-5 17:54
Hi,

I checked your model. If you only need to calculate magnetic force between the two separated cylinder magnets in your problem:

You should not define magnets by Material, as the magnets can be assumed to have linear behavior. So, you need to define them in Magnetic Flux Conservation node. But, using this node you assigned magnetization to the air sphere, why ???? This is the reason that when you increase the air sphere radius your force changes. Following some solved examples in COMSOL about permanent magnet, you can solve this problem easily.

Good Luck,
Mohsen
Hi, I checked your model. If you only need to calculate magnetic force between the two separated cylinder magnets in your problem: You should not define magnets by Material, as the magnets can be assumed to have linear behavior. So, you need to define them in Magnetic Flux Conservation node. But, using this node you assigned magnetization to the air sphere, why ???? This is the reason that when you increase the air sphere radius your force changes. Following some solved examples in COMSOL about permanent magnet, you can solve this problem easily. Good Luck, Mohsen

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月2日 GMT-5 19:27
Hi Mohsen,

Being quite new to COMSOL, would you mind elaborating your explanation? Specifically:

> You should not define magnets by Material, as the magnets can be assumed to have linear behavior. So, you need to define them in Magnetic Flux Conservation node.

Are you saying here that I should not define a material for my magnet (mat1 in the model I uploaded)? If so, what is wrong with this approach?

> But, using this node you assigned magnetization to the air sphere, why ???? This is the reason that when you increase the air sphere radius your force changes.

It makes no sense to assign the magnetization to the air sphere as you say, but I would like to impose flux conservation on the air sphere. If I disable "Magnetic Flux Conservation 2" in the model I attached, I cannot deselect the air sphere in "Magnetic Flux Conservation 1". I can deselect it in "Magnetic Fields, No Currents (mfnc)", but surely then no magnetic field will be resolved in the air sphere at all.

> Following some solved examples in COMSOL about permanent magnet, you can solve this problem easily.

I followed two examples [1, 2], both of which considered the magnet with a material geometry. Perhaps I have misunderstood what they are demonstrating. Do you know of any examples that are more specific for my need?

Thank you for your help so far!

[1]: www.comsol.com/model/one-sided-magnet-and-plate-213
[2]: www.comsol.com/model/the-magnetic-field-from-a-permanent-magnet-78
Hi Mohsen, Being quite new to COMSOL, would you mind elaborating your explanation? Specifically: > You should not define magnets by Material, as the magnets can be assumed to have linear behavior. So, you need to define them in Magnetic Flux Conservation node. Are you saying here that I should not define a material for my magnet (mat1 in the model I uploaded)? If so, what is wrong with this approach? > But, using this node you assigned magnetization to the air sphere, why ???? This is the reason that when you increase the air sphere radius your force changes. It makes no sense to assign the magnetization to the air sphere as you say, but I would like to impose flux conservation on the air sphere. If I disable "Magnetic Flux Conservation 2" in the model I attached, I cannot deselect the air sphere in "Magnetic Flux Conservation 1". I can deselect it in "Magnetic Fields, No Currents (mfnc)", but surely then no magnetic field will be resolved in the air sphere at all. > Following some solved examples in COMSOL about permanent magnet, you can solve this problem easily. I followed two examples [1, 2], both of which considered the magnet with a material geometry. Perhaps I have misunderstood what they are demonstrating. Do you know of any examples that are more specific for my need? Thank you for your help so far! [1]: http://www.comsol.com/model/one-sided-magnet-and-plate-213 [2]: http://www.comsol.com/model/the-magnetic-field-from-a-permanent-magnet-78

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月3日 GMT-5 20:45
Hi Bahareh,

If you follow the second example you mentioned, you can model the magnets easily. Just follow the steps. Attached may help you to figure out your problem.

Hope this helps you,
Mohsen
Hi Bahareh, If you follow the second example you mentioned, you can model the magnets easily. Just follow the steps. Attached may help you to figure out your problem. Hope this helps you, Mohsen

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 2015年1月3日 GMT-5 20:45
Hi Bahareh,

If you follow the second example you mentioned, you can model the magnets easily. Just follow the steps. Attached may help you to figure out your problem.

Hope this helps you,
Mohsen
Hi Bahareh, If you follow the second example you mentioned, you can model the magnets easily. Just follow the steps. Attached may help you to figure out your problem. Hope this helps you, Mohsen

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.