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

[Commercial meshers] problem importing the mesh to OpenFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2011, 15:24
Unhappy problem importing the mesh to OpenFoam
  #1
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 14
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, 16:10
Default
  #2
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 14
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, 02:15
Default
  #3
Super Moderator
 
-mAx-'s Avatar
 
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41
-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, 10:44
Default
  #4
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan 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, 18:53
Default
  #5
Senior Member
 
Join Date: Jul 2009
Posts: 260
Rep Power: 17
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


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
Moving mesh problem OpenFoam 141 kassiotis OpenFOAM Running, Solving & CFD 30 April 14, 2015 23:10
[CAD formats] Importing mesh files to OpenFOAM: is obj format viable? sudo OpenFOAM Meshing & Mesh Conversion 3 March 5, 2014 05:14
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
[ICEM] Problem making structured mesh on a surface froztbear ANSYS Meshing & Geometry 4 November 10, 2011 08:52
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


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