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.

magnetic field surrounding a permanent magnetic block

Please login with a confirmed email address before reporting spam

Hi,
I'm building a COMSOL modeling to simulate the magnetic distribution of a magnetic block. I drawn a box (stands for the magnetic block )and another larger box to contain the magnetic block (stands for air surrounding the block). In the Materials setting, I put value of 1 for relative permeability for both the domain. I choose Remanent flux density in Magnetic Flux Conservation to calculate the magnetic field.

What I need is the plotting of magnetic field along z direction. I got a plot, but the problem is that the curve I got is not smooth at all (as shown in the attached picture). I'm not sure if these "oscillation" are from insufficient mesh size( Extremely fine meshes were already used) or mistake setting somewhere.

Could someone help me with this problem, please. Thanks!

Susie


2 Replies Last Post 17 mag 2015, 21:16 GMT-4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 15 mag 2015, 17:47 GMT-4

Hi Susie,

well, the roughness is pretty small, only in the order of 0.1 % of the absolute value. If you scale the plot from 0 to 2.02e5 A/m the curve will look almost perfectly smooth. If you need higher precision you could try to tighten the convergence criterion of the solver or change to higher order discretization. Default is 2nd order (quadratic) in most modules. So you could try changing it to 3rd order (cubic). Of course this is not for free, it will cost computation time and memory. You could also try to optimize the mesh. Try structured meshes instead of the default free tetrahedral.
But consider first: Do you really need better than 0.1% smoothness?

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Susie, well, the roughness is pretty small, only in the order of 0.1 % of the absolute value. If you scale the plot from 0 to 2.02e5 A/m the curve will look almost perfectly smooth. If you need higher precision you could try to tighten the convergence criterion of the solver or change to higher order discretization. Default is 2nd order (quadratic) in most modules. So you could try changing it to 3rd order (cubic). Of course this is not for free, it will cost computation time and memory. You could also try to optimize the mesh. Try structured meshes instead of the default free tetrahedral. But consider first: Do you really need better than 0.1% smoothness? Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 17 mag 2015, 21:16 GMT-4
Hi Edgar,
Thank you so much!
I changed the order of discretization. It did take longer for the computation, but I got much better looking plot now. Thanks for your suggestion.

Susie
Hi Edgar, Thank you so much! I changed the order of discretization. It did take longer for the computation, but I got much better looking plot now. Thanks for your suggestion. Susie

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.