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.

mesh

Please login with a confirmed email address before reporting spam

Hi ,

I am trying to see the accuracy of the numerical solution with different meshes and I am using analytical solution for comparison. As long as the mesh is refined the numerical model is more accurate.

I ran simulations for different meshes and I have the error between solutions.
What I don't understand is why after a certain mesh resolution, the error is not decreasing any more.
Can someone explain to me why ?

5 Replies Last Post 28.08.2015, 15:15 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 18.03.2013, 14:08 GMT-4
Hi

my explanation is tha the mesh density reaches a resolution such as that the discretization errors from the meshing process, becomes small compared to the other numerical errors. Personally I stop refining the mesh when I get some <1-3% change in results, no reason to overdo, else you have a lot of time available

--
Good luck
Ivar
Hi my explanation is tha the mesh density reaches a resolution such as that the discretization errors from the meshing process, becomes small compared to the other numerical errors. Personally I stop refining the mesh when I get some

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.08.2015, 22:54 GMT-4

Hi

my explanation is tha the mesh density reaches a resolution such as that the discretization errors from the meshing process, becomes small compared to the other numerical errors. Personally I stop refining the mesh when I get some <1-3% change in results, no reason to overdo, else you have a lot of time available

--
Good luck
Ivar


Hello Ivar:
May I know how I can refining mesh automatically using COMSOl instead of doing it manually. In general I need to draw a relationship between change in results (error) and mesh refining.


ABBAS
[QUOTE] Hi my explanation is tha the mesh density reaches a resolution such as that the discretization errors from the meshing process, becomes small compared to the other numerical errors. Personally I stop refining the mesh when I get some

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: 9 years ago 28.08.2015, 01:47 GMT-4
Hi

its all in the solver node, under "Study Extensions"

Check the corresponding doc, it still needs some tweaking to adapt to your model, but start with the default values

--
Good luck
Ivar
Hi its all in the solver node, under "Study Extensions" Check the corresponding doc, it still needs some tweaking to adapt to your model, but start with the default values -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 28.08.2015, 10:42 GMT-4
Hello Ivar ;
The best thing in this forum is your fast response to our questions. appreciated .
This is fine to refine my mesh more and more, but how can I draw the linear relationship base on mesh refinement with errors. Can I export these data?
I am working on 2D model now. How can I sure that the same refining will produce if I use 3D model?

Sorry to disturb you
Hello Ivar ; The best thing in this forum is your fast response to our questions. appreciated . This is fine to refine my mesh more and more, but how can I draw the linear relationship base on mesh refinement with errors. Can I export these data? I am working on 2D model now. How can I sure that the same refining will produce if I use 3D model? Sorry to disturb you

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: 9 years ago 28.08.2015, 15:15 GMT-4
Hi

first of all there is no "linear" relation between mesh density and errors level, this is rather non linear.
after a certain mesh density level you will no longer get any significant effect on the solution. Anyhow how many digits do you expect to be correct, and correct w.r.t. what ? I count 2-3 digits as reasonable.

Mesh refinement is mostly only required in certain regions, where the dependent variable have high gradients (change rapidly) one must catch this change, elsewhere the mesh can be far more relaxed, and at the end it's your PC RAM that is the limit, and the time you accept to wait for the results.

My way is to use the default normal or even coarse mesh as first start, and check the results, see where the dependent variables change rapidly, turn off the plot refinements and check at Wireframe level. Then mostly I refine locally where my experience tells me we should do better. Then I rerun and study the results again, I do a manual mesh refinement of 2 and solve to see how the results evolve, if the RAM and time limit is OK I repeat once perhaps twice this mesh refinement, but the latter only when I need really very "precise" results.

Mesh refinement in 2D is a good starting point for 3D, but often (physics dependent) the third dimension might give other spatial gradients in other directions that might need different refinements,

COMSOL is rather well behaved, and adapt the mesh nicely w.r.t. the physics for most cases. and furthermore with the higher level discretization you get more "pseudo nodes elements à la old FEM approach".
Another important point is to avoid singularities: always apply boundary conditions on "COMSOL defined Boundaries" never on lower level elements (if still so be sure you know what you are doing!) around singularities your results become rather worse, the finer you mesh !!

To analyse the effect of the mesh you can define a parameter and drive a Parametric Sweep solver with the mesh refinement and then plot out some variable you define as relevant for the convergence criteria (but you might forget another variable that might have a very different relation to the mesh density :)

Mesh analysis is something you learn with time and experience, but one should never believe one can get it right each time, so do always some checks :)
--
Good luck
Ivar
Hi first of all there is no "linear" relation between mesh density and errors level, this is rather non linear. after a certain mesh density level you will no longer get any significant effect on the solution. Anyhow how many digits do you expect to be correct, and correct w.r.t. what ? I count 2-3 digits as reasonable. Mesh refinement is mostly only required in certain regions, where the dependent variable have high gradients (change rapidly) one must catch this change, elsewhere the mesh can be far more relaxed, and at the end it's your PC RAM that is the limit, and the time you accept to wait for the results. My way is to use the default normal or even coarse mesh as first start, and check the results, see where the dependent variables change rapidly, turn off the plot refinements and check at Wireframe level. Then mostly I refine locally where my experience tells me we should do better. Then I rerun and study the results again, I do a manual mesh refinement of 2 and solve to see how the results evolve, if the RAM and time limit is OK I repeat once perhaps twice this mesh refinement, but the latter only when I need really very "precise" results. Mesh refinement in 2D is a good starting point for 3D, but often (physics dependent) the third dimension might give other spatial gradients in other directions that might need different refinements, COMSOL is rather well behaved, and adapt the mesh nicely w.r.t. the physics for most cases. and furthermore with the higher level discretization you get more "pseudo nodes elements à la old FEM approach". Another important point is to avoid singularities: always apply boundary conditions on "COMSOL defined Boundaries" never on lower level elements (if still so be sure you know what you are doing!) around singularities your results become rather worse, the finer you mesh !! To analyse the effect of the mesh you can define a parameter and drive a Parametric Sweep solver with the mesh refinement and then plot out some variable you define as relevant for the convergence criteria (but you might forget another variable that might have a very different relation to the mesh density :) Mesh analysis is something you learn with time and experience, but one should never believe one can get it right each time, so do always some checks :) -- Good luck Ivar

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.