Salome 9.16 update,
UNV format (ideasUnvToFoam): RECOMMENDED
Now had add the possibility to export pyramids in the UNV format. one can use this format for fast importation to OpenFOAM of hybrid meshes (ie., meshes with pyramids as transition layer between hexas and tetras, for example). nevertheless, the user needs to slight modify ideasUnvToFoam.C file, i made an issue in each of OF main branches, in hopes that this modficiation will go to the main, please check post which contains links to each of the issues to follow up, or download the .C directly to compile it by yourself.
NOTE: before exporting to UNV format, one should delete the 1D groups of the mesh, if not, current ideasUnvToFoam will (21/08/2026), for upstream versions of OF (.com and .org) it has been solved.
MSH format (gmshToFoam):
Now that gmsh is used directly to export gmsh format, one can export the mesh in Gmsh 2.2 format (the 4.1 reader from OF have some issues and it does not read binary format). and use gmshToFoam utility to import to OpenFOAM. gmsh, will create some extra face and volume zones that can be either ignored or remove it in OF after.
NOTE: before exporting to MSH 2.2 ascii format, one should delete 3D groups of the mesh, if not, due to a bug, gmsh will not export all the volumetric elements ie., cells inside the mesh, it will explicitly ignore the ones inside this groups. I created an issue in this regard. Also, worth noticing that the 1D groups of the mesh, which are problematic with the UNV workflow, here they will be simply ignored.