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
May 31, 2010, 6:58 a.m. EDT
Hi
you have a delicate questions there, and I do not believe there is ON response, there are already a few discussions on the forum about mesh density (try a search left to the [Go] just above ;)
My way is
1) consider the physics what are the gradients of the fileds I'm solving for ? if it is periodic I would want to have at least 5 points per periode (>=2 is the theory, but for me that ti too coarse and risky), for gradients with steep slopes I would like to have gradients below 30° or height length rations of 1:2 at most, again on average.
All this is very physics dependent, are you talking about waves, thermal diffusion, structural stress ...
2) identify stress concetrations ponts/regions and increase the mesh there
The risk is that you then get a very dense mesh from the beginning, long to solve while you are still debugging your model. SO starting with a corse one is not that bad.
You also have the "solver refinement" option to improve the mesh quality (refine locally) or you can do it by a "box" in 2D
Then, as final check rune 1,2,3 simulations by refining the mes 1x, 2x ad observe the changes on teh results, from the moment you have less than 10% change I'm rather happy.
By the way, do also a mesh statistics check, the higher the better but I accept 3D mesh down to 0.1 without really being worried, you can also plot the mesh quality, to help you identify where to improve.
Have fun Comsoling
Ivar
Hi
you have a delicate questions there, and I do not believe there is ON response, there are already a few discussions on the forum about mesh density (try a search left to the [Go] just above ;)
My way is
1) consider the physics what are the gradients of the fileds I'm solving for ? if it is periodic I would want to have at least 5 points per periode (>=2 is the theory, but for me that ti too coarse and risky), for gradients with steep slopes I would like to have gradients below 30° or height length rations of 1:2 at most, again on average.
All this is very physics dependent, are you talking about waves, thermal diffusion, structural stress ...
2) identify stress concetrations ponts/regions and increase the mesh there
The risk is that you then get a very dense mesh from the beginning, long to solve while you are still debugging your model. SO starting with a corse one is not that bad.
You also have the "solver refinement" option to improve the mesh quality (refine locally) or you can do it by a "box" in 2D
Then, as final check rune 1,2,3 simulations by refining the mes 1x, 2x ad observe the changes on teh results, from the moment you have less than 10% change I'm rather happy.
By the way, do also a mesh statistics check, the higher the better but I accept 3D mesh down to 0.1 without really being worried, you can also plot the mesh quality, to help you identify where to improve.
Have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jun 1, 2010, 6:05 a.m. EDT
Thank you so much Ivar for your response. However, I would appreciate if you could give some comments on the next aspect of the problem.
Suppose you have determined field gradients and how many points you need in different subdomains of your geometry. How would you specify your requirement to Comsol? Is there a way of doing it by defining various options in, say, free-mesh parameters or anything else for that matter?
Up till now, I have been playing with free-mesh parameters in different sections of geometry. But so far as I see, I could not come with a reliable explanation of my own as to how it can be used to manage a constant mesh density when size of the geometry is changed by some order of magnitude.
I actually need to learn this, if possible, so that I could easily iterate my script over different size factors of my geometry.
Thank you so much Ivar for your response. However, I would appreciate if you could give some comments on the next aspect of the problem.
Suppose you have determined field gradients and how many points you need in different subdomains of your geometry. How would you specify your requirement to Comsol? Is there a way of doing it by defining various options in, say, free-mesh parameters or anything else for that matter?
Up till now, I have been playing with free-mesh parameters in different sections of geometry. But so far as I see, I could not come with a reliable explanation of my own as to how it can be used to manage a constant mesh density when size of the geometry is changed by some order of magnitude.
I actually need to learn this, if possible, so that I could easily iterate my script over different size factors of my geometry.
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Jun 1, 2010, 6:10 a.m. EDT
Oh and I am doing transient electromagnetic simulations in version 3.5. And as I see it, solver mesh refinement is not a possibility.
Oh and I am doing transient electromagnetic simulations in version 3.5. And as I see it, solver mesh refinement is not a possibility.
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
Jun 1, 2010, 7:12 a.m. EDT
Hi
the mesh refinement is probably not everywhere (any applications, I cannot check no direct access to COMSOL just now), but for the manual mesh options check the doc (index the pdf files and run a search for mesh) you have many mesh settings, the predefined ones (a series of from extremely fine to extremely coarse) that take into account the overall sizes of your parts and adapto to it, and then you can play with all the individual settings, by the way you ave a full day training course organised by COMSOL regularly on meshing, this really gies you a "kick-start").
In V3.5 you cannot store the mesh methodology, this is rather frustrating, I uually wrote it down on a separate txt file to know how to restart, as when you do a model reset, you lose all meshes and you must restart maually from scratch (easiest is automatic, you just click mesh, OK if works and you can still solve your model in a reasonnable amount of time). In V4 this is highly improves, as you mesh sequence is stored and you can always go back, adapt it recalculate it, or even try out several and switch between the meshes (your model file grows close to a Gb if you have a true CAD model though, and it's aready quity compressed !
Finally, I'm mostly finsihing up my models by running 2-3 models with finer and finer mesh (global refinement button) and check how my results change, it's a perfectly agreed and recognised iterative method for FEM.
I would say, start with a rather coarse mesh, it solves quicker, you can always "refine later", furst one must ensuire that the global model is correct.
Have fun Comsoling
Ivar
Hi
the mesh refinement is probably not everywhere (any applications, I cannot check no direct access to COMSOL just now), but for the manual mesh options check the doc (index the pdf files and run a search for mesh) you have many mesh settings, the predefined ones (a series of from extremely fine to extremely coarse) that take into account the overall sizes of your parts and adapto to it, and then you can play with all the individual settings, by the way you ave a full day training course organised by COMSOL regularly on meshing, this really gies you a "kick-start").
In V3.5 you cannot store the mesh methodology, this is rather frustrating, I uually wrote it down on a separate txt file to know how to restart, as when you do a model reset, you lose all meshes and you must restart maually from scratch (easiest is automatic, you just click mesh, OK if works and you can still solve your model in a reasonnable amount of time). In V4 this is highly improves, as you mesh sequence is stored and you can always go back, adapt it recalculate it, or even try out several and switch between the meshes (your model file grows close to a Gb if you have a true CAD model though, and it's aready quity compressed !
Finally, I'm mostly finsihing up my models by running 2-3 models with finer and finer mesh (global refinement button) and check how my results change, it's a perfectly agreed and recognised iterative method for FEM.
I would say, start with a rather coarse mesh, it solves quicker, you can always "refine later", furst one must ensuire that the global model is correct.
Have fun Comsoling
Ivar