|
[Sponsors] |
[Gmsh] gmshToFOAM: Found undefined faces in mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 30, 2014, 17:32 |
gmshToFOAM: Found undefined faces in mesh
|
#1 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
I am having some trouble with gmshToFOAM. So far the OpenFOAM "cavity" tutorial with the blockMesh utility works fine. Now I would like to solve the "cavity" problem using an unstructured mesh created by Gmesh:
Code:
lc = 0.01; tc = 0.001; // top corners bc = 0.0025; // bottom corners Point(1) = { 0, 0, 0, lc }; Point(2) = { 0.05, 0, 0, lc }; Point(3) = { 0.1, 0, 0, lc }; Point(4) = { 0.1, 0.05, 0, lc }; Point(5) = { 0.1, 0.1, 0, tc }; Point(6) = { 0.05, 0.1, 0, lc }; Point(7) = { 0, 0.1, 0, tc }; Point(8) = { 0, 0.05, 0, lc }; Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,5}; Line(5) = {5,6}; Line(6) = {6,7}; Line(7) = {7,8}; Line(8) = {8,1}; Line Loop (9) = {1:8}; Plane Surface(1) = {9}; Extrude {0, 0, 0.1} { Surface{1}; Layers{1}; Recombine; } Physical Surface("front") = {46,50}; Physical Surface("back") = {34,30}; Physical Surface("bottom") = {22,26}; Physical Surface("left") = {1}; Physical Surface("top") = {42,38}; Physical Surface("right") = {51}; Physical Volume("internal") = {1}; Mesh 3; Save "cavity.msh"; Code:
$ gmshToFoam cavity.msh ... Create time Starting to read mesh format at line 2 Read format version 2.2 ascii 0 Starting to read physical names at line 5 Physical names:7 Surface 1 front Surface 2 back Surface 3 bottom Surface 4 left Surface 5 top Surface 6 right Volume 7 internal Starting to read points at line 15 Vertices to be read:652 Vertices read:652 Starting to read cells at line 670 Cells to be read:1806 Mapping region 4 to Foam patch 0 Mapping region 6 to Foam patch 1 Mapping region 3 to Foam patch 2 Mapping region 2 to Foam patch 3 Mapping region 5 to Foam patch 4 Mapping region 1 to Foam patch 5 Mapping region 7 to Foam cellZone 0 Cells: total:578 hex :0 prism:578 pyr :0 tet :0 CellZones: Zone Size 0 578 Skipping tag at line 2479 Patch 0 gets name left Patch 1 gets name right Patch 2 gets name bottom Patch 3 gets name back Patch 4 gets name top Patch 5 gets name front --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627 Found 1228 undefined faces in mesh; adding to default patch. Finding faces of patch 0 Finding faces of patch 1 Finding faces of patch 2 Finding faces of patch 3 Finding faces of patch 4 Finding faces of patch 5 FaceZones: Zone Size Writing zone 0 to cellZone internal and cellSet End Code:
$ icoFoam Create time Create mesh for time = 0 Reading transportProperties Reading field p --> FOAM FATAL IO ERROR: Cannot find patchField entry for left file: ~/.../run/tutorials/incompressible/icoFoam/cavity/0/p.boundaryField from line 25 to line 35. From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&) in file ~/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 209. FOAM exiting |
|
December 1, 2014, 02:10 |
|
#2 |
Senior Member
|
Hi,
This Code:
--> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627 Found 1228 undefined faces in mesh; adding to default patch. Second error: add left patch description to p file in 0 folder. Here's the names of the patches in the cavity tutorial: Code:
boundaryField { movingWall { type zeroGradient; } fixedWalls { type zeroGradient; } frontAndBack { type empty; } } |
|
December 1, 2014, 07:00 |
|
#3 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Thanks for your quick reply! I made the following changes to the cavity.geo file but icoFOAM still not working
Code:
Physical Surface("fixedWalls") = {46, 50, 22, 26, 30, 34}; Physical Surface("frontAndBack") = {51, 1}; Physical Surface("movingWall") = {42, 38}; Code:
$ gmshToFoam cavity.msh ... Create time Starting to read mesh format at line 2 Read format version 2.2 ascii 0 Starting to read physical names at line 5 Physical names:4 Surface 1 fixedWalls Surface 2 frontAndBack Surface 3 movingWall Volume 4 internal Starting to read points at line 12 Vertices to be read:826 Vertices read:826 Starting to read cells at line 841 Cells to be read:2288 Mapping region 2 to Foam patch 0 Mapping region 1 to Foam patch 1 Mapping region 3 to Foam patch 2 Mapping region 4 to Foam cellZone 0 Cells: total:732 hex :0 prism:732 pyr :0 tet :0 CellZones: Zone Size 0 732 Skipping tag at line 3132 Patch 0 gets name frontAndBack Patch 1 gets name fixedWalls Patch 2 gets name movingWall --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627 Found 1556 undefined faces in mesh; adding to default patch. Finding faces of patch 0 Finding faces of patch 1 Finding faces of patch 2 FaceZones: Zone Size Writing zone 0 to cellZone internal and cellSet End Code:
Create time Create mesh for time = 0 Reading transportProperties Reading field p --> FOAM FATAL IO ERROR: patch type 'patch' not constraint type 'empty' for patch frontAndBack of field p in file "...cavity/gmsh/0/p" file: ~/.../cavity/gmsh/0/p.boundaryField.frontAndBack from line 35 to line 35. From function emptyFvPatchField<Type>::emptyFvPatchField ( const fvPatch& p, const Field<Type>& field, const dictionary& dict ) in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 100. FOAM exiting |
|
December 1, 2014, 07:16 |
|
#4 |
Senior Member
|
Hi,
Gmsh doesn't store boundary type information in mesh file, all boundaries has type 'patch' (in OpenFOAM's terminology) after conversion. Cavity tutorial is 2D, frontAndBack boundary should have 'empty' type, fixedWalls and movingWall should have 'wall' type (though for cavity tutorial this is not so important). You should edit constant/polyMesh/boundary file and set correct types. Either by hand, or with changeDictionary utility. |
|
December 1, 2014, 09:07 |
|
#5 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
I tried to follow your instructions. The attached file is the modified boundary file. I still getting an error message:
Code:
Create time Create mesh for time = 0 --> FOAM FATAL IO ERROR: wrong token type - expected word, found on line 23 the label 1 file: .frontAndBack.physicalType at line 23. From function operator>>(Istream&, word&) in file primitives/strings/word/wordIO.C at line 74. FOAM exiting |
|
December 1, 2014, 09:27 |
|
#6 |
Senior Member
|
Well,
As it said, it expects word (empty), while you've put list there (1(empty)). If you take a look at patchIdentifier.H:122, you'll see that physicalType of the patch is word. I.e. this Code:
frontAndBack { type empty; physicalType 1(empty); nFaces 1464; startFace 1052; } Code:
frontAndBack { type empty; physicalType empty; nFaces 1464; startFace 1052; } Code:
frontAndBack { type empty; nFaces 1464; startFace 1052; } The same with other patches. Last edited by alexeym; December 1, 2014 at 11:57. |
|
December 1, 2014, 11:08 |
|
#7 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Sorry! So the boundary file should look like this?
Code:
frontAndBack { type empty; physicalType empty; nFaces 1464; startFace 1052; } fixedWalls { type wall; physicalType empty; nFaces 60; startFace 2516; } movingWall { type wall; physicalType empty; nFaces 32; startFace 2576; } Code:
Create time --> FOAM FATAL IO ERROR: cannot find file file: ~/..../tutorials/incompressible/icoFoam/cavity/gmsh/constant/polyMesh/system/controlDict at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 73. FOAM exiting |
|
December 1, 2014, 11:11 |
|
#8 |
Senior Member
|
It's worth reading the error (and trying to understand it) before posting message here. You're trying to run a case in constant/polyMesh folder instead of case folder.
|
|
December 1, 2014, 11:54 |
|
#9 | |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Thanks for helping me and being so patient Works now!
Quote:
|
||
December 1, 2014, 11:59 |
|
#10 |
Senior Member
|
Hm, that's right, posted a link to a local copy of documentation instead of sourceforge. Fixed.
|
|
December 2, 2014, 11:39 |
|
#11 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Thank you again for all your assistance!
|
|
March 14, 2016, 10:50 |
|
#12 | ||||
Senior Member
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13 |
Hi Alexey,
I need your help please. I'm doing fsi case about beam in cross flow attached to the square cylinder. I generated mesh using Gmsh. Quote:
Quote:
Quote:
My boundary file is Quote:
Maimouna |
|||||
March 14, 2016, 11:24 |
|
#13 |
Senior Member
|
Hi,
You do not have Physical Volume definition in your mesh. For example if you take this simple GEO: Code:
Point(1) = {0, 0, 0}; Point(2) = {1, 0, 0}; Point(3) = {1, 1, 0}; Point(4) = {0, 1, 0}; Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 1}; Line Loop(5) = {4, 1, 2, 3}; Plane Surface(6) = {5}; Extrude {0, 0, 1} { Surface{6}; Layers{10}; Recombine; } Transfinite Line {1, 2, 3, 4} = 11; Transfinite Surface "*"; Recombine Surface "*"; Physical Surface("walls") = {28, 15, 27, 23, 6, 19}; Physical Volume("cube") = {1}; // * Mesh 3; Save "test.msh"; Code:
$Elements 600 1 3 2 1 6 4 36 117 35 2 3 2 1 6 35 117 118 34 ... 600 3 2 1 28 602 62 7 63 $EndElements Code:
$Elements 1600 1 3 2 1 6 4 36 117 35 2 3 2 1 6 35 117 118 34 ... 601 5 2 2 1 4 36 117 35 81 198 603 513 ... 1600 5 2 2 1 1331 359 107 368 602 62 7 63 $EndElements |
|
March 14, 2016, 12:18 |
|
#14 |
Senior Member
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13 |
Hi Alexey,
I just added the following line for Physical surface to my previous geo file Code:
Physical Volume(200) = {vo1[]}; With lots of thanks. Maimouna |
|
March 14, 2016, 14:25 |
|
#15 |
Senior Member
|
And why not
Code:
Physical Volume("mesh") = {174}; |
|
March 14, 2016, 16:08 |
|
#16 | |
Senior Member
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13 |
Ok dear. I got
Quote:
|
||
March 15, 2016, 03:01 |
|
#17 |
Senior Member
|
Well, output depends on Gmsh version, mesh generation settings, and the state of gmshToFoam in foam-extend (last time I dealt with it, I had to implement removal of empty patches after conversion).
With 2.10.0, default mesh generation settings, and gmshToFoam from OpenFOAM 2.4.0 conversion went OK. |
|
March 15, 2016, 05:16 |
|
#18 |
Senior Member
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13 |
Hi Alexey,
I'm using Gmsh 2.8.3 for foam-extend-3.1. What should do now? What are the next steps? Shall remove defaultFaces from the boundary file? Regards Maimouna |
|
March 15, 2016, 07:15 |
|
#19 | |
Senior Member
|
Dear Maimouna,
Quote:
Code:
Truncating neighbor list at 249487 for backward compatibility |
||
March 15, 2016, 08:39 |
|
#20 |
Senior Member
ok
Join Date: Oct 2013
Posts: 346
Rep Power: 13 |
Hi Alexey,
honestly, I'm not very sure if FSI solver would capable running on tetrahedral meshes, but suppose should be running for all mesh types regarding HTML Code:
https://www.ricam.oeaw.ac.at/files/reports/12/rep12-11.pdf Best regards Maimouna |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building OpenFOAM1.7.0 from source | ata | OpenFOAM Installation | 46 | March 6, 2022 13:21 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 14:49 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 08:48 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 19:43 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |