CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... (http://www.cfd-online.com/Forums/openfoam-meshing-other/)
-   -   problem importing the mesh to OpenFoam (http://www.cfd-online.com/Forums/openfoam-meshing-other/90216-problem-importing-mesh-openfoam.html)

Stephy July 4, 2011 15:24

problem importing the mesh to OpenFoam
 
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 July 4, 2011 16:10

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" ?

-mAx- July 5, 2011 02:15

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)

chegdan July 11, 2011 10:44

Quote:

Originally Posted by Stephy (Post 314674)
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

kingjewel1 March 25, 2012 18:53

Quote:

Originally Posted by chegdan (Post 315693)
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?


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