|
[Sponsors] |
November 23, 2007, 13:09 |
Problem with Gmsh
|
#1 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi all..
I am trying to simulate naca aerofoil on foam using mesh from gmsh. i created a mesh using gmsh and convert it to foam polmesh format using gmshToFoam. I am repeatedly getting this warning... --> FOAM Warning : Not using gmsh face 4(64 122 123 65) since zero vertex is not on boundary of polyMesh --> FOAM Warning : From function gmshToFoam in file gmshToFoam.C at line 799 Could not match gmsh face 4(64 122 123 65) to any of the interior or exterior faces that share the same 0th point However it is getting executed and I am getting polymesh directory with all files. but again... the files are reading just the points and not the faces or boundaries etc. patches in boundary files are even taking nFace=0 and startface=0 in all patches. The .geo file for my mesh is as follows: Point (137) = {0.999972181112207, -3, 0.4, 0.1}; Point (138) = {0.999972181112207, -3, 0.5, 0.1}; Line (26) = {57, 61}; Line (27) = {59, 62}; Line (31) = {60, 66}; Line (35) = {58, 70}; Line (42) = {25, 77}; Line (43) = {102, 50}; Line (62) = {128, 77}; Line (63) = {25, 127}; Line (64) = {102, 130}; Line (65) = {50, 129}; Line (66) = {61, 128}; Line (67) = {70, 128}; Line (68) = {57, 127}; Line (69) = {58, 127}; Line (70) = {127, 128}; Line (71) = {62, 130}; Line (72) = {130, 129}; Line (73) = {59, 129}; Line (74) = {130, 66}; Line (75) = {129, 60}; CatmullRom (76) = {77, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102}; CatmullRom (77) = {102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77}; CatmullRom (78) = {50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}; CatmullRom (79) = {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}; Line (108) = {136, 77}; Line (109) = {25, 135}; Line (110) = {102, 138}; Line (111) = {137, 50}; Line (112) = {138, 137}; Line (113) = {136, 135}; Line (114) = {132, 77}; Line (115) = {25, 131}; Line (116) = {132, 131}; Line (117) = {134, 133}; Line (118) = {133, 50}; Line (119) = {102, 134}; Line (124) = {61, 132}; Line (125) = {132, 134}; Line (126) = {134, 62}; Line (127) = {57, 131}; Line (128) = {131, 133}; Line (129) = {133, 59}; Line (130) = {70, 136}; Line (131) = {136, 138}; Line (132) = {138, 66}; Line (133) = {60, 137}; Line (134) = {137, 135}; Line (135) = {135, 58}; Line Loop (121) = {77, -42, 79, -43}; Plane Surface (121) = {121}; Line Loop (123) = {76, 43, 78, 42}; Plane Surface (123) = {123}; Line Loop (137) = {135, 35, 130, 113}; Plane Surface (137) = {137}; Line Loop (139) = {134, -113, 131, 112}; Plane Surface (139) = {139}; Line Loop (141) = {133, -112, 132, -31}; Plane Surface (141) = {141}; Line Loop (143) = {67, 62, -108, -130}; Plane Surface (143) = {143}; Line Loop (145) = {108, -77, 110, -131}; Plane Surface (145) = {145}; Line Loop (147) = {64, 74, -132, -110}; Plane Surface (147) = {147}; Line Loop (149) = {69, -63, 109, 135}; Plane Surface (149) = {149}; Line Loop (151) = {109, -134, 111, -79}; Plane Surface (151) = {151}; Line Loop (153) = {65, 75, 133, 111}; Plane Surface (153) = {153}; Line Loop (155) = {118, 65, -73, -129}; Plane Surface (155) = {155}; Line Loop (157) = {65, -72, -64, 43}; Plane Surface (157) = {157}; Line Loop (159) = {63, 70, 62, -42}; Plane Surface (159) = {159}; Line Loop (161) = {71, -64, 119, 126}; Plane Surface (161) = {161}; Line Loop (163) = {119, -125, 114, 76}; Plane Surface (163) = {163}; Line Loop (165) = {129, 27, -126, 117}; Plane Surface (165) = {165}; Line Loop (167) = {128, -117, -125, 116}; Plane Surface (167) = {167}; Line Loop (169) = {127, -116, -124, -26}; Plane Surface (169) = {169}; Line Loop (171) = {114, -62, -66, 124}; Plane Surface (171) = {171}; Line Loop (173) = {118, 78, 115, 128}; Plane Surface (173) = {173}; Line Loop (175) = {63, -68, 127, -115}; Plane Surface (175) = {175}; Line Loop (177) = {73, -72, -71, -27}; Plane Surface (177) = {177}; Line Loop (179) = {75, 31, -74, 72}; Plane Surface (179) = {179}; Line Loop (181) = {70, -66, -26, 68}; Plane Surface (181) = {181}; Line Loop (183) = {69, 70, -67, -35}; Plane Surface (183) = {183}; Line Loop (189) = {42, -114, 116, -115}; Plane Surface (189) = {189}; Line Loop (191) = {119, 117, 118, -43}; Plane Surface (191) = {191}; Line Loop (193) = {109, -113, 108, -42}; Plane Surface (193) = {193}; Line Loop (195) = {111, -43, 110, 112}; Plane Surface (195) = {195}; Surface Loop (185) = {143, 183, 149, 151, 139, 137, 145, 121, 147, 179, 153, 141, 157, 159}; Volume (185) = {185}; Surface Loop (187) = {163, 161, 177, 155, 173, 123, 175, 181, 171, 169, 167, 165, 159, 157}; Volume (187) = {187}; Physical Surface ("Inlet_5") = {137, 139, 141, 181, 183}; Physical Surface ("outlet_5") = {165, 167, 169, 177, 179}; Recombine Surface {163,171,161,177,143,145,147,157,121,159,175,181,1 83,137,139,141,149,151,173,155 ,153,179,165,167,169};
__________________
Thanks and regards, Nishant |
|
November 23, 2007, 13:14 |
I again try to export mesh for
|
#2 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
I again try to export mesh for a simple cube geometry ...
and then again the problem is same.. I am getting the same warning. and similarly gmshToFoam is getting executed and I am getting polymesh directory with all files. but again... the files are reading just the points and not the faces or zones etc. patches in boundary file is even taking nFace=0 and startface=0 in all patches. The .geo file for my mesh is as follows: Point(1) = {-1,1,0,0.1}; Point(2) = {1,1,0,0.1}; Point(3) = {1,-1,0,0.1}; Point(4) = {-1,-1,0,0.1}; Line(1) = {3,4}; Line(2) = {4,1}; Line(3) = {2,1}; Line(4) = {2,3}; Line Loop(5) = {4,1,2,-3}; Plane Surface(6) = {5}; Extrude {0,0,1} { Surface{6}; } Physical Surface(29) = {23}; Physical Surface(30) = {23}; Physical Surface(31) = {19}; Physical Surface(32) = {27}; Physical Surface(33) = {15}; Surface Loop(34) = {28,15,6,19,23,27}; Volume(35) = {34}; please suggest in this reagrd... with regards .. Nishant
__________________
Thanks and regards, Nishant |
|
November 23, 2007, 21:05 |
Hi Nishant,
Note that Gmsh on
|
#3 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Nishant,
Note that Gmsh only writes mesh for the parts where physical entities are defined if you define any physical entities. Thus you need to define physical surfaces for all the surfaces and a physical volume for the volume. For your cube case with some other corrections your .geo will be Point(1) = {-1,1,0,0.1}; Point(2) = {1,1,0,0.1}; Point(3) = {1,-1,0,0.1}; Point(4) = {-1,-1,0,0.1}; Line(1) = {3,4}; Line(2) = {4,1}; Line(3) = {2,1}; Line(4) = {2,3}; Line Loop(5) = {4,1,2,-3}; Plane Surface(6) = {5}; e1[] = Extrude {0,0,1} { Surface{6}; }; Physical Surface(29) = {e1[0]}; Physical Surface(30) = {e1[2]}; Physical Surface(31) = {e1[3]}; Physical Surface(32) = {e1[4]}; Physical Surface(33) = {e1[5]}; Surface Loop(34) = {6,e1[0],e1[2],e1[3],e1[4],e1[5]}; Physical Surface(1) = {6}; Physical Volume(1) = {e1[1]}; (you need Gmsh version >= 2.0.7 to load the corrected .geo). And if you'd like to use string labels for physical entity definitions ("Inlet_5" and "outlet_5" in your airfoil case) you want to try gmsh2ToFoam that comes with the gmshFoam package instead. Takuya |
|
November 26, 2007, 15:49 |
Thanks Takuya ..
My mesh i
|
#4 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Thanks Takuya ..
My mesh is generated now. However I am getting following error: --> FOAM FATAL IO ERROR : patch type 'patch' not constraint type 'empty' for patch defaultFaces of field p in file "/home/343880/OpenFOAM/343880-1.4.1/run/tutorials/sonicTurbFoam/gmsh/0/p" file: /home/343880/OpenFOAM/343880-1.4.1/run/tutorials/sonicTurbFoam/gmsh/0/p::default Faces from line 57 to line 57. 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 101. FOAM exiting Can you make any comment? Where could possibly be the error? thanks in advance .. regards.. Nishant
__________________
Thanks and regards, Nishant |
|
November 27, 2007, 09:13 |
Hi Nishant,
I can't say for s
|
#5 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Nishant,
I can't say for sure with all the information you provided, but I guess you are trying to do a two dimensional computation by setting the third dimensional patch type to empty. If that's the case make sure the base patch types of both the mesh (constant/polyMesh/boundary) and the initial field file (0/p) are set to empty. Takuya |
|
November 30, 2007, 08:15 |
Hi Takuya..
Thanks. I am s
|
#6 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi Takuya..
Thanks. I am still getting this error:- Selecting turbulence model LaunderSharmaKE Creating field DpDt --> FOAM FATAL ERROR : This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting I guess.. I have some problem with the plane surafe generation at the fin. Can you suggest what standard method should I use for it?
__________________
Thanks and regards, Nishant |
|
November 30, 2007, 08:27 |
I guess.. I have some problem
|
#7 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
I guess.. I have some problem with the plane surafe generation at the airfoil surface (where I need to put the boundary condition). Can you suggest what standard method should I use for it in gmsh?
Please see your email where I send my mesh file. With regards .. Nishant Singh
__________________
Thanks and regards, Nishant |
|
November 30, 2007, 20:03 |
Hi Nishant,
As of now I still
|
#8 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Nishant,
As of now I still haven't received a mail from you... maybe sent to some wrong address? Could you post the .geo here via the attachment feature since I prefer to have all the discussions on the board (to use the attachment feature, see the Formatting section under the Documentation tree in the pane left of the board screen). Takuya |
|
December 2, 2007, 12:56 |
Hi Takuya ..
Sorry for repl
|
#9 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi Takuya ..
Sorry for replying late. The .geo and mesh file is attached here. aerofoil-quater2 aerofoil
__________________
Thanks and regards, Nishant |
|
December 2, 2007, 13:29 |
Do not use the aerofoil mesh f
|
#10 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Do not use the aerofoil mesh file. thats not the right file. Sorry fpr attaching that.
Plese check the way I describe the aerofoil surface plane in the .geo file. I would be glad to see ur comments in this regard. and Thanks you for, letting me know the attachment related links. Nishant Singh
__________________
Thanks and regards, Nishant |
|
December 2, 2007, 14:11 |
Please overlook the previous f
|
#11 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
__________________
Thanks and regards, Nishant |
|
December 3, 2007, 05:48 |
Hi Nishant,
In a nutshell, in
|
#12 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Nishant,
In a nutshell, in OpenFOAM a 2D case should consist of an extruded surface mesh, i. e. a mesh with the identical bottom and top patches of type empty and with a single cell height. Here I'm attaching a corrected .geo and other files for minimal setup copied from the sonicTurbFoam/nacaAirfoil case with appropriate patch name corrections. You'll need Gmsh version >= 2.0.7 and gmsh2ToFoam to convert the .geo to the polyMesh format. Also note that you would want to correct the case setup as necessary since other than the patch name changes the case setup is verbatim from the nacaAirfoil case (I only confirmed the case runs at least up to 1e-5 s). nishantAirfoil.tar.gz Takuya |
|
December 3, 2007, 09:57 |
Thanks for the help Takuya. I
|
#13 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Thanks for the help Takuya. I hope to proceed further now. However I have few problem with my set up of Foam. I could not be able to recompile my Foam package. So I wanted to ask, if the gnsh2ToFoam need recompilation of complete Foam or just the binaries of the package will do? Let me know. I am using Openfoam 1.4.1.
Thnak you once again Nishant
__________________
Thanks and regards, Nishant |
|
December 3, 2007, 10:30 |
You can download and read usag
|
#14 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
You can download and read usage instructions of gmsh2ToFoam here. You just have to compile the gmshFoam package and no necessity of recompiling the whole OpenFOAM sources. Or if the installation procedure seems too much of work to you, just using the stock gmshToFoam with some hand-editing constant/polyMesh/boundary after conversion will do (you have to do the hand-editing every time you do the conversion though).
Takuya |
|
December 3, 2007, 17:02 |
Hi Takuya...
Thank you so
|
#15 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi Takuya...
Thank you so much. I really like the gmsh2ToFoam. Its a excellent piece of work. I could be able to run the sonicTurbFoam case. Thank you for the help Nishant
__________________
Thanks and regards, Nishant |
|
December 6, 2007, 09:31 |
Hi Takuya,
Your example fil
|
#16 |
New Member
maitre touf
Join Date: Mar 2009
Posts: 6
Rep Power: 17 |
Hi Takuya,
Your example file is very good. Please just one question: How GMSH is numbering when extruding? I saw that results from extrusion are stocked to arrays (e1[] and e2[]), but I didn't find how to know which number in the array is face, volume,... Touf |
|
December 7, 2007, 00:06 |
Hi Touf,
Well, it's a bit dif
|
#17 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Touf,
Well, it's a bit difficult to explain... Let's take the Nishant's case for example: Line Loop (149) = {69, -63, 109, 135}; Plane Surface (149) = {149}; Line Loop (151) = {109, -134, 111, -79}; Plane Surface (151) = {151}; Line Loop (153) = {65, 75, 133, 111}; Plane Surface (153) = {153}; e1[] = Extrude {0, 0, 0.1} {Surface{149, 151, 153}; Layers{1}; Recombine;}; In this case the elements of the array e1[] are e1[0]: the id of the extruded opposite surface of the first surface specified in the Extrude command (Surface 149) e1[1]: the id of the extruded volume of Surface 149 e1[2] - e1[5]: the id's of the lateral surfaces, in the order of the Lines 69, 63, 109 and 135 in the corresponding "base" Line Loop 149, which constructs Surface 149 e1[6]: the id of the extruded opposite surface of the second surface specified in the Extrude command (Surface 151) e1[7]: the id of the extruded volume of Surface 151 e1[8]-e1[11]: the id's of the lateral surfaces, in the order of the Lines 109, 134, 111 and 79 in the corresponding "base" Line Loop 151, which constructs Surface 151 e1[12] - e1[17]: same as in the first two surfaces specified in the Extrude command, but for Surface 153 . The order of the lateral surfaces may not be guaranteed since AFAIK it is undocumented. Hope you get the idea Takuya |
|
December 7, 2007, 02:33 |
Hi Takuya,
Thanks for the exp
|
#18 |
New Member
maitre touf
Join Date: Mar 2009
Posts: 6
Rep Power: 17 |
Hi Takuya,
Thanks for the explainations, it's now more clear Touf |
|
April 22, 2015, 09:43 |
gmsh problem
|
#19 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi everybody,
I am struggling hart wirh the periodic line command on gmsh, i am trying to create mesh a triangular geometry with quads and triangles. I want to force 2 line to connect each other with the mesh...simply straight lines but it doesn't work for know! maybe some body with a idea? someone knows how to use the periodic line command on gmsh? I searched in many places on the internet but there isn't many information about this command. greetings and thanks to all Rafa marques |
|
July 31, 2015, 06:10 |
|
#20 | |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
I have some problem with gmshToFoam producing a default patch. Could gmsh2ToFoam help me here or is gmshToFoam already corrected. I am asking because the cited post is from 2007. Any help is appreciated! Best regards, Kate |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem diverges when exhaust valve opens | swerner0711 | AVL FIRE | 0 | September 21, 2018 08:14 |
[Gmsh] gmsh meshing problem | CHAYANIT | OpenFOAM Meshing & Mesh Conversion | 0 | September 5, 2018 09:08 |
Gmsh problem | liub | Mesh Generation & Pre-Processing | 0 | December 17, 2015 14:26 |
[Gmsh] gmsh problem | djamel | OpenFOAM Meshing & Mesh Conversion | 0 | January 7, 2014 14:02 |
[Gmsh] Ubuntu 12.10 Gmsh installation problem | sudo | OpenFOAM Meshing & Mesh Conversion | 0 | November 7, 2013 13:47 |