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.

Creating high density 2D mesh in 3D model

Please login with a confirmed email address before reporting spam

Hi,

Firstly, sorry if this is a stupid question, I'm very new to Comsol and don't know if what I want to do is even possible.

At the moment I'm just trying to model basic permanent magnets then get contour (or streamline) plots of the magnetic field going from one pole to the other. While I can happily do this in 2D and get a good looking plot using the magnetic vector potential normal to the plane I'm viewing (attached image "2D plot"). The problem I get is when I build effectively the same configuration in 3D (a cuboid magnet), then take a 2D slice through the centre of the magnet and plot the same magnetic vector potential (attached image "3D plot").

I'm assuming my problem is that the mesh density on that plane taken from the 3D model is much less than it is for the 2D plot. Therefore, I was wondering if anyone could tell me how I would go about re-solving just on this plane at a higher mesh density. Alternatively, please tell me if there's a different issue that's causing this.

Ultimately, I'd like to be able to model more complex magnet geometries, then take slices through them and look at what the magnetic field lines are doing.

Many thanks
Stephen


2 Replies Last Post 10.08.2012, 06:37 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 09.08.2012, 09:22 GMT-4
Hi

you must really have a coarse mesh, as it looks indeed awful, but are you sure you haven t missed something like a scaling factor in the geometry or the field boundary values (it looks very weak) or the resolution of your 3D solver, it might not be "only" the mesh ?

Another point, in MF magnetics your should avoid sharp edges, as these make singularities, try to fillet them with a small radius

Or could it be that you have selected a Cut Plane (the default is (Y-Z) and then made a streamline plot which by default is (Bx-By), but should read (By - Bz) for the plot to be correct

--
Good luck
Ivar
Hi you must really have a coarse mesh, as it looks indeed awful, but are you sure you haven t missed something like a scaling factor in the geometry or the field boundary values (it looks very weak) or the resolution of your 3D solver, it might not be "only" the mesh ? Another point, in MF magnetics your should avoid sharp edges, as these make singularities, try to fillet them with a small radius Or could it be that you have selected a Cut Plane (the default is (Y-Z) and then made a streamline plot which by default is (Bx-By), but should read (By - Bz) for the plot to be correct -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10.08.2012, 06:37 GMT-4
Thank you for those suggestions. I think you're correct and it is just a really rough mesh. I've been able to improve upon it a bit by increasing the mesh density in the air sphere surrounding the magnets.

However, I found the best improvement was to switch from using a contour plot of magnetic vector potential to a streamline plot of magnetic flux density ("start point controlled with" a uniform spacing along the x-axis). As I'm just after a plot showing the direction of the field in this plane this seems to work well - I just don't get to have the magnitude reference colours as I do in contour plot, but that's not a major problem.

Thanks again for your help
Stephen
Thank you for those suggestions. I think you're correct and it is just a really rough mesh. I've been able to improve upon it a bit by increasing the mesh density in the air sphere surrounding the magnets. However, I found the best improvement was to switch from using a contour plot of magnetic vector potential to a streamline plot of magnetic flux density ("start point controlled with" a uniform spacing along the x-axis). As I'm just after a plot showing the direction of the field in this plane this seems to work well - I just don't get to have the magnitude reference colours as I do in contour plot, but that's not a major problem. Thanks again for your help Stephen

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.