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

[Gmsh] gmshToFoam Error

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Mugen996

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2020, 11:28
Default gmshToFoam Error
  #1
New Member
 
Nathan
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Mugen996 is on a distinguished road
When running gmshToFoam airfoil.msh I get the following error.





```
--> FOAM FATAL IO ERROR:
Attempt to get back from bad stream

file: IStringStream.sourceFile at line 0.

From function bool Foam::Istream::getBack(Foam::token&)
in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting
```


First few lines of airfoil.msh


```
$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
8
2 1 "back"
2 2 "front"
2 3 "top"
2 4 "exit"
2 5 "bottom"
2 6 "inlet"
2 7 "aerofoil"
3 8 "internal"
$EndPhysicalNames
$Entities
158 15 7 1
1000 1 0.00224 0 0
1001 0.98935 0.00357 0 0
1002 0.9593699999999999 0.0076 0 0
1003 0.92939 0.01203 0 0

```





I'm running OpenFoam 5 with gmsh 4.5.4.


Does anyone know a solution to this?
Mugen996 is offline   Reply With Quote

Old   March 16, 2020, 07:10
Default Solution
  #2
New Member
 
Nathan
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Mugen996 is on a distinguished road
So turns out this is a file formatting issue between gmsh and gmshToFoam. To fix you need to convert the output of your meshing to msh2.


In my case it I had to change $ gmsh airfoil.geo -3 -o airfoil.msh > /dev/nul to gmsh airfoil.geo -3 -o airfoil.msh -format msh2 > /dev/nul
takahisa likes this.
Mugen996 is offline   Reply With Quote

Reply

Tags
fatal error, gmsh 4.5.4, gmshtofoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 20:30
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24


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