CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Bug in wall distance calculation (

david November 24, 2010 10:41

Bug in wall distance calculation
1 Attachment(s)
Hi everybody

I found a problem with the wall distance calculation in conjunction with cyclic patches in OpenFOAM 1.7.x and 1.5-dev. I will describe it for 1.5-dev as the rotationaAngle in 1.5-dev could help us to find the root of the problem.

Unfortunately I couldn't reproduce this bug with simpler meshes. The geometry is the inlet section (straight pipe) of my case with rotational periodicity (360░/7). I converted the mesh with fluentMeshToFoam from a fluent mesh file. It doesn't help to use fluent3DMeshTofoam. checkMesh doesn't report any problem. The settings of the cyclic patch are:

type cyclic;
nFaces 3120;
startFace 236890;
featureCos 0.9;
transform rotational;
rotationCentre (0 0 0);
rotationAxis (0 0 1);
rotationAngle -51.42857;

This setup gives me a "correct" Urel, k, omega and pressure but the result of the wall distance is wrong. I get the same results in 1.7.x and 1.5-dev.

If I change the rotationAngle to 51.42857, the simulation does not converge due to the wrong transformation of the velocity vectors at the cyclic patches. The big surprise is that the wall distance seems to be correct in this case. The attached image shows the wall distance y for a positive and negative rotation angle.

I could imagine that the problem can be found somewhere in FaceCellWave.C. I will try to find it but maybe somebody is faster than me. If anybody is interested I can send him the mesh.

Best regards

david November 26, 2010 12:32

david December 1, 2010 12:46

fixed in 1.7.x

jms March 15, 2011 11:32


I am using the files in yPlus.tar.gz from the thread This uses the nearWallDist.H file you are talking about in here. I had a look at the values of this d (nearWallDistance). I expected them to be the same all over the airfoil I am computing (since I am using a mesh with constant 1st cell height of 2.75e-5). To be sure that this is constant after having converted it to OF, I checked that in a post processor and this 1st cell height is constant, so there are no "conversion issues"). :S

What I get is that this value of nearWallDistance oscillates between 9e-6 and 1.3e-05. I don┤t like this because the value of the computed yPlus then is not perfect.

Can you tell me anything about this?




All times are GMT -4. The time now is 00:40.