I've started this thread as a placeholder for discussion around meshing techniques. Often in this forum, there are discussions that include meshing tips that are not the point of the thread, and they get lost. I'd like to make one that is simply about meshing. Please consider taking this opportunity to share some of your best ideas around meshing!
I will be adding some posts to this thread with useful tips, but I want to first start with a few questions/comments of my own:
90% of our meshes come from using internal GMsh. Netgen has better density control options, but it often creates unnecessary refinement in random areas, and will often fail to mesh when GMsh works. I'd like to understand ways to make Netgen more reliable (better switches, CAD cleaning?) And have more local control over mesh density with GMsh(better use of the .geo file?). Both of these tools seem to have a lot more potential than I am leveraging.
As for external open source tet and hex meshers, I have not found many options that are truly usable. A lot of people seems to like Salome, but I have never found this tool to be as useful as people claim. Am I missing something here?
Comments
What I must recognise is that Salome procedures are a very cumbersomes (the fact that you must extract any surface or edge before using it), or worst and terrible, it has a big bug that very often doesen't allow to save the Salome file (the mesh can be exported but the Salome file cannot be saved). Still, is a very valuable tool for me.
I have found Salome to be bloated(GBs to install!) and a bit crashy. Whenever I see YouTube examples, they take 20minutes/many steps to do something I can do much more easily with internal options. Again, it would be great to understand what I am missing!
Parts with a single thickness (like sheet metal) can be meshed with hex solids by first meshing quad shells, selecting one surface, and extruding through thickness. These models are usually smaller and better quality. Example below: 38K tets, 22K hex
i believe i tried salome once based on sergio's posts. but i too did not like it for the same reasons you mentioned. i have tried gmsh many times but have not liked it. it was crashing a lot. the latest version hasn't crashed on me but i can't get decent results out of it.
for netgen, make sure to figure out ahead of time what the minimum feature size you have is. then in the mesh options setting make sure to change the 0 value for min mesh size to some value that makes sense. i have found leaving that value at 0 is what causes netgen to crash. so if you have a .5mm fillet. and you have 3 elements per curvature radius, then a min mesh size of 0.1mm would be fine. one thing is they don't list any units anywhere. so by trial and error i have found those inputs to be in your model size.
the default max mesh size of 1000 is usually way to big. so you would want to experiment with decreasing that value. if you switch from the default of moderate to fine, it sets up the other parameters pretty well. there is now a parallel meshing option too. that speeds it up nicely. you can open the quality plot before you mesh and as it optimizes the volume you can see the mesh improve.
i have a video of all this here (the video has english audio); https://youtube.com/watch?v=-kJIRckXQnQ&list=PLzGiietqAECXpRqrZ4syn7iGQiLbquLGD&index=3&t=0s
the only quad/hex meshing i have done is of midplane models. so you seem to already know more about that than i do. sergio is really good with those too.
last thing is to make sure and check the volume of your model before you get to far along. it's easy to have conversion problems. so if every edge is off by a factor of a 1000 your volume can be off by a factor of a billion.
1) Be carefull while modeling, keep radius constant and realistics, better to model as surface and then add the thikness to check that also the mesh could be extruded
2) In CAD add extra face divisions to get mapeable surfaces (four sides) were is needed
3) When the part is imported in Salome, first extract (Explode) all the surfaces of one side of the part, and after extract all the edges of this surfaces (yep, a lot of Explode operations)
4) For meshin faces with four sides, i found that the algorithm "Quadrangle: Medial Axis Projection" is the most that I use. I have found that sometimes for curved sides the node distribution is not 100% equidistant, so I made a submesh for forcing this equidistant distribution (and be able to combine with the adjacent face)
5) Is possible to combine (adding a 1D submesh with algorithm Composite Side Discretization) some sides of a surface to get a mapeable one, like in the main vertical surface of the example
6) Be prepared to go back to CAD and add new divisions as you found at the middle or finishing that you cannot follow without that.
Best regards, and have a nice (mapped) meshing weekend!
Often we have a model "all set up" and then we want to look at the effect of tolerance or what impact a small modification might make. In these cases, try this:
1- Read in STL shells of the modified geometry
2- Select project_from and project_to surfaces
3- Use Lab feature "Project onto surface"
4- Delete STL, run model
This can make quick work out of subtle changes without the need to re-mesh and set up boundary conditions. It is advisable to temporarily switch projecting elements to lower order, and then switch back after projection, but this goes quickly.
hopefully this may be of use to some people
I've been trying to produce hexa meshes for vessel nozzles & finally got good results
modelled and split in freecad fixed, if required, in salome then meshed in salome
geometry split into 4 sided areas (plus inside & outside surfaces)
then meshed 3d hexa, 2d quadrangle mapping, 1 d wire No of segments
sub mesh using a wire the thickness of the item No of segments (4 in the examples) plus
additional hypothesis propogation on opposite edges
examples are split cylinder + nozzle, split head + nozzle & tangential nozzle (this only shell elements)
I include salome tree showing typical meshing technique
imported into mecway as UNVs.
let me know if freecad or step fles are helpfull