# Distance to the nearest wall...

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

 February 13, 2001, 05:53 Distance to the nearest wall... #1 Michal Guest   Posts: n/a Hi, How can I obtain a normal distance from any point in computational domain to the nearest wall - for UDF purposes. I need to define a wall-distance based, turbulent Reynolds number so I have to know this... Thanks Michal

 February 13, 2001, 08:06 Re: Distance to the nearest wall... #2 Jonas Larsson Guest   Posts: n/a You can't do this in Fluent. This is also why Fluent does not offer any y+ dependent near-wall turbulence models. Your best bet is to derive a wall y* based on turbulent quantities instead. That is what Fluent does. I guess that this lack of nearest-wall distance was an early design-decision for their unstructured solver - keeping track of this everywhere would give too much overhead. I miss this feature a lot in post-processing. Being able to extract data at a certain y+ isn't possible either, for example.

 February 13, 2001, 09:57 Re: Distance to the nearest wall... #3 Michal Guest   Posts: n/a Thanks for your reply - Jonas. What is a meaning of C_WALL_DIST(c,t) variable? Michal

 February 13, 2001, 10:15 Re: Distance to the nearest wall... #4 keith Guest   Posts: n/a The variable C_WALL_DIST(c,t) will in fact give you the distance to the nearest wall, with one small caveat. It appears that Fluent calculates the distance to the nearest wall bordering the particular cell zone that your cell is within. If the (physically) nearest wall is actually bounding a different cell zone, Fluent won't "see" it. Fortunately, this is rarely a problem, and I also have to admit that a couple of versions have come out since I noticed this, and it may be different now. For almost all problems, C_WALL_DIST(c,t) will work fine. Now, what is tricky is finding the _vector_ definition to the nearest wall... Keith

 February 13, 2001, 10:27 Re: Distance to the nearest wall... #5 Michal Guest   Posts: n/a Thanks for your explanation - Keith. Michal

 February 13, 2001, 11:03 Re: Distance to the nearest wall... #6 Jonas Larsson Guest   Posts: n/a Interesting. Does this mean that this routine will work also for interior cells as long as the cell is within the same zone as the nearest wall? I thought the distance was only available for cells bordering to walls. Do you know how the distance is defined for interior cells? (I assume that they don't compute the correct normal distance)

 February 13, 2001, 15:49 Re: Distance to the nearest wall... #7 keith Guest   Posts: n/a Yes, the C_WALL_DIST(c,t) variable gives values for all interior cells as well as 1st-layer cells. And my experience has been that it gives the distance to the nearest wall bounding its own cell zone, although that may have been changed in the latest versions to find the nearest wall regardless of cell zone. You can actually display contours of this variable under "Grid-->Cell Wall Distance" from the GUI, and it appears to be just the shortest distance to any wall. My guess is that whenever you initialize a .dat file, the routine loops through each interior cell and then in a nested loop through all boundary faces, calculates the distance between their centroids, and keeps the smallest one it finds. Regards, Keith

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post rr123 Fluent UDF and Scheme Programming 39 March 14, 2017 02:41 simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20 Sylvain OpenFOAM 1 June 14, 2011 19:54 alex FLUENT 2 December 24, 2010 22:31 Andrea CFX 2 October 11, 2004 05:12

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