CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

problem importing the mesh to OpenFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 4, 2011, 16:24
Unhappy problem importing the mesh to OpenFoam
  #1
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 5
Stephy is on a distinguished road
Hello all,
I have created a mesh with gambit and saved it as a .neu file.
when I run "gambitToFoam mesh.neu", everyhing seems to go well, no error.

so here is my question (sorry OpenFoam is very new for me and even after reading the manual, I still have some issues):
Next, I guess I need the BlockMeshDict file to create the mesh by running blockMesh.
but how to write BlockMeshDict ? by myself ? or there is a command so OpenFoam can read all the "boudary", "faces", "neighbour", "owner"... files to create it ?

thank you guys !

Stephy
Stephy is offline   Reply With Quote

Old   July 4, 2011, 17:10
Default
  #2
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 5
Stephy is on a distinguished road
my main problem writing the BlockMeshDict by myself is that on my geometry, I have a "wall" inside the volume, like for example you have a cube, and a small sphere inside the cube (and the outer surface of the sphere is a wall). I defined the sphere with a center and a radius with gambit, but how can I tell that in the blockmeshdict file when it's asking me for "vertices" ?
Stephy is offline   Reply With Quote

Old   July 5, 2011, 03:15
Default
  #3
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 2,873
Rep Power: 29
-mAx- will become famous soon enough
From gambit export your mesh as Fluent mesh (*.msh)
Then import it in OpenFoam with fluentMeshToFoam or fluent3DMeshToFoam.
If you have a mesh with tetra-hexcore, then you need first to use the command utility tpoly (that is not a part of OpenFOAM but Fluent)
__________________
In memory of my friend Hervé: CFD engineer & freerider
-mAx- is offline   Reply With Quote

Old   July 11, 2011, 11:44
Default
  #4
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 527
Rep Power: 17
chegdan will become famous soon enough
Quote:
Originally Posted by Stephy View Post
Hello all,
I have created a mesh with gambit and saved it as a .neu file.
when I run "gambitToFoam mesh.neu", everyhing seems to go well, no error.

so here is my question (sorry OpenFoam is very new for me and even after reading the manual, I still have some issues):
Next, I guess I need the BlockMeshDict file to create the mesh by running blockMesh.
but how to write BlockMeshDict ? by myself ? or there is a command so OpenFoam can read all the "boudary", "faces", "neighbour", "owner"... files to create it ?

thank you guys !

Stephy
Stephy,

When you run the mesh import commands (i.e. fluentMeshToFoam etc.) the polymesh folder and openfoam mesh is created from your .neu or .msh file (personally i prefer to export gambit to .msh and use fluent mesh to foam). You do not need to use blockMesh at this point. blockMesh is only a utility to create a mesh from a blockMeshDict file...and since you are using gambit to create your meshes, you do not need to even think about blockMesh. Just make sure that you have defined your boundary condition types correctly in Gambit (i.e. velocity inlet, wall, pressure-outlet, etc.) and these should be imported correctly into your constant/polymesh/boundary file (consult OF users manual for more clarification on what these types should be)

Just a tip though using gambit. Make sure that if you are exporting a 2d mesh to .msh, you check the 2d mesh box in gambit (maybe the newest version of gambit got rid of this.) Im sure you arelready figured this one out, but I thought I would answer in case others were looking for it.

Dan
chegdan is offline   Reply With Quote

Old   March 25, 2012, 19:53
Default
  #5
Senior Member
 
Join Date: Jul 2009
Posts: 207
Rep Power: 8
kingjewel1 is on a distinguished road
Quote:
Originally Posted by chegdan View Post
Stephy,

When you run the mesh import commands (i.e. fluentMeshToFoam etc.) the polymesh folder and openfoam mesh is created from your .neu or .msh file (personally i prefer to export gambit to .msh and use fluent mesh to foam). You do not need to use blockMesh at this point. blockMesh is only a utility to create a mesh from a blockMeshDict file...and since you are using gambit to create your meshes, you do not need to even think about blockMesh. Just make sure that you have defined your boundary condition types correctly in Gambit (i.e. velocity inlet, wall, pressure-outlet, etc.) and these should be imported correctly into your constant/polymesh/boundary file (consult OF users manual for more clarification on what these types should be)

Just a tip though using gambit. Make sure that if you are exporting a 2d mesh to .msh, you check the 2d mesh box in gambit (maybe the newest version of gambit got rid of this.) Im sure you arelready figured this one out, but I thought I would answer in case others were looking for it.

Dan
Just out of curiosity. Is Gambit still around or has it been been completely superseded by Workbench now?
kingjewel1 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
Moving mesh problem OpenFoam 141 kassiotis OpenFOAM Running, Solving & CFD 29 November 18, 2013 08:06
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
Mesh conversion problem from Salome to openfoam jishnusoni OpenFOAM 15 March 3, 2010 02:53
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Gambit problems Althea FLUENT 21 February 6, 2001 08:05


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