CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Unit normal vector of nearest wall (

l_r_mcglashan August 3, 2009 06:17

Unit normal vector of nearest wall

I'm looking to implement a wall lubrication force for multiphase flow. For this I need the unit vector normal of the nearest wall.

I found reflectionVector, and that gives the unit vector normal at the wall. Is there a function to give the unit vector normal of the nearest wall?

hjasak August 4, 2009 02:40

Yes, this is precisely what you need.

It is used in wall reflection terms in Reynolds stress transport turbulence models.



l_r_mcglashan August 4, 2009 04:52

Ah, wallDistReflection! I somehow missed the fact that it inherits from reflectionVector in the class reference. Thank you for the gentle nudge in the right direction.

CHARLES May 13, 2014 17:06


I know that wallDistReflection is what I need to use but I'm not sure how I would use it. Can you please give me an example of how you would implement it in the code?


All times are GMT -4. The time now is 00:44.