CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

gmshToFoam undefined faces

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 6
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: 6
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: Québec, QC, Canada
Posts: 150
Rep Power: 6
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: 6
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: 6
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: Québec, QC, Canada
Posts: 150
Rep Power: 6
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
Location: Nice (Fr)
Posts: 156
Rep Power: 4
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: Québec, QC, Canada
Posts: 150
Rep Power: 6
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: 6
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
Location: Nice (Fr)
Posts: 156
Rep Power: 4
T.D. is on a distinguished road
Hi
thanks a lot
it worked

thanks

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

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
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
Building OpenFoAm on SGI Altix 64bits anne OpenFOAM Installation 8 June 15, 2006 09:27


All times are GMT -4. The time now is 08:07.