CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   potentialFoam around a sphere ; mesh by Gmsh (

eliam April 23, 2009 10:50

potentialFoam around a sphere ; mesh by Gmsh
Hi all

I'm new in OpenFOAM. I use it for an automotive application but I want to begin with easier cases.

I'm trying to study the flow around a sphere with potentialFoam (as a begin).
I made my sphere with blender, exported it in STL format.
I make the fluid domain and the mesh with Gmsh.
I import the .msh file with gmsh2ToFoam.
checkMesh give me OK in spite of non-orthogonal faces.
potentialFoam seems to work well.
But when I posttreat the results I see that the velocity magnitude reach more than 7000 m/s (I had 40 m/s in inlet, with 1 m/s it reaches more than 1000 m/s).

I run the potentialFoam/cylinder example case whithout any problem.
I think that the problem comes from the mesh but I don't know any more where to look for.
My case folder is online at : (4.1 M)

Any help would be welcome ;).

Thank you


eliam April 24, 2009 05:33

Hi all

I just tried my case with a mesh generated by snappyHexMesh from the same STL sphere. I have now "good" results.
So the problem come from the mesh.
Maybe the topic should be moved to the mesh part. Sorry.

Has somebody idea to generate a "good" mesh with Gmesh ? (or other OpenSource Mesher).



eliam April 24, 2009 09:06

Checking two options in Gmesh I get a good mesh :

Tools / Options / Mesh / Advanced
- Optimize quality of tetraedra
- Optimize quality of tetraedra with NetGen

chiven July 27, 2009 20:31

Hi, Eliam, I meet the same problem just like yours. My mesh is converted from Fluent. checkMesh also give me OK, and potentialFoam seems to work well.
However some velocity magnitudes reach very large (over 1e+06).
And my case is very complicated, I am not sure it can be generated by snappyHexMesh. Do you have any comments?

Thank you.

eliam July 28, 2009 02:36

Hi Chiven.

"Ok" by checkMesh seems to be not enough. Have you non-orthogonal faces ?

chiven July 28, 2009 03:00

Hi, Eliam, thanks for your friendly reply. The follows are the prompt when run checkMesh.
Best regards,

Create polyMesh for time = constant
Time = constant
Mesh stats
points: 289762
faces: 3121097
internal faces: 2980747
cells: 1525461
boundary patches: 7
point zones: 0
face zones: 0
cell zones: 0
Number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 1525461
polyhedra: 0
Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).
Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
wall 134626 67762 ok (non-closed singly connected)
pump-in 334 200 ok (non-closed singly connected)
ec-in 54 37 ok (non-closed singly connected)
dc-left 1218 703 ok (non-closed singly connected)
dc-bot 1450 849 ok (non-closed singly connected)
dc-right 1220 704 ok (non-closed singly connected)
dc-top 1448 848 ok (non-closed singly connected)
Checking geometry...
Overall domain bounding box (-0.32 -0.1035 -0.5) (2.90989 2.38459 0.2)
Mesh (non-empty) directions (1 1 1)
Mesh (non-empty, non-wedge) dimensions 3
Boundary openness (4.85517e-17 2.16681e-16 1.84246e-17) OK.
Max cell openness = 2.71454e-16 OK.
Max aspect ratio = 8.39433 OK.
Minumum face area = 7.73192e-06. Maximum face area = 0.000113308. Face area magnitudes OK.
Min volume = 1.21101e-08. Max volume = 3.44939e-07. Total volume = 0.151526. Cell volumes OK.
Mesh non-orthogonality Max: 66.6416 average: 19.7369
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.956777 OK.
Mesh OK.

eliam July 28, 2009 06:02

Your mesh seems good. Have you post-processed your case to see the zone where the velocity is weirb ?
I don't use OpenFOAM for several months so I don't remember very good all the tricks I discovered.

But reading your report again I wonder if your max skewness isn't a little high. (try to be under 0.85).

Good luck !

chiven July 28, 2009 06:19

Hi, dear Eliam, thank you very much for you precious time and patience. I do have seen the velocity distribution from paraFoam. The form of my case is not so regular. I am wondering whether OpenFoam can deal with so much complicated case.
Thank you again.
best regards,

eliam July 28, 2009 07:40

Hi Chiven

I'm not a specialist but I think that OpenFoam can compute complicated cases. (see the examples on the website) but you need a very good mesh.

Have you compared the areas where you have high value of velocity and areas where you have high skewness ?

chiven July 28, 2009 09:41

Hi, Eliam, I have checked the areas with large velocity, and written a report, and sent to my boss. I shall discuss with him tomorrow. It is time of 10:41 PM in Japan. However, about the skewness, I can not check it, my fluent mesh is from my boss. And I shall also discuss this point with him. When I solve this problem, I shall also tell you the answer.

Good news, the release 1.6 is published! There are many new funcitons.

By the way, what is the experted engineering case using OpenFoam? Many people have also asked me what are the most successful engineering application examples by OpenFoam. But my computer is not able to open the Examples_of_Application webpage, maybe I can do it in my dormitory. I found many people only used OpenFoam to do some simple cases, and stopped.

Thank you very much.

Best regards,

kongfu January 4, 2011 10:57


Originally Posted by eliam (Post 224343)
Hi Chiven.

"Ok" by checkMesh seems to be not enough. Have you non-orthogonal faces ?

Hi Eliam,

I have the same problem. I'm using Tetrahedron meshs, and some velocity magnitudes are 10000 after potentialFoam. My inlet velocity is just 69.

Do you think it's probably the problem of mesh? Number of non-orthogonal faces: 109669

Thank you very much.

eliam January 5, 2011 07:39

Try to have no more non-orthogonale faces ;-)

MatejAndrej January 26, 2011 04:02

Hello Eliam

Can you please share with me your initial and boundary conditions you used for potential flow around the sphere or something else. It seem's I have some problems at boundary.

Thank you in advance.


All times are GMT -4. The time now is 19:10.