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 magnets - Question about Maxwell Stress Tensor
Posted 10.12.2010, 12:29 GMT-5 Version 4.3, Version 5.2 12 Replies
Please login with a confirmed email address before reporting spam
I have two permanent magnets and I would like to compute the force that one magnet exerts on the the other.
if the two magnets (mag1 and mag2) are the same (same dimensions, and same magnetization vector)
I would expect that the force of Mag 1 on Mag2 is the same as the one of Mag2 on Mag1 and also if the magnets are small enough, the directions of these forces should be along the line connecting the two magnets' centers (more or less, since it's not the gilbert model).
Two issues
the forces should be equal and opposite, but they are not. I have refined the mesh an still no convergence, so I am not sure how to get better results
The force has components that Iwould expect to be zero (because of symmetry). SO I am questioning whether or not I am missing something,
Can some check my model and tell me where I am making a mistake?
Please login with a confirmed email address before reporting spam
Attachments:
Please login with a confirmed email address before reporting spam
I have several things to suggest:
- first your overall air model is not very square/spherical around the magnets, this is restraining the field and will give you edge effects.
- You are not using PML to extend the field gently to infinite distance, PML requires some careful meshing in the PML region to get maximum effects for minimum number of elements ("onion" shell shapes elements, use layers in v4)
- you are not using symmetry that nicely applies here and further reduces the model size and will allow to increase the meh density (but not show the discrepancy left right magnet you are pointing to ;)
- finally, but not least, youre mesh is not very symmetric and you have sharp edges on your magnets, hence field concetration and singulartity points, which gives large field gradients that again have important effects on the maxwell tensor integration approach.
I had made some tries and tests that I deposited on the Model Exhange a few years ago, take a look on the difference between a fine teth mesh and a coarse structured mesh. Maxwell tensors for force computation are very mesh dependent
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Ivar,
thanks for the reply - I will try out your suggestions, so I might ask for your feedback again once I implement them
However :
My model was not generated with a lot of attention - namely I let the software create the mesh and then I believe I set the mesh refinement automatically.
I knew about the sharp-corner problems - in fact I also created another model with oval magnets and I still got the same inconsistency of results in the force calculations which means this mesh-dependency is really too strong perhaps to be relied on?
I understand that more attention needs be put into meshing the system. However, this is just a little model I made to check results, their convergence and also consistency. The model I am working on has several other complications added to it (moving parts, ALE, more than two magnets, etc.) , and there will little I can do to check consistency of results because I won't have access to an analytical solution.
What PUZZLES me the most about this model is that - despite the poor mesh - shouldn't reciprocity of results still hold? Meaning what one magnet sees should be exactly what the other sees (except for some sign changes in the forces), so the Tensor approach gives very bad results -
Is there ANOTHER APPROACH I can use? Something that's easier to implement and is more robust mesh-wise?
Thanks for your help!
Please login with a confirmed email address before reporting spam
try to use a structured mesh (quads) with the same dimensions around the edges of the magnet.
Then anlyse finer the true value of the force along each edge separately, the final force appear often as the difference of large numbers, which are known to easily give numerical issues
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I didn't quite get your suggestion
what you mean by ".... the true value of the force along each edge separately, " ?
thanks!
G.
Please login with a confirmed email address before reporting spam
check the Maxwell tensor equations used by COMSOL and integrate separately the formula along each of the 4 edges of your magnet and compare the values, the global result of COMSOL is the integration along the closed loop around your magnet.
Then compare how these separate values changes with the meshing shape and density, it can indicate how your maxwell tensor error changes
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
are you referring to an option in COMSOL, or should I use input the formula in the integration window separately for each boundary?
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Once you compute the force acting on one of the magnets, you can go under
options > integration coupling variables and create a global variable (technically 1 vector , i.e. 3 scalar quantities) and set them equal to the computed force components for one of the magnets.
then you can use "global expressions" (still under the options menu) and find the option that lets you integrate the equation F=ma .
You can either solve for displacement or velocity and then you will have to impose that quantity on the boundary of the magnets (or the subdomain) through the ALE application mode if you want to visualize the results with a movie.
since the Force is distance-dependent you will have to compute and use a transient analysis.
Also, I am not sure how COmsol handles unconstrained bodies, so I would impose that one MAGNET doesn't move while the other is either attracted or repulsed. The reaction force on the fixed magnet is equal to the mangetic one acting upon it.
I hope it makes sense. I am not an expert in COMSOL yet, but that's how I would try and approach the problem.
Let me know if I wasn't clear. Did you manage to get convergence of the computed magnetic force? That's my struggle.
Please login with a confirmed email address before reporting spam
normally magnets (MF in v4) are all constrained as nothing is solved for u,v,w. Depending on how you couple the physics /application mode, you might also solve for u,v,w but then probably you need some ALE to cope for the motion for the ACDC calculations
for the maxwell stress tensor you need to integrate one of the v4 mf.ntx_... or mf.nty_... or mf.ntz_...
or corresponding names for v3.5 along the edges of your magnet and compare the values for the four edges of a square magnet. Depending on the symmetry of your problem these should be equal and opposed for several and the total force is only a fraction of the sum of the absolute values. If your mesh is not very symmetric these differences might esasily grow and give rather wrong final sum ups
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I am trying to simulate repulsive force between two permanent magnets. One of the magnets is fixed and the other one moves freely. I have simulated it but two things in results make me confused:
1. Repulsive force in all times is the same. But we know that, as the second magnet goes far away first magnet, forces must become lesser.
2. I plotted displacement of one point on moving magnet. Graph shows displacement of 28000mm in 0.1 second (:-o). But animation shows about 1mm displacement.
What is the problem?
Can anyone help me?
Please login with a confirmed email address before reporting spam
Please can you send me your file because I have the same issue
Thank you
Abdulrahman homadi
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.
Suggested Content
- FORUM What is the Difference: Maxwell Stress Tensor vs Lorentz Force Integration
- KNOWLEDGE BASE Warning: New Constraint Force Nodes Detected
- FORUM Maxwell Stress, Fluid Volume Force, 2D
- BLOG How to Model Electrodynamic Magnetic Levitation Devices
- BLOG Validating the Use of Boundary Elements for Magnetostatics Modeling