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

[Gmsh] gmshToFoam wrong token type - expected word error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 31, 2019, 16:00
Angry gmshToFoam wrong token type - expected word error
  #1
New Member
 
TheOneBird
Join Date: Apr 2016
Posts: 8
Rep Power: 6
TheOneBird is on a distinguished road
I am trying to convert a gmsh file to foam using the gmshToFoam utility. When I run the command I receive the following error:

Code:
--> FOAM FATAL IO ERROR: 
wrong token type - expected word, found on line 0 the variable $MeshFormat

file: IStringStream.sourceFile at line 0.

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

FOAM exiting
The gmsh file be found here: https://gofile.io/?c=I77hRb

Also, the start of the gmsh file is as follows:

Code:
$MeshFormat
2.2 0 8
$EndMeshFormat
$PhysicalNames
21
3 1 "mesh"
2 2 "b2-periodic_1deg"
2 3 "b3-periodic_1deg"
2 4 "b4-periodic_1deg"
2 5 "b5-periodic_1deg"
2 6 "b6-periodic_1deg"
2 7 "b7-periodic_1deg"
2 8 "b8-subsonic_inflow_pt"
2 9 "b9-farfield_riem"
2 10 "b10-viscous_solid"
2 11 "b11-back_pressure"
2 12 "b12-singular_axis"
2 13 "b13-viscous_solid"
2 14 "b14-singular_axis"
2 15 "b15-viscous_solid"
2 16 "b16-farfield_riem"
2 17 "b17-farfield_riem"
2 18 "b18-to-stitch-a"
2 19 "b19-to-stitch-b"
2 20 "b20-to-stitch-a"
2 21 "b21-to-stitch-b"
$EndPhysicalNames
$Nodes
36994
1 -7.7389998436000e+00 0.0000000000000e+00 0.0000000000000e+00
2 -7.7390034604200e+00 9.5725001104946e-05 1.0968998657738e-02
3 -7.7390078108300e+00 2.1736027395078e-04 2.4907020378070e-02
Some help on this would be fantastic. Thanks!
TheOneBird is offline   Reply With Quote

Old   December 31, 2019, 16:25
Default
  #2
Member
 
Join Date: Mar 2014
Posts: 78
Rep Power: 8
mzzmrt is on a distinguished road
I have imported your file via gmshToFoam with OpenFOAM 4.1 in Linux and no problem with the .msh file.


Here is the result:


https://ibb.co/TYjVyPv
mzzmrt is offline   Reply With Quote

Old   December 31, 2019, 16:35
Default
  #3
New Member
 
TheOneBird
Join Date: Apr 2016
Posts: 8
Rep Power: 6
TheOneBird is on a distinguished road
Thanks for the quick reply mzzmrt.

Well that is certainly strange... I might have to change my OpenFOAM version to fix this. I am using OpenFOAM-dev (current version). If it is not too much of a problem, is there any chance you could upload the files/directory of the result of the gmshToFoam?
[edit]: I have fixed it by installing OpenFOAM5 additionally to OpenFOAM-dev. Thanks again!

Thank you heaps!
TheOneBird is offline   Reply With Quote

Old   December 31, 2019, 16:53
Default
  #4
Member
 
Join Date: Mar 2014
Posts: 78
Rep Power: 8
mzzmrt is on a distinguished road
Here it is:


https://gofile.io/?c=guCFkj
mzzmrt is offline   Reply With Quote

Reply

Tags
gmshtofoam problem, openfoam 1806

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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 20:48
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 05:49.