CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

smallestDist / y distance problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 21, 2011, 06:54
Default smallestDist / y distance problem
  #1
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
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.
Attached Images
File Type: png yDistanceBehavior.png (23.2 KB, 39 views)
__________________
~roman
romant is offline   Reply With Quote

Old   March 17, 2011, 08:32
Default
  #2
jms
Member
 
Josť
Join Date: Jan 2011
Posts: 73
Rep Power: 6
jms is on a distinguished road
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ť
jms is offline   Reply With Quote

Old   March 17, 2011, 08:43
Default y plus calculations
  #3
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
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 low reynolds re turbulence boundary and yPlus values which deals with a new calculation tool for y plus. let's hope this might also get fixed in the new release of OF.
__________________
~roman
romant is offline   Reply With Quote

Old   March 17, 2011, 08:51
Default
  #4
jms
Member
 
Josť
Join Date: Jan 2011
Posts: 73
Rep Power: 6
jms is on a distinguished road
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ť
jms is offline   Reply With Quote

Old   March 17, 2011, 09:01
Default nearWall
  #5
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
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.
__________________
~roman
romant is offline   Reply With Quote

Old   March 17, 2011, 09:07
Default
  #6
jms
Member
 
Josť
Join Date: Jan 2011
Posts: 73
Rep Power: 6
jms is on a distinguished road
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ť
jms is offline   Reply With Quote

Old   March 17, 2011, 09:08
Default
  #7
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 360
Rep Power: 12
romant is on a distinguished road
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.
__________________
~roman
romant is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Heat Transfer problem (two different fluids) Jon FLUENT 5 February 20, 2008 07:56
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Problem in Tutorial problem of fluent Phanindra FLUENT 5 April 17, 2007 09:57
GAMBIT meshing problem Gauthier Lambert Main CFD Forum 1 August 3, 2000 09:22


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