CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] GmshToFoam (https://www.cfd-online.com/Forums/openfoam-meshing/234882-gmshtofoam.html)

zile96 March 22, 2021 13:20

GmshToFoam
 
Hi everyone :)
I have a problem with conversion of Gmsh mesh to OpenFoam. GmshToFoam utility read physical names, points and cells form .msh file, but when generate "constant folder", there is no patches generated for every physical surface. There is only default patch0.

nasa55 March 25, 2021 05:43

Quote:

Originally Posted by zile96 (Post 799533)
Hi everyone :)
I have a problem with conversion of Gmsh mesh to OpenFoam. GmshToFoam utility read physical names, points and cells form .msh file, but when generate "constant folder", there is no patches generated for every physical surface. There is only default patch0.


Have you specified both Physical Surface and Physical Volume for your geometry?

nasa55 March 25, 2021 05:52

Quote:

Originally Posted by zile96 (Post 799533)
Hi everyone :)
I have a problem with conversion of Gmsh mesh to OpenFoam. GmshToFoam utility read physical names, points and cells form .msh file, but when generate "constant folder", there is no patches generated for every physical surface. There is only default patch0.


Have you tried with a different version of Gmsh? My experience is different from version to version and I suggest follow the tutorials in each version and don't mix them up.

zile96 March 25, 2021 05:54

Yes, I did. I found the problem. For some reason, when I export .msh file, every element is assigned to physical group 0. That is why gmshToFoam makes one boundary condition.
Anyway, i found solution in exporting to .neu format from Gmsh, and then, with gambitToFoam conversion is done perfectly :)

wa$$im March 27, 2021 05:58

I am glad you solved your problem.
But there is a much straighfoward way to do it.

Try specifying the physical groupements as nasa55 said. But verify you specified them well in tools->visibility before exporting the mesh.

This will certainly do it.

Regards.


All times are GMT -4. The time now is 10:07.