CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] gmshToFoam undefined faces

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MaxJets

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2009, 10:31
Default gmshToFoam undefined faces
  #1
New Member
 
Ben Connell
Join Date: Apr 2009
Location: Groton, CT, USA
Posts: 6
Rep Power: 17
benconnell is on a distinguished road
Hi-

I'm trying to learn how to create meshes in gmsh and import them to openfoam. I think I'm following the proper approach, but when i use gmshtofoam i get a warning that there are undefined faces which are put in a default patch called "defaultFaces".

The number of undefined faces is the same as the number of non-volumetric elements (lines and triangles) listed in the msh file. The openfoam grid is generated, but I have this defaultFaces patch that I need to set boundary conditions for ... and I don't know what these conditions should be set as.

I have the same problem when using the sample CubeVer1.msh from the openfoam installation, so I don't think it's an issue with the way I'm generating my mesh in gmsh.

Am I missing something? Any insight as to how I should set the defaultFaces patch boundary conditions? I was considering writing a program to remove the non-volumetric elements from the msh file.

Any help is much appreciated.

Thanks
-Ben
benconnell is offline   Reply With Quote

Old   April 24, 2009, 11:55
Default
  #2
New Member
 
Ben Connell
Join Date: Apr 2009
Location: Groton, CT, USA
Posts: 6
Rep Power: 17
benconnell is on a distinguished road
I stripped the non-volumetric elements out the the .msh file to test the effect, gmshtofoam still gave the same number of undefined faces.

For the original .msh file it set the p and U boundaries to zerogradient to see what would happen. That solution doesn't look right.

-Ben
benconnell is offline   Reply With Quote

Old   April 24, 2009, 14:52
Default
  #3
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Hi Ben,

Usually you want to define physical surfaces for each patch and a physical volume for the whole mesh. From there, I would not worry about a undefined faces warning and would also not define them in the boundary file.

have fun,


-Louis
louisgag is offline   Reply With Quote

Old   April 24, 2009, 15:18
Default
  #4
New Member
 
Ben Connell
Join Date: Apr 2009
Location: Groton, CT, USA
Posts: 6
Rep Power: 17
benconnell is on a distinguished road
Thanks Louis-

I did have defined physical surfaces and a physical volume, but it still gave the warning. Of all the combination of things I thought I tried, I guess I didn't try the right combination. When I finally deleted the defaultFaces patch from the "boundary" file (and reduced the corresponding integer number of faces above by one), I was able to ignore the warning and run successfully.

Thanks very much for your help,
-Ben
benconnell is offline   Reply With Quote

Old   April 24, 2009, 15:20
Default
  #5
New Member
 
Ben Connell
Join Date: Apr 2009
Location: Groton, CT, USA
Posts: 6
Rep Power: 17
benconnell is on a distinguished road
.... in the message above I guess I should have said "integer number of boundary surfaces" (not faces)
benconnell is offline   Reply With Quote

Old   April 24, 2009, 15:28
Default
  #6
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
glad you got it working

-Louis
louisgag is offline   Reply With Quote

Old   October 8, 2010, 11:28
Post Hi
  #7
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi
i deleted defaultFaces, but i don't know where to remove 1 from the faces, can you explain clearly in which file?
because in my boundary File i have:

defaultFaces
{
type patch;
nFaces 0;
startFace 1783;
}


when i delete it all, it says error:
Expected a ')' or a '}' while reading PtrList, etc.....

help please,

is there any better solution by drawing in gmsh and to get these defaultFaces after conversion by gmshToFoam?

thanks a lot
T.D. is offline   Reply With Quote

Old   October 8, 2010, 12:50
Default
  #8
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
In that same file, before the list of faces there is a number, lower that number by one.

Something like

Code:
6
(

face1

face2

...

face6
)
regards,

-Louis
louisgag is offline   Reply With Quote

Old   October 12, 2010, 10:49
Default
  #9
New Member
 
Ben Connell
Join Date: Apr 2009
Location: Groton, CT, USA
Posts: 6
Rep Power: 17
benconnell is on a distinguished road
I think I had originally misspoke in the above thread, but corrected myself. I meant to reduce the indicated number of surfaces by one in the boundary file (as Louis describes), so that the number listed after removing defaultFaces corresponds to the number at top.

I believe someone posted the instructions on how to set up your GMSH file properly so you don't get defaultFaces, but the method described above works for me and is pretty easy so I haven't changed my ways.

Sorry for the late reply (long weekend in the US), and thanks to Louis for picking this up.

-Ben
benconnell is offline   Reply With Quote

Old   October 12, 2010, 13:05
Default Thanks
  #10
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi
thanks a lot
it worked

thanks

T.D.
T.D. is offline   Reply With Quote

Old   March 30, 2015, 10:06
Default gmshtofoam problem, creation of DefaultFaces
  #11
New Member
 
Maxime
Join Date: Mar 2015
Location: Valenciennes
Posts: 4
Rep Power: 11
MaxJets is on a distinguished road
p { margin-bottom: 0.25cm; line-height: 120%; } He llo everyone,


I'm working with OpenFOAM and I would like to study an impinging air jet on a cylinder. I have got a problem with gmshtoFoam. Indeed, I made the geometry and the mesh with GMSH. I defined the boundaries (inlet, outlet … and the internal domain).


GMSH file :
[...]
Physical Surface("Inlet") = {131, 132, 133, 136, 137};
Physical Surface("WallBuse") = {129, 130, 134, 135};
Physical Surface("FinBuse") = { 97, 100, 104, 108};
Physical Surface("Top") = {309, 306, 311, 279, 276, 273, 208, 205, 211, 216, 214, 218, 345, 343, 344, 379, 377, 381, 114, 119, 117, 111, 202, 203};
Physical Surface("Bottom") = {247, 246, 242, 245, 244, 243, 222, 221, 220, 313, 312, 314, 347, 348, 349};
Physical Surface("FrontBack") = {17, 18, 19, 20, 21, 16, 15, 333, 13, 6, 5, 197, 265, 12, 1, 2, 3, 51, 52, 53, 11, 9, 54, 50, 49, 7, 4, 25, 28, 29, 30, 33, 24, 27, 39, 31, 34, 23, 38, 37, 35, 40, 41, 42, 44, 45, 48, 32, 36, 47, 46, 43, 26, 22};
Physical Surface("LeftRight") = {282, 285, 287, 292, 290, 293, 300, 302, 298, 308, 307, 310, 355, 350, 356, 363, 362, 360, 366, 371, 370, 378, 376, 380};
Physical Surface("Cylinder") = {164, 166, 167, 165, 162, 163, 60, 61, 62, 63, 55, 56, 57, 58, 59, 142, 141, 140, 139, 138, 182, 185, 184, 180, 181, 183};


Physical Volume("Internal") = {1:102};




I used gmshtoFoam without problem to conver the mesh to OpenFOAM.
But when I open the boundary file, I can read :
[...]
9
(
FrontBack
{
type patch;
physicalType patch;
nFaces 11308;
startFace 1482584;
}
Cylinder
{
type patch;
physicalType patch;
nFaces 6592;
startFace 1493892;
}
FinBuse
{
type patch;
physicalType patch;
nFaces 1120;
startFace 1500484;
}
Top
{
type patch;
physicalType patch;
nFaces 8224;
startFace 1501604;
}
WallBuse
{
type patch;
physicalType patch;
nFaces 560;
startFace 1509828;
}
Inlet
{
type patch;
physicalType patch;
nFaces 260;
startFace 1510388;
}
Bottom
{
type patch;
physicalType patch;
nFaces 5332;
startFace 1510648;
}
LeftRight
{
type patch;
physicalType patch;
nFaces 11524;
startFace 1515980;
}
defaultFaces ←---------------- ???
{
type patch;
nFaces 1216;
startFace 1527504;
}
)


I don't understand why there is a region called « defaultFaces »
I made a first similar mesh with the same method and I did'nt have this kind of problem


Maybe someone can help me


Thank you in advance


Max
MaxJets is offline   Reply With Quote

Old   March 30, 2015, 10:27
Default
  #12
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

defaultFaces patch consists of the faces at the boundary of your mesh which do not belong to any physical group. You can visualize defaultFaces in paraview to see what you have forgotten.
alexeym is offline   Reply With Quote

Old   March 30, 2015, 11:04
Default
  #13
New Member
 
Maxime
Join Date: Mar 2015
Location: Valenciennes
Posts: 4
Rep Power: 11
MaxJets is on a distinguished road
Hello Alexeym,

Thank you for your answer.
Actually, with Paraview, I can see thaht the defaultFaces is a surface in the internal domain and not at the boundary of my mesh.
MaxJets is offline   Reply With Quote

Old   March 30, 2015, 11:20
Default
  #14
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

With the amount of information you have provided it is rather difficult to diagnose the error. defaultFaces can be two planes in front of each other. It may look as an internal plane but still be two boundary planes.
alexeym is offline   Reply With Quote

Old   March 31, 2015, 01:51
Default
  #15
New Member
 
Maxime
Join Date: Mar 2015
Location: Valenciennes
Posts: 4
Rep Power: 11
MaxJets is on a distinguished road
Hello,

Yes, I know... I can't send you the file.geo because it's too big...
I'm going to check the GSMH script

Thank you a lot for your quick answer
MaxJets is offline   Reply With Quote

Old   March 31, 2015, 08:06
Default
  #16
New Member
 
Maxime
Join Date: Mar 2015
Location: Valenciennes
Posts: 4
Rep Power: 11
MaxJets is on a distinguished road
Ok I found the error. On the GMSH script, a face was defined two times with different label...
Now, it works.

Thank you Alexeym
Divyaprakash likes this.
MaxJets is offline   Reply With Quote

Old   April 7, 2015, 16:25
Default default internalfaces
  #17
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi everybody,

i am simulating a porous wavebreaker and to create the geometry i create internalfaces for better meshing.this faces are named defaultfaces at openfoam, so I dont know how to define them, can i define this faces as empty in the polymesh/boundry folder? is it a good ou a bad idea?

geatings

Rafael
rafa13 is offline   Reply With Quote

Old   April 21, 2015, 19:39
Default Gmsh mesh problem
  #18
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi everybody,

I know that this is not the right thread for this question, but maybe someone of you can help me with this issue.

someone knows how to use the periodic line command on gmsh?

I am trying to force point to mesh each other i a triangle to create a quadrangular mesh but I get a unstructed mesh and the points are not connection to each other.

thanks to all and sorry about the post in a wrong threat.

RM
rafa13 is offline   Reply With Quote

Old   April 22, 2015, 03:43
Cool
  #19
Senior Member
 
louisgag's Avatar
 
Louis Gagnon
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 338
Rep Power: 18
louisgag is on a distinguished road
Send a message via ICQ to louisgag
Dear Rafael,
I remember struggling with Periodic Lines... and I think I gave up because something didn't work when meshing them..
I did succeed in making a structured 2D boundary layer with Gmsh, I think part of the solution comes from the NACA example given on the Gmsh mailing list, which is also the forum where your message might receive a better answer...
http://www.geuz.org/pipermail/gmsh/2009/004532.html
My latest approach for boundary layers was to use « Transfinite Line » and « Transfinite Surface ».
Good luck,
-Louis
louisgag is offline   Reply With Quote

Old   April 22, 2015, 08:23
Default Gmsh mesh problem
  #20
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi Louis,

thanks for you answer and thanks for your help. I have already created a structured mesh with the transfinite line/surface command but the problem is when i am meshing a triangular geometry, the transfinite algorithm connect 2 line and the 3rd line is connected with the opposite vertex.

But thanks a lot i 'm trying my luck at the forum that you recommended.

Greats
Rafael Marques
rafa13 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 07:48
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 03:21
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 10:14.