CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] GMSH to OpenFOAM file conversion error (GmshToFoam)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2018, 15:10
Default GMSH to OpenFOAM file conversion error (GmshToFoam)
  #1
New Member
 
Nikhil Bollimuntha
Join Date: Oct 2018
Posts: 11
Rep Power: 8
Nikhil Bollimuntha is on a distinguished road
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.

Last edited by Nikhil Bollimuntha; November 25, 2018 at 12:33.
Nikhil Bollimuntha is offline   Reply With Quote

Old   November 25, 2018, 00:12
Default
  #2
New Member
 
Robert
Join Date: Nov 2018
Posts: 8
Rep Power: 8
openfoamtutorials is on a distinguished road
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!
openfoamtutorials is offline   Reply With Quote

Old   November 25, 2018, 12:35
Default
  #3
New Member
 
Nikhil Bollimuntha
Join Date: Oct 2018
Posts: 11
Rep Power: 8
Nikhil Bollimuntha is on a distinguished road
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
Nikhil Bollimuntha is offline   Reply With Quote

Old   November 26, 2018, 01:19
Default
  #4
New Member
 
Robert
Join Date: Nov 2018
Posts: 8
Rep Power: 8
openfoamtutorials is on a distinguished road
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?
openfoamtutorials is offline   Reply With Quote

Old   May 18, 2019, 09:29
Default Solution
  #5
Member
 
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 35
Rep Power: 11
Akshay_11235 is on a distinguished road
Hello,


I had a similar issue and exporting using "export" Version 1 solved the problem for me.
Akshay_11235 is offline   Reply With Quote

Reply

Tags
error, gmsh, meshing, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 15:30
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 08:48.