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

Please login with a confirmed email address before reporting spam

Hello,

I"m looking for good tutorials for showing the method of "user controlled mesh". I cannot find any good tutorial in COMSOL. Please let me know.

Thanks.

9 Replies Last Post 2012年10月23日 GMT-4 15:45
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 2012年1月20日 GMT-5 01:58
Hi

meshing is an "art" mixed with science, you need to make many to learn and its rather "physics" dependent. Ideally you should know the results to better mesh, which means that you need to use your physics or engineering knowledge and expectations for your model to guide you.

There is a good training course on advanced meshing given by COMSOL (see the courses list), that shows you all the possibilities included, then the rest you need to learn by meshing yourselves, as again it all depends on your model and what is important for your specific case.

main idea with meshing: its a sampling, as for digital signal sampling, and you need a dense mesh where the dependent variables have strong gradients to resolve these, when you add the time dependence it's worse as you must mentally scan the time behaviour changes to be sure you cover that too.

Finally , your initial conditions are also important, all "0" is a neutral starting point, but for many cases it might imply extremely high mesh density to get the solver to efficiently converge to the right solution, here too by choosing appropriate or better starting guesses you can relax sometimes the mesh quality criteria

Basically understand which type of PDE you have for your physics and which are the families of solutions, then apply to mesh density criteria, then study many cases as here on the forum, take an hour per day just for that, you will soon get there and become an expert ;)

--
Good luck
Ivar
Hi meshing is an "art" mixed with science, you need to make many to learn and its rather "physics" dependent. Ideally you should know the results to better mesh, which means that you need to use your physics or engineering knowledge and expectations for your model to guide you. There is a good training course on advanced meshing given by COMSOL (see the courses list), that shows you all the possibilities included, then the rest you need to learn by meshing yourselves, as again it all depends on your model and what is important for your specific case. main idea with meshing: its a sampling, as for digital signal sampling, and you need a dense mesh where the dependent variables have strong gradients to resolve these, when you add the time dependence it's worse as you must mentally scan the time behaviour changes to be sure you cover that too. Finally , your initial conditions are also important, all "0" is a neutral starting point, but for many cases it might imply extremely high mesh density to get the solver to efficiently converge to the right solution, here too by choosing appropriate or better starting guesses you can relax sometimes the mesh quality criteria Basically understand which type of PDE you have for your physics and which are the families of solutions, then apply to mesh density criteria, then study many cases as here on the forum, take an hour per day just for that, you will soon get there and become an expert ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年5月9日 GMT-4 17:39
I think you answer, @Ivar, is typical for COMSOL documentation: it answers the wrong question.

Usually when I seek help on COMSOL, I'm seeking help with the idiosyncrasies of the GUI program, not details on the physics. It's amusing to see all those PDE's listed in the docs -- PDE's found in any textbook -- with very little text dedicated toward teaching insight for using the "tricks" of the GUI. Might I suggest that COMSOL observe and capture user GUI confusions from the many seminars and post tutorials designed to combat
those confusions.

In any case, I too have been looking for a good tutorial on meshing. I know what I want to achieve in the
mesh -- make the mesh finer in critical areas -- I just don't know how to tell COMSOL to do that.
I think you answer, @Ivar, is typical for COMSOL documentation: it answers the wrong question. Usually when I seek help on COMSOL, I'm seeking help with the idiosyncrasies of the GUI program, not details on the physics. It's amusing to see all those PDE's listed in the docs -- PDE's found in any textbook -- with very little text dedicated toward teaching insight for using the "tricks" of the GUI. Might I suggest that COMSOL observe and capture user GUI confusions from the many seminars and post tutorials designed to combat those confusions. In any case, I too have been looking for a good tutorial on meshing. I know what I want to achieve in the mesh -- make the mesh finer in critical areas -- I just don't know how to tell COMSOL to do that.

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 2012年5月9日 GMT-4 18:13
Hi

interesting, by the way I'm a user like you, not from "COMSOL" ;)
Obviously that means I have used COMSOL now so much that I start to behave as them then, puzzling.

Indeed a couple of yeas ago, before the Forum, COMSOL had a few pages of tips and tricks in their journal, that has dissapeared sometimes before the user Forum appeared.

And I too find the doc lack "simple examples" here and there in the doc to better understand the different combinations of settings and GUI tick's. But they have so many tousand pages of doc, we will see what has changed with 4.3

To get COMSOL refining the mesh, you have the "auto-refine" during the solver process, I havent tried it really in V4, as I was not to happy with the convergence speed in 3.5, at least not for my structural. But it's true that they have also improved the algorithm and the slope of the norm to get COMSOL to concentrate on higher gradient regions

For the mesh I usually start "normal" then check my gradients and refine by hand, except when I have known region, I do a lot of structural with compliant mechanisms, which means easily 1:1000 shape ratios all over. I then cut by thin blade regions along the neutral line and around 2/3 or the cord when converging into the bulk parts (I do this in the CAD SW as multibody parts) then I mesh fine or extremely fine, and often tweak the custom settings, for these thin domains, and leave the rest coarser or just normal.

I can also say that something has changed in the order of preferences for use of "Size" in the meshing tree with v4.2a. Before when you applied a custom settings, the greyed values remained as default, so you changed only manually the critical ones, but now in 4.2a, you must check all items, otherwise COMSOL uses the default SIZE settings higher up in the tree, and the greyed values are just there to confuse you ;)

By the way I learned a lot by following the COMSOL advanced meshing training course, I found that one very useful, the other too by the way, but we have some good trainer here in CH and F

Last thing, I often use boundary mesh, also outside CFD, particularly in HT along boundaries between low and high alpha (heat diffusivity) regions, as you tend to have steep gradients perpedicular to these boundaries, particularly for transient analysis. But there are so many cases to consider ...

--
Good luck and have fun COMSOLing
Ivar
Hi interesting, by the way I'm a user like you, not from "COMSOL" ;) Obviously that means I have used COMSOL now so much that I start to behave as them then, puzzling. Indeed a couple of yeas ago, before the Forum, COMSOL had a few pages of tips and tricks in their journal, that has dissapeared sometimes before the user Forum appeared. And I too find the doc lack "simple examples" here and there in the doc to better understand the different combinations of settings and GUI tick's. But they have so many tousand pages of doc, we will see what has changed with 4.3 To get COMSOL refining the mesh, you have the "auto-refine" during the solver process, I havent tried it really in V4, as I was not to happy with the convergence speed in 3.5, at least not for my structural. But it's true that they have also improved the algorithm and the slope of the norm to get COMSOL to concentrate on higher gradient regions For the mesh I usually start "normal" then check my gradients and refine by hand, except when I have known region, I do a lot of structural with compliant mechanisms, which means easily 1:1000 shape ratios all over. I then cut by thin blade regions along the neutral line and around 2/3 or the cord when converging into the bulk parts (I do this in the CAD SW as multibody parts) then I mesh fine or extremely fine, and often tweak the custom settings, for these thin domains, and leave the rest coarser or just normal. I can also say that something has changed in the order of preferences for use of "Size" in the meshing tree with v4.2a. Before when you applied a custom settings, the greyed values remained as default, so you changed only manually the critical ones, but now in 4.2a, you must check all items, otherwise COMSOL uses the default SIZE settings higher up in the tree, and the greyed values are just there to confuse you ;) By the way I learned a lot by following the COMSOL advanced meshing training course, I found that one very useful, the other too by the way, but we have some good trainer here in CH and F Last thing, I often use boundary mesh, also outside CFD, particularly in HT along boundaries between low and high alpha (heat diffusivity) regions, as you tend to have steep gradients perpedicular to these boundaries, particularly for transient analysis. But there are so many cases to consider ... -- Good luck and have fun COMSOLing Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年5月10日 GMT-4 10:25
Thanks much. That's a useful comment. I will follow some of your advice.

I'm glad you agree about the COMSOL docs. Most physics equations haven't changed
in 100 years, but the COMSOL GUI seems to change every month. I can imagine
their conflict, wanting to make improvements, but realizing that these improvements
will invalidate all their examples and docs.

I like the program and will try to contribute "tricks" to the forum
Thanks much. That's a useful comment. I will follow some of your advice. I'm glad you agree about the COMSOL docs. Most physics equations haven't changed in 100 years, but the COMSOL GUI seems to change every month. I can imagine their conflict, wanting to make improvements, but realizing that these improvements will invalidate all their examples and docs. I like the program and will try to contribute "tricks" to the forum

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年5月10日 GMT-4 10:46
I agree with Ivar. We spent good amount of time on meshing in Comsol workshop in Toronto and it was really helpful for me. I am not sure if some of the examples that we went through is in the website or not but one of them is "Fluid-structure interaction" and it gives you a good idea on moving mesh, how to use it, and how to generate it.
But still as Ivar said, its kinda an art. you should try different methods to find the best one.
I agree with Ivar. We spent good amount of time on meshing in Comsol workshop in Toronto and it was really helpful for me. I am not sure if some of the examples that we went through is in the website or not but one of them is "Fluid-structure interaction" and it gives you a good idea on moving mesh, how to use it, and how to generate it. But still as Ivar said, its kinda an art. you should try different methods to find the best one.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年5月10日 GMT-4 10:55
www.soft-hummingbird.com/Tutorial_Comsol_02_Tutorials.php?lang=en
Maybe it's useful for you.

It is a very simple tutorial. see 08.

08 Meshing - This tutorial shows how to mesh your geometry. Coarse mesh, fine mesh, mesh with maximum element size and distribution mesh are shown.
http://www.soft-hummingbird.com/Tutorial_Comsol_02_Tutorials.php?lang=en Maybe it's useful for you. It is a very simple tutorial. see 08. 08 Meshing - This tutorial shows how to mesh your geometry. Coarse mesh, fine mesh, mesh with maximum element size and distribution mesh are shown.

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 2012年5月11日 GMT-4 01:36
Hi

I agree that the equations havent changed, but there are different notations, and a full tensor development as used by COMSOL is far from trivial, and I have really found it only lately in some new books. Furthermore there are many conventions so I find the COMSOL equations good to have to be sure you get the indices right.

One exmple PZT physics, the convention for the elasticity matrix is following the IEEE rule, different from traditional structural "rules".

What COMSOL manages is to unify physics, in a new way, you start to see that there is in fact no real differennce betwene HT and chemical diffusion, or fluid and structural, apart from the Euler or Lagrangian view point of view ...

--
Good luck
Ivar
Hi I agree that the equations havent changed, but there are different notations, and a full tensor development as used by COMSOL is far from trivial, and I have really found it only lately in some new books. Furthermore there are many conventions so I find the COMSOL equations good to have to be sure you get the indices right. One exmple PZT physics, the convention for the elasticity matrix is following the IEEE rule, different from traditional structural "rules". What COMSOL manages is to unify physics, in a new way, you start to see that there is in fact no real differennce betwene HT and chemical diffusion, or fluid and structural, apart from the Euler or Lagrangian view point of view ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年10月19日 GMT-4 19:42
Dear Bahar ,
About the model of "Fluid-structure interaction" in Comsol tutorials ( obstacle in fluid ) the dimensions were in microns . when I used the same model but made the dimensions in cm an error message appear " nonlinear solver did not converge " so do you have any suggestions ( may be different settings with large dimensions than microns?) .

waiting for your reply
thank you
Dear Bahar , About the model of "Fluid-structure interaction" in Comsol tutorials ( obstacle in fluid ) the dimensions were in microns . when I used the same model but made the dimensions in cm an error message appear " nonlinear solver did not converge " so do you have any suggestions ( may be different settings with large dimensions than microns?) . waiting for your reply thank you

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年10月23日 GMT-4 15:45
Hi
I am not sure If I undrestand your problem correctly. So you use the same model (but changed the dimensions to cm) while using the same meshing strategy (as in tutorial)?
Because I usually receive that error if the meshing is too big. If this is your case, have you tried smaller mesh?

Best
Bahar



Dear Bahar ,
About the model of "Fluid-structure interaction" in Comsol tutorials ( obstacle in fluid ) the dimensions were in microns . when I used the same model but made the dimensions in cm an error message appear " nonlinear solver did not converge " so do you have any suggestions ( may be different settings with large dimensions than microns?) .

waiting for your reply
thank you


Hi I am not sure If I undrestand your problem correctly. So you use the same model (but changed the dimensions to cm) while using the same meshing strategy (as in tutorial)? Because I usually receive that error if the meshing is too big. If this is your case, have you tried smaller mesh? Best Bahar [QUOTE] Dear Bahar , About the model of "Fluid-structure interaction" in Comsol tutorials ( obstacle in fluid ) the dimensions were in microns . when I used the same model but made the dimensions in cm an error message appear " nonlinear solver did not converge " so do you have any suggestions ( may be different settings with large dimensions than microns?) . waiting for your reply thank you [/QUOTE]

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.