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 alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2016, 17:41
Default gmshToFoam error
  #1
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 7
afshinb is on a distinguished road
Hi

I'm trying to mesh a sphere with hexahedron grids.
I used a Gmsh code found in this forum to do so. using gmshToFoam to convert the mesh gives me this error:
Code:
--> FOAM FATAL IO ERROR: 
wrong token type - expected word, found on line 0 the label 1

file: IStringStream.sourceFile at line 0.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting
what is wrong here?
you can find the mesh file in attachment. (I had to remove some lines some where in the middle of .msh file to keep it under 195kB for the attachment limit)
Attached Files
File Type: zip untitled.zip (148.9 KB, 13 views)
afshinb is offline   Reply With Quote

Old   June 29, 2016, 18:00
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,887
Rep Power: 34
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Since error is caused by your original file, there is no use in the file with "some lines some where in the middle" of the file. Please post your original file.

And since your untitled.msh is something LEGALLY generated by LEGALLY acquired Gmsh, you can try to use, for example, Dropbox to host your file.

UPD. Anyway, you are generating this msh file from geo file, post your geo file. It is weights much less than msh.
alexeym is offline   Reply With Quote

Old   June 30, 2016, 06:49
Default
  #3
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 7
afshinb is on a distinguished road
this is the original file.
https://www.dropbox.com/s/n2xn2pyspt...itled.msh?dl=0
afshinb is offline   Reply With Quote

Old   June 30, 2016, 07:10
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,887
Rep Power: 34
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
And where is the header of the file? In general Gmsh file starts with:

Code:
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
<number of nodes in the file>
...
Since it is absent, you get your error.
afshinb likes this.
alexeym is offline   Reply With Quote

Old   June 30, 2016, 11:08
Default
  #5
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 7
afshinb is on a distinguished road
Quote:
Originally Posted by alexeym View Post
And where is the header of the file? In general Gmsh file starts with:

Code:
$MeshFormat
2.2 0 8
$EndMeshFormat
$Nodes
<number of nodes in the file>
...
Since it is absent, you get your error.
yes
that solved the problem.
Thanks
afshinb is offline   Reply With Quote

Old   October 10, 2019, 14:21
Default command not found
  #6
New Member
 
Marina
Join Date: Sep 2019
Posts: 2
Rep Power: 0
Marina PA is on a distinguished road
Hi,
How can I solve the next problem with gmsh:
gmshToFoam command not found
Marina PA is offline   Reply With Quote

Reply

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 On
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 12:02.