CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   smallestDist / y distance problem (http://www.cfd-online.com/Forums/openfoam-programming-development/85243-smallestdist-y-distance-problem.html)

romant February 21, 2011 06:54

smallestDist / y distance problem
 
1 Attachment(s)
Hej,

I have noticed that the smallestDist function in the class cellDistFuncs

http://foam.sourceforge.net/docs/cpp...lDistFuncs.php

seems to calculate the smallest difference in a way that it gives the wrong distance. I attached a picture in order to show what I mean. The distance towards the center of the channel seems to be right, but when the distances of the cells closer to the wall are supposed to be calculated, they are not the what one expects. In the attached pictures, the only walls are the boundaries on top and bottom. And it reports the cells closest to the wall to have a distance of 1.08 mm. The whole channel on the other hand, as one can see, is only 5.4mm wide.

Does anybody know why this behavior is like this? It doesn't make sense to me.

jms March 17, 2011 08:32

Hi Roman,

I am struggling a lot with this issue too. Have you got any insight for that?
I am doing cfd around an airfoil and I need the correct value of this distance in order to calculate yPlus.

Keep me updated if you get sth! I will do so too!

Regards,

Josť

romant March 17, 2011 08:43

y plus calculations
 
Hej,

in case you want to calculate y plus for compressible flow and turbulence models with wall functions you should be able to do this with
Code:

yPlusRAS
or
Code:

yPlusLES
for LES turbulence models and Reynolds average turbulence models, respectively. For y plus calculations for low Reynolds number turbulence models, you might also wanna follow this thread here http://www.cfd-online.com/Forums/ope...us-values.html which deals with a new calculation tool for y plus. let's hope this might also get fixed in the new release of OF.

jms March 17, 2011 08:51

Hi!

Thank you for your advice. I already know that. I am using RANS, so I started using yPlusRAS but it gives y* instead of y+ (see this thread if you want to read about this...).
Thus, I am using one code from one guy which is an adaptation of yPlusLES to RANS. here you can find it. To calculate y + as you can see in the thread I have sent to you you need the 1st cell height, i.e. I would need the tool you were referring to in the message running well.

Anyway...if you know how to fix this calculation of the nearWall tool, let me know!

Regards,

Josť

romant March 17, 2011 09:01

nearWall
 
I think one way to do this could be by taking the distance normal from the cellCenter (cell at the wall) to the faceCenter (wallpatch). Since the velocity is stored at the cell center, this should then give the velocity at the cell center of the first cell and your y distance from the wall.

jms March 17, 2011 09:07

Thanks Roman. I know this, but I am not very into programming OpenFOAM, this is why I was looking for a code with this already implemented.

Thank you anyway,

Regards,

Josť

romant March 17, 2011 09:08

maybe I will try this out soon, but unfortunately I don't have too much time at the moment. Hopefully, over the coming weeks I will be able to do some more programming.


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