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 error (https://www.cfd-online.com/Forums/openfoam-meshing/173915-gmshtofoam-error.html)

afshinb June 29, 2016 18:41

gmshToFoam error
 
1 Attachment(s)
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)

alexeym June 29, 2016 19:00

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.

afshinb June 30, 2016 07:49

this is the original file.
https://www.dropbox.com/s/n2xn2pyspt...itled.msh?dl=0

alexeym June 30, 2016 08:10

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 June 30, 2016 12:08

Quote:

Originally Posted by alexeym (Post 607414)
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

Marina PA October 10, 2019 15:21

command not found
 
Hi,
How can I solve the next problem with gmsh:
gmshToFoam command not found


All times are GMT -4. The time now is 02:32.