|
[Sponsors] |
November 15, 2018, 11:13 |
New version of gmshToFoam?
|
#1 |
New Member
Sina Tootoonian
Join Date: Nov 2018
Posts: 3
Rep Power: 7 |
Hi folks,
I'm running OpenFoam-6 and gmsh 4.0.4 on macOS High Sierra. My question: Is there a version of gmshToFoam that supports the latest .msh format generated by the latest version of gmsh? Background: I've just started learning to mesh with gmsh with the aim of doing some simple simulations in OpenFoam. I followed some simple gmsh tutorials such as https://www.youtube.com/watch?v=C_sCHpLaz3Y and generated some very simple meshes. However whenever I tried to run gmshToFoam, I'd get the following fatal IOError: --> FOAM FATAL IO ERROR: wrong token type - expected word, found on line 0 the label 18 I managed to track this down to the format of the .msh file generated by gmsh. The latest version of gmsh (4.0.4) uses a format in which e.g. the size of the $Nodes block is set with two numbers, such as $Nodes 27 1331 ... whereas the .msh files generated by older versions of gmsh (such as 2.9.3 used in the youtube tutorial above) specify $Nodes as $Nodes 1331 ... This older .msh format seems to be what the latest version of gmshToFoam is expecting, as I was able to run it successfully on the .msh file generated by the old gmsh version. Is there a version of gmshToFoam that supports the latest .msh formats? Thanks for your help, Sina |
|
November 16, 2018, 07:38 |
|
#2 |
New Member
Sina Tootoonian
Join Date: Nov 2018
Posts: 3
Rep Power: 7 |
SOLVED: There doesn't appear to be a version of gmshToFoam that supports the new .msh format, but there is an option in the latest gmsh to export to the old .msh format: File > Export > *.msh > Version 2 ASCII.
|
|
November 24, 2018, 20:47 |
|
#3 |
New Member
Robert
Join Date: Nov 2018
Posts: 8
Rep Power: 7 |
Hi, author of the linked tutorial video here. Thanks for making a post about this! You can also specify the old format (until gmshToFoam is updated) in the command line via "gmsh ... -format msh2". I will be using this in all of my future videos!
|
|
January 26, 2019, 06:56 |
gmsh to OpenFoam v1812
|
#4 |
New Member
Tom Alderweireldt
Join Date: Jan 2015
Location: Schilde, Belgium
Posts: 16
Rep Power: 11 |
Thanks Stootoon,
I ran in exactly the same 'gmshToFoam' FATAL ERROR issue, with a recently build mesh with gmsh 4.0.7. When I regenerated the mesh with an older gmsh 2.10 version, the problem disappeared. Many thanks for locating this issue !! |
|
February 13, 2019, 17:25 |
Foam Error bad token, expecting a word
|
#5 |
New Member
Tom Alderweireldt
Join Date: Jan 2015
Location: Schilde, Belgium
Posts: 16
Rep Power: 11 |
In my cases, I found out by just editing the .msh files obtained and adding a line with '$End' just to give it a word it was expecting, made it perfectly happy !!
I could convert any .msh file with this added '$end' line with gmshToFoam into Foam, ParaFoam didn't seem to have any issue. Hope this helps, Tom. |
|
April 17, 2019, 13:19 |
error in paraview after calculation
|
#6 | |
Member
Dokeun, Hwang
Join Date: Apr 2010
Location: Korea, Republic of
Posts: 98
Rep Power: 16 |
Quote:
I converted Gmsh ver2 file successfully and ran the icoFoam from cavity. But I got an error message from paraview when I load the result. It tells some problem about discordance of face number and I and stuck there. The error is as below. ERROR: In /Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6876 vtkOpenFOAMReaderPrivate (0x7f9f900ad050): The end face number 309 of patch top is not consistent with the start face number 280 of patch bottom ERROR: In /Users/kitware/dashboards/buildbot-slave/8275bd07/build/superbuild/paraview/src/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 782 vtkPVCompositeDataPipeline (0x600001d097a0): Algorithm vtkPOpenFOAMReader(0x7f9f90097060) returned failure for request: vtkInformation (0x600027bdbac0) Debug: Off Modified Time: 4803293 Reference Count: 1 Registered Events: (none) Request: REQUEST_DATA FROM_OUTPUT_PORT: 0 ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 ---------- and here is my case set. Does it have relevance to converting stuff? It was because boundary file I changed physicalType as below back { type empty; physicalType empty; nFaces 100; startFace 180; } bottom { type wall; physicalType wall; nFaces 10; startFace 280; } right { type wall; physicalType wall; nFaces 10; startFace 290; } top { type zeroGradient; physicalType zeroGradient; nFaces 10; startFace 300; } left { type wall; physicalType wall; nFaces 10; startFace 310; } front { type empty; physicalType empty; nFaces 100; startFace 320; } from zipped file. |
||
May 23, 2019, 11:32 |
|
#7 | |
New Member
Abbasi Maaz
Join Date: Oct 2018
Location: Germany
Posts: 3
Rep Power: 7 |
Quote:
|
||
February 14, 2022, 09:01 |
Update :)
|
#8 |
Member
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7 |
I dunno why but this is what's happening with two versions of OpenFOAM in macOS Monterey, arm64 M1Pro:
I could visualise it with paraFoam. So, with version 2 ascii .msh exported from Gmsh, gmshToFoam command is working in OpenFOAM-9 but not with v-2106. Haven't figured out how to specify the boundary conditions yet, but that's the topic of another post! gmshToFoam.jpg |
|
Tags |
gmsh, gmshtofoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Multiple version of ParaView | Pavel Rodin | ParaView | 1 | October 13, 2017 10:21 |
How can i uninstall new version of OF | shipman | OpenFOAM Installation | 5 | August 12, 2013 04:01 |
version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found | ovie | Main CFD Forum | 1 | April 19, 2010 14:00 |
[OpenFOAM] Problem with paraFoam on a linux-64 bit | bunni | ParaView | 4 | April 14, 2010 20:55 |
Version 12 speed compared to 11 | maka | OpenFOAM Running, Solving & CFD | 2 | December 21, 2005 05:42 |