CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Help for beginners (

chelvistero January 3, 2010 07:41

Help for beginners
Hello, i'm a student and new in using cfd and openfoam 1.6. I have studied the user manual and now i want to start to work with openfoam. I have to simulate e.g. a circulation around a cylinder. I have created a cylinder in Catia and imported it to OpenFoam with Netgen. Is there a possibility to create a space around the imported cylinder so that i can define the flow?

Thank you in advance
Please Help!

phsieh2005 January 3, 2010 08:27


If your geometry is simply a cylinder inside a rectangular box, then, it will be better if you create the mesh using blockMesh (read the manual on how to use blockMesh). Or you can use either use gmsh or cgx to create the geometry/mesh, then, import the mesh to OpenFOAM format (cgx can write the mesh in OpenFOAM format so that it saves you the conversion step).

I will say that blockMesh is the best way for you because you can easily change mesh density if needed later.

Good Luck!


chelvistero January 3, 2010 09:14

thank you for your fast answer.
The cylinder is just my first exercise. When it succeeds I have to analyse more complex geometries which are built from other students in catia. The import of the cylinder over netgen already succeeded an is also shown in paraview. But how to create an mesh around the cylinder to analise an air flow around the cylinder. Can i built a second mesh around the cylinder e.g using blockMesh? Or is my consideration of handling such a problem simply false??

santoo_cfd January 3, 2010 10:46


If you are interested in only studying the physics of flow of around cylinder,I think it is need less to spend time on creating mesh on the imported geometry in openFOAM. You can either import complete mesh from third party software or completely create the mesh for ur problem in openFOAM.

If you choose second option, check the Programmers Guide (Page No-47) you will find complete blockMesh instructions for your problem(flow over a cylinder). just copy them into blockMesh file and create mesh.


chelvistero January 3, 2010 11:08

Ok thank you for your fast answer. I will try your suggestion. I hope i deal with it. :)

Axel_T January 3, 2010 13:08

snappyHexMesh may help
Hi chelvistero,

if I understood your motivation right, you want to learn the procedure of mesh-creating for later (and more difficult) tasks.

Then it might be interesting for you to try out the snappyHexMesh feature, which is described in the UserGuide chapter 5.4. When you put already a stl-surface in the correct dictionary of your case, you would simply have to create a simple mesh with blockMesh, that has the right size to completely surround your geometry. You can verify that by running paraFoam and adding the stl-surface via the open-menue.

After that the snappyHexMeshDict must be edited properly, which is quite a bit complicated at first, but with a little practise you will get used to it. :)

in this forum are several threads about snappy that helped me out a lot.

Greetings and good luck


chelvistero January 3, 2010 15:43

Thank you very much Axel. That was exactly what I'm looking for and helps me a lot.


All times are GMT -4. The time now is 12:54.