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] GMSH to OpenFOAM file conversion error (GmshToFoam) (https://www.cfd-online.com/Forums/openfoam-meshing/210243-gmsh-openfoam-file-conversion-error-gmshtofoam.html)

Nikhil Bollimuntha October 27, 2018 14:10

GMSH to OpenFOAM file conversion error (GmshToFoam)
 
Hi,
https://drive.google.com/open?id=1I1...hBKktvUO2F89g8

I have imported a step file into Gmsh and meshed it and also defined the boundary surfaces as shown above. I saved the file as a .msh file and tried to use the gmshToFoam to convert this msh file to OpenFOAM format. The following error occurs:

https://drive.google.com/open?id=1mS...ma1etcZJlYIKrw

Really grateful for the help.

Regards.

openfoamtutorials November 24, 2018 23:12

I cannot see your error in the linked images (probably best to post it as text), but I think I know what the problem is, as I have solved it myself.

If you are using the newer version of Gmsh (e.g. 4.0+), the default export format for .msh files has changed. However, OpenFOAM's gmshToFoam expects the "legacy" "Version 2" format. You can export your meshes in the legacy format by adding the "-format msh2" flag (if you are exporting by command line), or by selecting Version 2 format when you attempt to export in the GUI via File > Export > ...

Hope this helps!

Nikhil Bollimuntha November 25, 2018 11:35

Hi, I did save it as ascii-2 format but that isn't the problem, there seems to be something else. I updated the drive links so you can see the error (unable to post the text for some reason, please see if you can fix it).

Regards,
Nikhil

openfoamtutorials November 26, 2018 00:19

If I remember correctly, that is the exact error you get for using V4 format, when gmshToFoam expects V2. How are you exporting V2 format?

Akshay_11235 May 18, 2019 08:29

Solution
 
Hello,


I had a similar issue and exporting using "export" Version 1 solved the problem for me.


All times are GMT -4. The time now is 21:12.