CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Gmsh 4 compatibility with gmshToFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2019, 15:04
Default Gmsh 4 compatibility with gmshToFoam
  #1
New Member
 
Gavin Ridley
Join Date: Jan 2019
Location: Tennessee, USA
Posts: 25
Rep Power: 7
gridley2 is on a distinguished road
Hello all,


Gmsh 4 has some nice new capabilities like meshing around STL and constructive solid geometry capability. I'm attempting to test importing this to an OpenFOAM mesh, but it seems some incompatibility exists between the gmsh file and gmshToFoam.


In particular, gmshToFoam returns:


Quote:
Create time

Starting to read mesh format at line 2
Read format version 4 ascii 0

Starting to read physical names at line 5
Physical names:5
Surface 1 walls
Surface 2 inlet
Surface 3 outlet
Surface 4 dingding
Volume 5 inside

Skipping tag $Entities at line 13
Starting to read points at line 45
Vertices to be read:28
Vertices read:19


--> FOAM FATAL IO ERROR:
Wrong token type - expected word, found on line 0: label 20

file: input at line 0.

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

FOAM exiting

This looks to me like Gmsh 4 has a slightly different ASCII .msh format from what gmshToFoam is used to. If it helps, my gmsh input which runs fine is:


Code:
SetFactory("OpenCASCADE");
Box(1) = {-10,-20,-10, 49,100,60};
Delete { Volume{1}; }

SetFactory("Built-in");
Merge "dingding.stl";
Surface Loop(1) = {1,2,3,4,5,6};
Surface Loop(2) = {7};
Volume(9) = {2};
Volume(10) = {2,1};
Physical Surface("walls") = {6, 1, 2, 5};
Physical Surface("inlet") = {3};
Physical Surface("outlet") = {4};
Physical Surface("dingding") = {7};
Physical Volume("inside") = {10};
Mesh.CharacteristicLengthMax = 1;

Maybe this has to do with the fact that the gmsh mesh is created from meshing an STL surface. Regardless, it's not like the .msh file references the .stl or anything like that.


Has anyone seen a message like this before? Otherwise I'll report it as a bug, I suppose.
gridley2 is offline   Reply With Quote

Old   January 14, 2019, 14:06
Default
  #2
New Member
 
Gavin Ridley
Join Date: Jan 2019
Location: Tennessee, USA
Posts: 25
Rep Power: 7
gridley2 is on a distinguished road
For anyone encountering this:


NVM, seems this is already reported on the openfoam-plus repository issue tracker.


https://develop.openfoam.com/Develop...us/issues/1155
gridley2 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
[Gmsh] gmshToFoam error depending on export format from Gmsh lyt7349 OpenFOAM Meshing & Mesh Conversion 3 October 15, 2020 01:06
[Gmsh] gmsh or gmshToFoam problem? Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 0 June 19, 2012 09:52
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
[Gmsh] gmshToFoam problem: not the same mesh in Gmsh vs. paraview zhernadi OpenFOAM Meshing & Mesh Conversion 8 July 7, 2011 03:28
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56


All times are GMT -4. The time now is 15:03.