CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Distance to the nearest wall... (http://www.cfd-online.com/Forums/fluent/28208-distance-nearest-wall.html)

 Michal February 13, 2001 05:53

Distance to the nearest wall...

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

 Jonas Larsson February 13, 2001 08:06

Re: Distance to the nearest wall...

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.

 Michal February 13, 2001 09:57

Re: Distance to the nearest wall...

What is a meaning of C_WALL_DIST(c,t) variable?

Michal

 keith February 13, 2001 10:15

Re: Distance to the nearest wall...

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

 Michal February 13, 2001 10:27

Re: Distance to the nearest wall...

Thanks for your explanation - Keith.

Michal

 Jonas Larsson February 13, 2001 11:03

Re: Distance to the nearest wall...

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)

 keith February 13, 2001 15:49

Re: Distance to the nearest wall...

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

 All times are GMT -4. The time now is 20:49.