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.

Combining Mapped and Free Mesh in 3d

Please login with a confirmed email address before reporting spam

Hello Everyone,


my model consists of 5 round line-coils (r=0.04m, EMB1-5), arbitrarily positioned around a phantom (block with l=0.1m). This phantom is not fully modeled in COMSOL and I will not need to do so. However, I need the magnetic field strength inside the middle cross plane (EMB6) of the phantom at points with 5mm resolution. Thus, I want a fine mesh inside this plane (I used 1cm so far, and interpolated the others with postinterp in MATLAB).

Since this solution is only part of a larger optimization process, I need the calculation as fast as possible. When I use a Free mesh for all the geometries, the mesh inside the middle cross plane becomes very complex and irregular. If I could use a mapped quad mesh on the plane, less elements would be used (356 vs. 100) and thus the solution time would go down.

Whenever I create a mapped mesh for the plane and then go into free mesh to mesh the remaining elements, an error comes up: #4134: "Boundary mesh must consist of triangular elements only".

I would assume now that it is not possible to combine mapped and free meshed elements in 3D?

I need to use 3D and no symmetry can be applied, I am on 3.5a. I have 4 available but all my MATLAB scripts are already written for 3.5a.

Thanks in advance for your help!

Attachments:
.png of the model


2 Replies Last Post Feb 28, 2011, 3:32 a.m. EST
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 Feb 28, 2011, 1:21 a.m. EST
Hi

try, once you have mapped the central mesh part, to hit the "convert to triangle". You will then have a structured, regular triangular mesh.

Another way is to better play with the meshing parameters: select the region you want a free regular tri mesh, select the maximum mesh size and set a reasonable alue. Then you have a bounded free mesh mostly OK.

Last way: if your region is very "square" add a few interiour boundaries so its only a set of rectangles, then you can easily used mapped mesh all over

--
Good luck
Ivar
Hi try, once you have mapped the central mesh part, to hit the "convert to triangle". You will then have a structured, regular triangular mesh. Another way is to better play with the meshing parameters: select the region you want a free regular tri mesh, select the maximum mesh size and set a reasonable alue. Then you have a bounded free mesh mostly OK. Last way: if your region is very "square" add a few interiour boundaries so its only a set of rectangles, then you can easily used mapped mesh all over -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 28, 2011, 3:32 a.m. EST
Hello Ivar,


once again, thank you for your quick and helpful reply! The first option you mentioned already gave me a good improvement of roughly 5s in solution time. I also was able to mesh the outer boundaries (they are rectangular as well) with this technique and it further reduced the time!

Playing with the mesh parameters and comparing the results was all I did in the last week ;) But the mostly unregular mesh on the rectangular boundaries and planes gave me a headache!

Thanks again and lots of regards from Germany!

Johannes
Hello Ivar, once again, thank you for your quick and helpful reply! The first option you mentioned already gave me a good improvement of roughly 5s in solution time. I also was able to mesh the outer boundaries (they are rectangular as well) with this technique and it further reduced the time! Playing with the mesh parameters and comparing the results was all I did in the last week ;) But the mostly unregular mesh on the rectangular boundaries and planes gave me a headache! Thanks again and lots of regards from Germany! Johannes

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.