|
[Sponsors] |
July 9, 2009, 10:10 |
boundaries with gmshToFoam
|
#1 |
New Member
ouafa
Join Date: Jul 2009
Posts: 15
Rep Power: 17 |
hello,
I try to generate a mesh for use in OpenFoam by gmshToFoam conversion, but I alwas get the warning: --> FOAM Warning : From function polyMesh:olyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576 Found 28864 undefined faces in mesh; adding to default patch. Finding faces of patch 0 Finding faces of patch 1 Finding faces of patch 2 --> FOAM Warning : Not using gmsh face 4(1446 14016 14017 1447) since zero vertex is not on boundary of polyMesh ......... However i got polymesh directory with all files. but the faces or boundaries are not reading. patches in boundary files are even taking nFace=0 even if startface#0 in some patches. it seems to be arbitrary because i change many times the order and the way to define the physical surface and the result is different all the time. here attached my script. and checkMesh outline. Any idea what I am doing wrong? Thanks
Ouafa lc = 5.; N1 = 10; N2 = N1; N3 = 2*N1; arctheta1 = 5; arctheta2 = 10; f = 1.1; h1 = 10; Nz1 = 10; d1=7.0711; d2=14.1421; d3=16.2635; d4=50; //--------------------------------------------------------------------------- Point(1)={0, 0, 0, lc}; Point(2)={-d1, 0, d1, lc}; Point(3)={d1, 0, d1, lc}; Point(4)={d1, 0, -d1, lc}; Point(5)={-d1, 0, -d1, lc}; Point(6)={-d2, 0, d2, lc}; Point(7)={d2, 0, d2, lc}; Point(8)={d2, 0, -d2, lc}; Point(9)={-d2, 0, -d2, lc}; Point(10)={-d3, 0, d3, lc}; Point(11)={d3, 0, d3, lc}; Point(12)={d3, 0, -d3, lc}; Point(13)={-d3, 0, -d3, lc}; Point(14)={-d4, 0, d4, lc}; Point(15)={-d3, 0, d4, lc}; Point(16)={d3, 0, d4, lc}; Point(17)={d4, 0, d4, lc}; Point(18)={d4, 0, d3, lc}; Point(19)={d4, 0, -d3, lc}; Point(20)={d4, 0, -d4, lc}; Point(21)={d3, 0, -d4, lc}; Point(22)={-d3, 0, -d4, lc}; Point(23)={-d4, 0, -d4, lc}; Point(24)={-d4, 0, -d3, lc}; Point(25)={-d4, 0, d3, lc}; Point(26)={100, 0, d4, lc}; Point(27)={100, 0, d3, lc}; Point(28)={100, 0, -d3, lc}; Point(29)={100, 0, -d4, lc}; Point(30)={-100, 0, d4, lc}; Point(31)={-100, 0, d3, lc}; Point(32)={-100, 0, -d3, lc}; Point(33)={-100, 0, -d4, lc}; Point(34)={150, 0, d4, lc}; Point(35)={150, 0, d3, lc}; Point(36)={150, 0, -d3, lc}; Point(37)={150, 0, -d4, lc}; //--------------------------------------------------------------------------- Line(1) = {2,3}; Line(2) = {3,4}; Line(3) = {4,5}; Line(4) = {5,2}; Circle(5) = {6,1,7}; Circle(6) = {7,1,8}; Circle(7) = {8,1,9}; Circle(8) = {9,1,6}; Line(9 ) = {14,15}; Line(10) = {15,16}; Line(11) = {16,17}; Line(12) = {17,18}; Line(13) = {18,19}; Line(14) = {19,20}; Line(15) = {20,21}; Line(16) = {21,22}; Line(17) = {22,23}; Line(18) = {23,24}; Line(19) = {24,25}; Line(20) = {25,14}; Line(32) = {21,12}; Line(33) = {24,13}; Line(34) = {13,22}; Line(35) = {15,10}; Line(36) = {10,25}; Line(37) = {18,11}; Line(38) = {11,16}; Line(21) = {17,26}; Line(22) = {26,27}; Line(23) = {27,28}; Line(24) = {28,29}; Line(25) = {29,20}; Line(41) = {27,18}; Line(42) = {28,19}; Line(31) = {12,19}; Line(26) = {23,33}; Line(27) = {33,32}; Line(28) = {32,31}; Line(29) = {31,30}; Line(30) = {30,14}; Line(39) = {25,31}; Line(40) = {24,32}; Line(43) = {26,34}; Line(44) = {27,35}; Line(45) = {28,36}; Line(46) = {29,37}; Line(47) = {34,35}; Line(48) = {35,36}; Line(49) = {36,37}; Line(50) = {2,6}; Line(51) = {3,7}; Line(52) = {4,8}; Line(53) = {5,9}; Line(54) = {6,10}; Line(55) = {7,11}; Line(56) = {8,12}; Line(57) = {9,13}; Circle(58) = {10,1,11}; Circle(59) = {10,1,13}; Circle(60) = {13,1,12}; Circle(61) = {12,1,11}; //--------------------------------------------------------------------------- Line Loop(1) = {2,3,4,1}; Line Loop(2) = {-51,-1,50,5}; Line Loop(3) = {6,-52,-2,51}; Line Loop(4) = {52,7,-53,-3}; Line Loop(5) = {53,8,-50,-4}; Line Loop(6) = {-55,-5,54,58}; Line Loop(7) = {-61,-56,-6,55}; Line Loop(8) = {56,-60,-57,-7}; Line Loop(9) = {-8,57,-59,-54}; Line Loop(10) = {13,-31,61,-37}; Line Loop(11) = {-32,16,-34,60}; Line Loop(12) = {59,-33,19,-36}; Line Loop(13) = {-38,-58,-35,10}; Line Loop(14) = {12,37,38,11}; Line Loop(15) = {14,15,32,31}; Line Loop(16) = {34,17,18,33}; Line Loop(17) = {35,36,20,9}; Line Loop(18) = {22,41,-12,21}; Line Loop(19) = {23,42,-13,-41}; Line Loop(20) = {24,25,-14,-42}; Line Loop(21) = {-20,39,29,30}; Line Loop(22) = {-19,40,28,-39}; Line Loop(23) = {-18,26,27,-40}; Line Loop(24) = {47,-44,-22,43}; Line Loop(25) = {48,-45,-23,44}; Line Loop(26) = {49,-46,-24,45}; //--------------------------------------------------------------------------- s1 = newreg; Plane Surface(s1) = {1}; s2 = newreg; Plane Surface(s2) = {2}; s3 = newreg; Plane Surface(s3) = {3}; s4 = newreg; Plane Surface(s4) = {4}; s5 = newreg; Plane Surface(s5) = {5}; s6 = newreg; Plane Surface(s6) = {6}; s7 = newreg; Plane Surface(s7) = {7}; s8 = newreg; Plane Surface(s8) = {8}; s9 = newreg; Plane Surface(s9) = {9}; s10 = newreg; Plane Surface(s10) = {10}; s11 = newreg; Plane Surface(s11) = {11}; s12 = newreg; Plane Surface(s12) = {12}; s13 = newreg; Plane Surface(s13) = {13}; s14 = newreg; Plane Surface(s14) = {14}; s15 = newreg; Plane Surface(s15) = {15}; s16 = newreg; Plane Surface(s16) = {16}; s17 = newreg; Plane Surface(s17) = {17}; s18 = newreg; Plane Surface(s18) = {18}; s19 = newreg; Plane Surface(s19) = {19}; s20 = newreg; Plane Surface(s20) = {20}; s21 = newreg; Plane Surface(s21) = {21}; s22 = newreg; Plane Surface(s22) = {22}; s23 = newreg; Plane Surface(s23) = {23}; s24 = newreg; Plane Surface(s24) = {24}; s25 = newreg; Plane Surface(s25) = {25}; s26 = newreg; Plane Surface(s26) = {26}; //--------------------------------------------------------------------------- Transfinite Line{54,55,56,57}=arctheta1 Using Progression f; Transfinite Line{50,51,52,53}=arctheta2 Using Progression 1/f; Transfinite Line {11,37,31,15,9,36,33,17} = N1 Using Progression 1.0; Transfinite Line {20,19,18,35,59,34,38,61,32,12,13,14,58,10,16,5,7, 60,61,6,8,1,2,3,4} = N1 Using Progression 1.0; Transfinite Line {20,35,38,12} = N1 Using Progression 1.0; Transfinite Line {19,13} = N1 Using Progression 1.0; Transfinite Line {18,34,32,14} = N1 Using Progression 1.0; Transfinite Line {21,41,42,25,30,39,40,26} = N3 Using Progression 1.0; Transfinite Line {22,12,20,23,13,19,24,14,18} = N1 Using Progression 1.0; Transfinite Line {43,44,45,46,30,39,40,26} = N3 Using Progression 1.0; Transfinite Line {47,48,49,22,23,24,20,19,18,29,28,27} = N1 Using Progression 1.0; Transfinite Surface {s1} = {2,3,4,5}; Transfinite Surface {s2} = {2,6,7,3}; Transfinite Surface {s3} = {3,7,8,4}; Transfinite Surface {s4} = {4,8,9,5}; Transfinite Surface {s5} = {5,9,6,2}; Transfinite Surface {s6} = {11,7,6,10}; Transfinite Surface {s7} = {11,7,8,12}; Transfinite Surface {s8} = {8,12,13,9}; Transfinite Surface {s9} = {9,13,10,6}; Transfinite Surface {s10} = {11,18,19,12}; Transfinite Surface {s11} = {12,21,22,13}; Transfinite Surface {s12} = {13,24,25,10}; Transfinite Surface {s13} = {11,10,15,16}; Transfinite Surface {s14} = {18,11,16,17}; Transfinite Surface {s15} = {12,19,20,21}; Transfinite Surface {s16} = {13,22,23,24}; Transfinite Surface {s17} = {10,25,14,15}; Transfinite Surface {s18} = {17,26,27,18}; Transfinite Surface {s19} = {18,27,28,19}; Transfinite Surface {s20} = {19,28,29,20}; Transfinite Surface {s21} = {14,25,31,30}; Transfinite Surface {s22} = {25,24,32,31}; Transfinite Surface {s23} = {23,24,32,33}; Transfinite Surface {s24} = {34,26,27,35}; Transfinite Surface {s25} = {36,35,27,28}; Transfinite Surface {s26} = {37,36,28,29}; Recombine Surface {s1:s26}; //--------------------------------------------------------------------------- i = 1; For s In {s1:s26} out1[] = Extrude {0,h1,0} { Surface { s }; Layers{10}; Recombine; }; ns[i] = out1[0]; fg[i] = out1[2]; fb[i] = out1[3]; fd[i] = out1[4]; fh[i] = out1[5]; nv[i] = newreg; Physical Volume (nv[i]) = {out1[1]}; i += 1; EndFor //--------------------------------------------------------------------------- Physical Surface("inlet") = {fg[1]}; Physical Surface("outlet") = {fd[1]}; Physical Surface("interface") = {s10:s20}; Physical Surface("jonction") = {s1:s9}; Physical Surface("wall") = {ns[1],ns[2],ns[3],ns[4],ns[5],ns[6],ns[7],ns[8], ns[9],ns[10],ns[11],ns[12],ns[13],ns[14],ns[15],ns[16], ns[17],ns[18],ns[19],ns[20],ns[21],ns[22],ns[23],ns[24],ns[25],ns[26]}; /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : checkMesh Date : Jul 09 2009 Time : 15:36:04 Host : lambda31 PID : 13084 Case : /home/flurec/commun/ouafa/tmpgmsh nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = constant Time = constant Mesh stats points: 135894 faces: 378092 internal faces: 349228 cells: 121220 boundary patches: 6 point zones: 0 face zones: 2 cell zones: 26 Number of cells of each type: hexahedra: 121220 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Point usage OK. Upper triangular ordering OK. Topological cell zip-up check OK. Face vertices OK. Face-face connectivity OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface jonction 2565 2604 ok (not multiply connected) interface 5111 5302 ok (not multiply connected) inlet 0 0 ok (empty) outlet 0 0 ok (empty) wall 12122 12354 ok (not multiply connected) defaultFaces 9066 9450 ok (not multiply connected) Checking geometry... Domain bounding box: (-100 0 -50) (150 50 50) Boundary openness (-7.18902e-18 3.05372e-15 9.36245e-17) OK. Max cell openness = 2.67949e-16 OK. Max aspect ratio = 26.7476 OK. Minumum face area = 0.312226. Maximum face area = 9.50492. Face area magnitudes OK. Min volume = 1.56113. Max volume = 15.7656. Total volume = 1.25e+06. Cell volumes OK. Mesh non-orthogonality Max: 41.0303 average: 5.01782 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.468149 OK. All angles in faces OK. Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1 All face flatness OK. Mesh OK. End |
|
January 6, 2010, 20:04 |
|
#2 |
Senior Member
|
Did you set your boundary types in the boundary file?
"yourcasefoler" > constant > polyMesh > boundary |
|
January 22, 2010, 05:04 |
|
#3 |
New Member
ouafa
Join Date: Jul 2009
Posts: 15
Rep Power: 17 |
thanks for UR replay. yes i made every patch in boundary file ok. but now i resolved the pb it was related to numerotation of faces before conversion to OF format.
|
|
January 22, 2010, 13:48 |
|
#4 |
Senior Member
|
Yeah, since your post was in July i figured you had it figured out by now. Its always nice to hear the ending for reference sake
Thanks |
|
May 20, 2010, 15:46 |
|
#5 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
hey i have the same problem. how did u guys solve it??
|
|
May 20, 2010, 16:01 |
|
#6 | |
Senior Member
|
Hello robingilbert,
Quote:
----- Did you set your boundary types in the boundary file? "yourcasefoler" > constant > polyMesh > boundary ----- If that doesn't help post back with your specific problem. |
||
May 21, 2010, 06:00 |
|
#7 |
Member
Robin Gilbert
Join Date: Jan 2010
Posts: 66
Rep Power: 16 |
Hello Eric,
Thank you for your reply. This is what i did: i made a geometry in gmsh and converted to openfoam using gmsh2tofoam. i wanted to convert some of the internal faces to patch so as to apply boundary conditions on them. so i used the command splitMesh. ( i did it the proper way i suppose : ie. edited the boundary file, added 2 new patches with nFaces 0 ) when i ran a checkMesh it showed the error: boundary openness . I am kind of stuck there. please advice. is there any other better (robust) way to apply boundary conditions on internal walls?? |
|
May 21, 2010, 13:43 |
|
#8 |
Senior Member
|
I have run OF1.6 and OF1.5dev and I have use thed "gmshToFoam" command exclusively. gmsh2tofoam must be an old old version...
I have also never used splitMesh. I define all of my boundary names in gmsh with "Physical Surface", "Physical Volume", etc. Once the mesh is created and all the boundaries are named you save the mesh, run gmshToFoam, then go in and change the boundary and "0" directory files to correspond with your mesh. Hope that helps! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] Problem with using createPatchDict to define cyclic boundaries | kaszt | OpenFOAM Meshing & Mesh Conversion | 0 | April 1, 2016 22:18 |
2D Rotating Detonation Engine Periodic Boundaries | whitet86 | FLUENT | 2 | June 25, 2015 12:04 |
Setting Flow/Pressure Boundaries in Floworks | Eran | FloEFD, FloWorks & FloTHERM | 3 | August 11, 2009 05:23 |
periodic boundaries - flow through a net | PK | FLUENT | 0 | July 12, 2007 12:58 |
problems replacing old boundaries | Jared | Siemens | 4 | August 5, 2005 20:36 |