CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to find the index of the nearest wall face? (https://www.cfd-online.com/Forums/openfoam-programming-development/179167-how-find-index-nearest-wall-face.html)

ripperjack October 24, 2016 11:00

How to find the index of the nearest wall face?
 
Hi guys,

I know that if I call wallDist, I will get a y field with values of the nearest wall distance. Now if I select a mesh point in the field, how do I know which wall face index of this point's nearest wall distance with respect to? Thanks very much in advance!

Regards,
Jack

ripperjack October 24, 2016 11:04

Quote:

Originally Posted by ripperjack (Post 622776)
Hi guys,

I know that if I call wallDist, I will get a y field with values of the nearest wall distance. Now if I select a mesh point in the field, how do I know which wall face index of this point's nearest wall distance with respect to? Thanks very much in advance!

Regards,
Jack

BTW: I know that I can loop over all the wall faces and find out the index in serial. But in parallel, this calculation is really trick. I am wondering if there is a built-in function that can do the job.

ripperjack November 7, 2016 17:29

Any solution?

david112 December 12, 2016 10:11

Hi Jack,
can you tell me an easy way to compute the walldistance field only for the timestep "0"?
regards,
David

SKLee May 22, 2021 16:11

Hi Jack,

Did you have the solution for this? If you have, please share it to me.

Thanks in advance,

Lee

Quote:

Originally Posted by ripperjack (Post 622776)
Hi guys,

I know that if I call wallDist, I will get a y field with values of the nearest wall distance. Now if I select a mesh point in the field, how do I know which wall face index of this point's nearest wall distance with respect to? Thanks very much in advance!

Regards,
Jack



All times are GMT -4. The time now is 14:51.