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 Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2016, 18:41
Default gmshToFoam error
  #1
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 12
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, 19 views)
afshinb is offline   Reply With Quote

Old   June 29, 2016, 19:00
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
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, 07:49
Default
  #3
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 12
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, 08:10
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
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, 12:08
Default
  #5
New Member
 
Afshin Bakhshi
Join Date: Mar 2014
Posts: 13
Rep Power: 12
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, 15:21
Default command not found
  #6
New Member
 
Marina
Join Date: Sep 2019
Posts: 6
Rep Power: 7
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

Old   November 27, 2019, 09:50
Default gmshToFoam error
  #7
New Member
 
Naveen Crasta
Join Date: Nov 2019
Location: Sweden
Posts: 1
Rep Power: 0
ncrasta is on a distinguished road
Hi foamers,
I also get the following error with gmshToFom command. What could be the possible reasons?



Thanks,
Naveen



// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::UPtrList<Foam:olyPatch>:perator[](int) const in "/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
#4 ? in "/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
#5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6 ? in "/opt/openfoam-dev/platforms/linux64GccDPInt32Opt/bin/gmshToFoam"
Segmentation fault (core dumped)
ncrasta is offline   Reply With Quote

Old   July 23, 2024, 13:42
Default
  #8
New Member
 
M. Hosein Aliyoldashi
Join Date: Dec 2023
Location: Montreal
Posts: 1
Rep Power: 0
mh.aliyoldashi is on a distinguished road
I also get similar error! It has been a while I am having issues with converting just a simple box geometry discretized in Gmsh. It is so much annoying to get stuck at this stage!

Update: I just solved the issue, just keep the boxes unchecked when exporting Gmsh 2 ascii. (I mean, "Save all elements" and "save parametric coordinates")
mh.aliyoldashi is offline   Reply With Quote

Reply


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 07:35
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 21:30
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24


All times are GMT -4. The time now is 10:13.