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

GmshToFoam example

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 24, 2008, 17:18
Default hej, can I find an example ho
  #1
guillaume
Guest
 
Posts: n/a
hej,
can I find an example how to use gmshToFoam in any of the OpenFOAM downloads?

I want to use a mesh (.msh) generated by gmsh for Navier-Stokes solver.

The openfoamwiki.net describes how to convert a gmsh gemoetry (.geo) file for OpenFOAM using gmsh2ToFoam. Is the '2' in the executable name a typo or is it different from the executable for a .msh?

Guillaume
  Reply With Quote

Old   February 24, 2008, 20:06
Default Hi Guillaume You'll find tw
  #2
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi Guillaume

You'll find two example .msh files CubeVer1.msh and piece-extr-rec.msh.gz under OpenFOAM-1.4.1/applications/utilities/mesh/conversion/gmshToFoam/.

gmsh2ToFoam is a user contributed utility downloadable from wiki and made when gmshToFoam still hadn't supported .msh file format version 2.

Takuya
7islands is offline   Reply With Quote

Old   February 25, 2008, 04:34
Default Thank you, Takuya! I was searc
  #3
guillaume
Guest
 
Posts: n/a
Thank you, Takuya! I was searching through the complete OpenFoam directory for *.msh files, but somehow I missed them in the obvious location.

Now I have applied gmshToFoam succesfully to the CubeVer1.msh. At least there are no error messages, only one warning.

But the CubeVer1.msh doesn't contain any patch names. How can I use it with the icoFoam/cavity example, where movingwall, front, back,... patches names are used to identify the boundary conditions?

Guillaume
  Reply With Quote

Old   February 25, 2008, 21:06
Default Hi Guillaume, You have to che
  #4
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi Guillaume,
You have to check which patch name (patch0, patch1, ...) is assigned to which physical surface number from the message output of gmshToFoam (the number suffixes of patch0, patch1, ... don't necessarily match the physical surface number assigned in a .msh file) during conversion and hand-edit polyMesh/boundary afterwards.

If you'd like to use information contained in $PhysicalNames section of .msh file version 2 format, as far as I know gmsh2ToFoam is the choice so far.

Takuya
7islands 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
GmshToFoam varun Open Source Meshers: Gmsh, Netgen, CGNS, ... 4 March 13, 2012 04:24
GmshToFoam basic question tdzurny Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 August 30, 2009 17:52
GmshToFoam basic question tdzurny Open Source Meshers: Gmsh, Netgen, CGNS, ... 3 December 3, 2007 11:22
Error using gmshToFoam derath OpenFOAM Mesh Utilities 2 April 25, 2007 15:51
GmshToFoam undefined faces derath Open Source Meshers: Gmsh, Netgen, CGNS, ... 7 May 22, 2006 04:54


All times are GMT -4. The time now is 02:17.