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.

Meshing over large changes in scale

Please login with a confirmed email address before reporting spam

Hi Everyone,

I am trying to mesh a geometry which has a large difference in scale between components (from mm to nm scales). The free mesher always fails with

Error: 4029
Failed to insert point.
- x coordinate: 5.04031e-005
- y coordinate: 0.002645
- z coordinate: 2.74364e-007
An empty cavity was generated.

and the swept mesher fails with an invalid topology message, probably due to to the fact that there are two boundaries defined on one face but not the opposing face (making the topology inconsistent). Does anyone have any suggetions on methods I might try to successfully mesh this model?

Additionally I have read (cds.comsol.com/access/dl/papers/5376/Buchau.pdf) that it is possible to use models done in hypermesh as comsol meshes. However whenever I attempt to import such models as mesh files, it creates the model without any subdomains (making it impossible to solve anything). Has anyone had any success with using hypermesh in this regard?

Kind Regards,
Jon

16 Replies Last Post Nov 18, 2013, 11:16 AM EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 19, 2009, 4:24 PM EDT
Hi

there is a limit to the amount you can expand a mesh within a given domain, I beleive it 4-5 order of magnitude, you have to test it out.

A trick I have learned is to create intermediate boundaries and mesh from the smallest part, then to the larger mesh domain, as for each subdomain the meshng seems to be re-normalised.

Anyhow for such large differences, you should perhaps consider other elements, subdiveide your model or an extensive manual meshing.

Good luck
Ivar

Hi there is a limit to the amount you can expand a mesh within a given domain, I beleive it 4-5 order of magnitude, you have to test it out. A trick I have learned is to create intermediate boundaries and mesh from the smallest part, then to the larger mesh domain, as for each subdomain the meshng seems to be re-normalised. Anyhow for such large differences, you should perhaps consider other elements, subdiveide your model or an extensive manual meshing. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 20, 2009, 1:24 PM EDT
Hi,

Thank you for the reply. I am curious as to what you mean by intermediate boundaries? I tried to make a geometry that had for example a small cube surrounding the smallest areas, so that the meshing system wouldn't have to try to make a mesh that covers all 6 or so orders of magnitude, but then I would get errors about decomposing the geometry.

Could you give me an example of what you mean by an intermediate boundary?

Thanks again for the help.

Kind Regards,
Jon
Hi, Thank you for the reply. I am curious as to what you mean by intermediate boundaries? I tried to make a geometry that had for example a small cube surrounding the smallest areas, so that the meshing system wouldn't have to try to make a mesh that covers all 6 or so orders of magnitude, but then I would get errors about decomposing the geometry. Could you give me an example of what you mean by an intermediate boundary? Thanks again for the help. Kind Regards, Jon

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 20, 2009, 5:57 PM EDT
Hello

I think you got the trick, if you make a very small circle (i.e. radius 1e-7) enclosed in a large circle of radius (let' say 1) you will get an error message when you mnesh diretly, if you add another circle of an intermediate radius (i.e 1e-4) you will be able to mesh in a few steps. These number are taken from my head, I got the demonstration once at a course (Comsol Switzerland by Dr. Sven Friedel), so I suggest also that you take a few courses, you will learn alot, at least I have and I have managed to have courses in Paris, Grenoble and Zurich, over the last 3 years, and each of the different teachers were really good, really knowing their job.

Now this applies if the mesh is in the same plane (2D), if you are in 3D you should use surface/boundary mesh for the area and sweep mesh for the thickness, one trick learned is to get COMSOL to not use uniforme scales in the graphics (you double click on the SCALE name on the bottom of your COMSOL GUI frame, then apply a reset graphical size command = the four arrows NWSE). This will scale your MEMS system to fill the image and thin thickness features appear easier to pick. (double click the scale to get back again, I'm off site and do not have COMSOL available just now to test).

You will probably have to play a little with the sweep mesh as it's not always obvious to apply, especially if you have different cutouts on the lower and upper surfaces, what often happens in MEMS. COSMOL has greatly improved the behaviour of the sweep mesh in V3.5.

Good luck
Ivar
Hello I think you got the trick, if you make a very small circle (i.e. radius 1e-7) enclosed in a large circle of radius (let' say 1) you will get an error message when you mnesh diretly, if you add another circle of an intermediate radius (i.e 1e-4) you will be able to mesh in a few steps. These number are taken from my head, I got the demonstration once at a course (Comsol Switzerland by Dr. Sven Friedel), so I suggest also that you take a few courses, you will learn alot, at least I have and I have managed to have courses in Paris, Grenoble and Zurich, over the last 3 years, and each of the different teachers were really good, really knowing their job. Now this applies if the mesh is in the same plane (2D), if you are in 3D you should use surface/boundary mesh for the area and sweep mesh for the thickness, one trick learned is to get COMSOL to not use uniforme scales in the graphics (you double click on the SCALE name on the bottom of your COMSOL GUI frame, then apply a reset graphical size command = the four arrows NWSE). This will scale your MEMS system to fill the image and thin thickness features appear easier to pick. (double click the scale to get back again, I'm off site and do not have COMSOL available just now to test). You will probably have to play a little with the sweep mesh as it's not always obvious to apply, especially if you have different cutouts on the lower and upper surfaces, what often happens in MEMS. COSMOL has greatly improved the behaviour of the sweep mesh in V3.5. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 20, 2009, 7:16 PM EDT
Hi again,

I think I understand now, my one question for the 3D case is do I use a solid sphere (to use your example of the adding circles) or a 'face' object when making these boundaries? Keeping in mind my final goal is to represent E-fields (all the problems I have been having are when I have to model the surrounding 'air' to be able to see the E-Field). So I guess the real question is, do I add a just the surface of a sphere using the 'face' geometry type, or do I use a solid sphere for each of these intermediate boundaries?

Thank you again for your time on this.

Regards,
Jon
Hi again, I think I understand now, my one question for the 3D case is do I use a solid sphere (to use your example of the adding circles) or a 'face' object when making these boundaries? Keeping in mind my final goal is to represent E-fields (all the problems I have been having are when I have to model the surrounding 'air' to be able to see the E-Field). So I guess the real question is, do I add a just the surface of a sphere using the 'face' geometry type, or do I use a solid sphere for each of these intermediate boundaries? Thank you again for your time on this. Regards, Jon

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 4:37 AM EDT
Hi,

As I understand, the problem is due to the big scale range from mm to nm. I once faced such problem with the same error report. All I had to do was to rescale the axes/grid setting to cover from nm to the mm range, and problem was solved. I recommend you try same.

In addition, it is recommended to always adjust the axes/grid setting to cover the whole range that you have to work with before you start building a model.

Good luck
Hi, As I understand, the problem is due to the big scale range from mm to nm. I once faced such problem with the same error report. All I had to do was to rescale the axes/grid setting to cover from nm to the mm range, and problem was solved. I recommend you try same. In addition, it is recommended to always adjust the axes/grid setting to cover the whole range that you have to work with before you start building a model. Good luck

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 5:37 AM EDT
Hello

yes you should talk about spheres in 3D (with their spherical surface interface) and circles in 2D.

Now are you really shure you are interrested to have COMSOL calulate some smoth curves fron the nm scale all the way up to 1 m ?

Scale difference > 1E6 are for me "suspect" in the sense I always attempt to concentrate on a geometrical scale close to the phyiscal phenomena.

FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest.

Ivar
Hello yes you should talk about spheres in 3D (with their spherical surface interface) and circles in 2D. Now are you really shure you are interrested to have COMSOL calulate some smoth curves fron the nm scale all the way up to 1 m ? Scale difference > 1E6 are for me "suspect" in the sense I always attempt to concentrate on a geometrical scale close to the phyiscal phenomena. FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest. Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 6:44 AM EDT


FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest.

Ivar

to Ivar

(sorry to disturb the discussion)

Haaaa, that's my favorite question in FEM analysis and I want to debate!!!
I reformulate the question (just to make it more elegant and understandable)!!!

Do you think that there is a relation between the size of the mesh element and the physics governing the model?? in other words: if the mesh and the physics are connected or no. it is well known that the mesh is just a mathematical support, which allows solving the polynomial equations.

The limitation is rather connected to the physics which describes the phenomena at a certain scale but not the mesh element!!

What do you think??

Cheers


[QUOTE] FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest. Ivar [/QUOTE] to Ivar (sorry to disturb the discussion) Haaaa, that's my favorite question in FEM analysis and I want to debate!!! I reformulate the question (just to make it more elegant and understandable)!!! Do you think that there is a relation between the size of the mesh element and the physics governing the model?? in other words: if the mesh and the physics are connected or no. it is well known that the mesh is just a mathematical support, which allows solving the polynomial equations. The limitation is rather connected to the physics which describes the phenomena at a certain scale but not the mesh element!! What do you think?? Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 8:28 AM EDT



FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest.

Ivar

to Ivar

(sorry to disturb the discussion)


Do you think that there is a relation between the size of the mesh element and the physics governing the model?? in other words: if the mesh and the physics are connected or no. it is well known that the mesh is just a mathematical support, which allows solving the polynomial equations.


Cheers



As well as I understand, the size of mesh element is independent from the physics of the model. I have used all kinds of different mesh settings to solve the same set of PDE's and got same results.

Emile
[QUOTE] [QUOTE] FEM is a linearised theory, if you are meshing close to the atom, molecule, crystalline or even "grain" size of a material you are having your linear FEM hypothessis coming in conflict with the material properties at the scale of interest. Ivar [/QUOTE] to Ivar (sorry to disturb the discussion) Do you think that there is a relation between the size of the mesh element and the physics governing the model?? in other words: if the mesh and the physics are connected or no. it is well known that the mesh is just a mathematical support, which allows solving the polynomial equations. Cheers [/QUOTE] As well as I understand, the size of mesh element is independent from the physics of the model. I have used all kinds of different mesh settings to solve the same set of PDE's and got same results. Emile

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 3:06 PM EDT
Hi,

I accept fully (and agee with you) that my wording is wrong and that the physics calulated from FEM, as such, are not wrong even if the mesh size is smaller than lets say an "atom".

But at atomic level and with thin layers such as in MEMS today you should not expect that your linearise global bulk structural FEM model is working for all properties and is a "good" representation of what you are modelling. Again it depends on what you are looking for.

So for me from the moment the mesh size become comparable to the local components of the material, I set up a BIG warning flag on my results, and I carefully check my hypotheseis, and ask myself if my model is truely valid.

Do you agree better there ?

I would never trust a fatigue calculation based on bulk structral stress calculations for thin structurs of 20-50 um in size, cut in a metal with grain size of a few microns.
This is machinable today, and I see classical FEM applied to this with catastrophic results.

Again I agree it's because of a wrong model not the finesse of the mesh, but they are somehow related or at least the relative size of the mesh should be used regularly as test for model validity, no ?

Ivar
Hi, I accept fully (and agee with you) that my wording is wrong and that the physics calulated from FEM, as such, are not wrong even if the mesh size is smaller than lets say an "atom". But at atomic level and with thin layers such as in MEMS today you should not expect that your linearise global bulk structural FEM model is working for all properties and is a "good" representation of what you are modelling. Again it depends on what you are looking for. So for me from the moment the mesh size become comparable to the local components of the material, I set up a BIG warning flag on my results, and I carefully check my hypotheseis, and ask myself if my model is truely valid. Do you agree better there ? I would never trust a fatigue calculation based on bulk structral stress calculations for thin structurs of 20-50 um in size, cut in a metal with grain size of a few microns. This is machinable today, and I see classical FEM applied to this with catastrophic results. Again I agree it's because of a wrong model not the finesse of the mesh, but they are somehow related or at least the relative size of the mesh should be used regularly as test for model validity, no ? Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 3:17 PM EDT
And by the way

we quickly hit another limit I had forgotten about just above,

When you have a too large scale difference, as [m] and [nm] on the same model, with an even smaller mesh, you can end up getting sever numerical roundoff errors, so then the numerical model of your approximate physical model is playing with your results ...

Meshing size is not innocet, or ?

Ivar
And by the way we quickly hit another limit I had forgotten about just above, When you have a too large scale difference, as [m] and [nm] on the same model, with an even smaller mesh, you can end up getting sever numerical roundoff errors, so then the numerical model of your approximate physical model is playing with your results ... Meshing size is not innocet, or ? Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 30, 2009, 4:25 PM EDT
Thank you all for your suggestions, I finally got the system to mesh. Sadly its now telling me the matrix is singular, which brings up an interesting point regarding the mesh sizes. As Ivar has pointed out when your elements are suppose to be continuous over such large differences in scale the differences in numerical values can cause bad roundoff's that propagate through the entire system (numerical inversion included...). I hope this is not what is causing my singular problem.

Any thoughts?
Thank you all for your suggestions, I finally got the system to mesh. Sadly its now telling me the matrix is singular, which brings up an interesting point regarding the mesh sizes. As Ivar has pointed out when your elements are suppose to be continuous over such large differences in scale the differences in numerical values can cause bad roundoff's that propagate through the entire system (numerical inversion included...). I hope this is not what is causing my singular problem. Any thoughts?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 31, 2009, 6:35 AM EDT
Ivar, thanks for your answer

Yes, you are right.
The mesh element size is no so innocent. as I said before, it is the mathematics of your model. Setting a wrong mesh: poor quality mesh, singularities, non-continuity, will lead to a wrong results or to a singular matrix (most of the time).
So, it is important to find this compromise between the scale of your model, the physics governing it and the mesh that you have to use. That's the challenge for all people doing FEM analysis.

Thanks again for the exchange.

Cheers
Ivar, thanks for your answer Yes, you are right. The mesh element size is no so innocent. as I said before, it is the mathematics of your model. Setting a wrong mesh: poor quality mesh, singularities, non-continuity, will lead to a wrong results or to a singular matrix (most of the time). So, it is important to find this compromise between the scale of your model, the physics governing it and the mesh that you have to use. That's the challenge for all people doing FEM analysis. Thanks again for the exchange. Cheers

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 31, 2009, 3:04 PM EDT
Hi again,

so why do you say sadly ? as you suggest the singular matrix could be an indication that we are hitting round-of errors. On the other side for me this rather indicates, hapilly, that we might cut the model in two, or perhaps we do not really need the full scale difference ?

Most propbably your result shoul look very "smooth" once you are "far" from your "microscopic effects" don't you think so ? (I do not know your model so I'm rather guessing)

I have notice often that I setup a nice model, calculated it out just to see some smooth curves, and saying to myself that you really do not need that much sofisticated software to draw such lines. That makes me think of my professors in physics that did a few hand calculations on the problem and came out with two points and two slopes and sketched rapidly what I now need a few hours to set up, but whatis now drawn with highest (model) precision.
When I do the job "correctly" I run a simple MAPLE or MAPESIM model first, its my "hand calculation" approach. But I admit with tools like COMSOL I tend to be lasy and go directly for the model, but I also get some slabs back of the kind you are seeing.

So my advise, take a new look and try again

Good luck
Hi again, so why do you say sadly ? as you suggest the singular matrix could be an indication that we are hitting round-of errors. On the other side for me this rather indicates, hapilly, that we might cut the model in two, or perhaps we do not really need the full scale difference ? Most propbably your result shoul look very "smooth" once you are "far" from your "microscopic effects" don't you think so ? (I do not know your model so I'm rather guessing) I have notice often that I setup a nice model, calculated it out just to see some smooth curves, and saying to myself that you really do not need that much sofisticated software to draw such lines. That makes me think of my professors in physics that did a few hand calculations on the problem and came out with two points and two slopes and sketched rapidly what I now need a few hours to set up, but whatis now drawn with highest (model) precision. When I do the job "correctly" I run a simple MAPLE or MAPESIM model first, its my "hand calculation" approach. But I admit with tools like COMSOL I tend to be lasy and go directly for the model, but I also get some slabs back of the kind you are seeing. So my advise, take a new look and try again Good luck

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 2, 2013, 10:59 PM EDT
Hi~Could you please explain more detailed about how to rescale the axes/grid setting to cover from nm to the mm range". I remember that we can only define one specific axes ( i mean, mm or nm) in one model. How can I do to change the axes/grid setting to cover from nm to the mm range? thank you very much~
Sorry for asking so basic problems. I am new hand in comsol.
Regards
Hi~Could you please explain more detailed about how to rescale the axes/grid setting to cover from nm to the mm range". I remember that we can only define one specific axes ( i mean, mm or nm) in one model. How can I do to change the axes/grid setting to cover from nm to the mm range? thank you very much~ Sorry for asking so basic problems. I am new hand in comsol. Regards

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Apr 3, 2013, 1:56 AM EDT
Hi

go to the Definitions View node, check the axis sub node there change the tick box "Preserve scaling" (or something close to that. This will give you free scaling in all 3 directions (or 2 in 2D) and often helps to select MEMS type objects.

You might need to add a view and add a sub node hide entities and hide air or larger domains, to work only on the "small features" dependeign on how you have made up your model

--
Good luck
Ivar
Hi go to the Definitions View node, check the axis sub node there change the tick box "Preserve scaling" (or something close to that. This will give you free scaling in all 3 directions (or 2 in 2D) and often helps to select MEMS type objects. You might need to add a view and add a sub node hide entities and hide air or larger domains, to work only on the "small features" dependeign on how you have made up your model -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Nov 18, 2013, 11:16 AM EST
Hi Ivar,

Do we have an option for rescale the axes/grid setting in 3D, in Comsol 4.3b?

thanks in advance.
Saeed
Hi Ivar, Do we have an option for rescale the axes/grid setting in 3D, in Comsol 4.3b? thanks in advance. Saeed

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.