|
[Sponsors] |
[Gmsh] Error converting Gmsh mesh to OpenFOAM format |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 8, 2009, 10:16 |
Error converting Gmsh mesh to OpenFOAM format
|
#1 |
New Member
Martin Vymazal
Join Date: Dec 2009
Posts: 16
Rep Power: 17 |
Dear OpenFOAM users,
I've been using gmsh for some time now and I'm very happy with this grid generator. I'd also like to work with OpenFOAM, but I'm not able to convert a simple mesh (cube with all faces defined as physical in my geo file) using gmsh2ToFoam. I went through the forum, followed some advices but nothing helped me to solve my problem. The error message I get is this: --> FOAM Warning : From function polyMesh: polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577 Found 136 undefined faces in mesh; adding to default patch. I'm not sure if the problem is caused by the msh file created by gmsh or if my testcase which I use for conversion is missing some important information. One thing I'm particularly uncertain about is whether the orientation of the faces of the cube matters or not (should all face normals point outside the cube, for example?). Could anyone please be so kind and either give me a hint or provide me with some conversion testcase which works (can be a very simple one)? I'm using OpenFOAM 1.6 and gmsh 2.4.2. The complete output of OpenFOAM and the whole case directory are attached. Thank you very much Martin Vymazal P.S. I hade to remove Cube.msh from the attached folder ConversionTest.tar.gz because the size of attachments is limited. However, the msh file can be reproduced by running 'gmsh -3 Cube.geo'. The file Cube.geo is included. Last edited by Martin_; December 8, 2009 at 15:24. |
|
December 9, 2009, 07:43 |
|
#2 |
Member
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 45
Rep Power: 17 |
Hello Martin,
upgrade to OpenFOAM-1.6.x, it includes a fix for gmsh >= 2.4 format, or downgrade to gmsh 2.3. Regards, Etienne. http://www.cfd-online.com/Forums/ope...-x-import.html |
|
December 9, 2009, 08:53 |
|
#3 |
New Member
Martin Vymazal
Join Date: Dec 2009
Posts: 16
Rep Power: 17 |
Hello Etienne,
thank you for the reply. I was not exact in my previous post. I have OpenFOAM 1.6.x and I'm already using your fix (thanks for it). I tried to generate the mesh with Gmsh 2.2 and with Gmsh 2.3 and in both cases, the error remains the same. I tried both the legacy ('version 1') format of msh files and the version 2 format. The only difference is that when I use the old format, I have 150 undefined faces in mesh, while with version 2 format, I have 156 undefined faces. As a first step, I'd like to know if the problem is with my installation of OpenFOAM or if it is caused by the gmsh file. Could you please be so kind and provide me (even with a very simple) gmsh file that works for you? Best regards, Martin Vymazal |
|
December 9, 2009, 10:35 |
|
#4 |
Member
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 45
Rep Power: 17 |
Hi again,
it's just a warning, I've never searched the reason of the warning, but it's not fatal, don't care about it. I've already used many gmsh meshes (I only use version 2 format since a long time) showing this warning without any problem. I've tried your mesh file (with gmsh dev version), and I'm also getting this warning, but the mesh is valid, run checkMesh on your case. The only warning you will get with your mesh concerns non orthogonal faces. It's due to your non structured tetrahedral mesh which is not recommanded for CFD. You should use a structured hexahedral mesh (in gmsh, just do a simple square and mesh it using transfinite and recombine functionalities, then extrude it and recombine to get a structured hex meshed cube). But in any case, your mesh is valid after conversion. You can also check that the defaultFaces patch (the one concerned by the warning) contains 0 faces (you can edit constant/polyMesh/boundary to check it). Regards, Etienne. edit: why are you using gmsh2ToFoam? Just use the standard gmshToFoam utility provided in OF-1.6.x. |
|
Tags |
converter, gmsh, gmsh2tofoam, msh, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Automated ANSYS mesh export in ASCII (OpenFOAM) format | siny | ANSYS Meshing & Geometry | 1 | January 17, 2020 10:17 |
[Technical] How to convert Corner-grid format to OpenFOAM mesh | ELwardi | OpenFOAM Meshing & Mesh Conversion | 0 | April 20, 2019 13:05 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
To convert Mesh from OpenFoam to GMSH | gara1988 | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:43 |
[Gmsh] gmshToFoam problem: not the same mesh in Gmsh vs. paraview | zhernadi | OpenFOAM Meshing & Mesh Conversion | 8 | July 7, 2011 03:28 |