# calculating wall distance wallDist

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

 April 28, 2010, 03:43 calculating wall distance wallDist #1 New Member   Volker Tritschler Join Date: Jan 2010 Posts: 20 Rep Power: 16 hi all, I need to calculate the nearest wall distance within a solver code to add a damping function. I know that there is a tool wallDist that does the job. and in order to make use of wallDist one has to include the wallDist.H file. But somehow I'm failing to call the function in the right way. I went through some code files and within the turbulence models they always put: Code: ```#include "wallDist.H" wallDist y_;``` in order to create a volScalarField y_ which gives the distance to the nearest wall. thanks for any help! greets, volker

 April 28, 2010, 04:17 #2 Senior Member     su junwei Join Date: Mar 2009 Location: Xi'an China Posts: 151 Rep Power: 20 Hi volker Please try the volScalarField y = wallDist(mesh).y(); y is the distance to the nearest wall. Junwei

 April 29, 2010, 07:46 #3 Senior Member   Claus Meister Join Date: Aug 2009 Location: Wiesbaden, Germany Posts: 241 Rep Power: 17 Hey Foamers! I have a similar problem: I want to the velocity vector for the first node point to the wall. Can I use wallDist.H somehow? Cheers

 April 29, 2010, 08:24 #4 New Member   Volker Tritschler Join Date: Jan 2010 Posts: 20 Rep Power: 16 I'm calling wallDist.H as Junwei suggested. but on solver-level it doesn't seem to work. actually not due to the call of wallDist.H (which seems to be correct) but due to some header file which cannot be found. maybe someone has an idea how to get rid of that problem, or how to get the wall distance within a solver code in an accurate way? many thanks and greets volker

April 29, 2010, 11:26
#5
Senior Member

su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
Quote:
 Originally Posted by idrama Hey Foamers! I have a similar problem: I want to the velocity vector for the first node point to the wall. Can I use wallDist.H somehow? Cheers
wallDist used the cell center when calculating the distance not the mesh points.

Junwei

 May 10, 2010, 11:09 #6 Senior Member   Ben K Join Date: Feb 2010 Location: Ottawa, Canada Posts: 140 Rep Power: 19 I need the distance from the wall for my solver but when I compile my solver I get this error under 1.5-dev: /usr/local/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/wallDist.H:66:27:error: cellDistFuncs.H: No such file or directory When I search for cellDistFuncs.H, I find it in this directory: /usr/local/OpenFOAM/OpenFOAM-1.5-dev/src/meshTools/cellDist Does anybody know how to fix this?

 May 10, 2010, 12:15 #7 New Member   Volker Tritschler Join Date: Jan 2010 Posts: 20 Rep Power: 16 yes, I had the same problem under 1.6.x. but couldn't manage to solve it. maybe someone can help us! cheers, volker

 May 10, 2010, 13:23 #8 Senior Member   Ben K Join Date: Feb 2010 Location: Ottawa, Canada Posts: 140 Rep Power: 19 I think this is the fix for 1.6.x at least: http://www.cfd-online.com/Forums/ope...stfuncs-h.html I'm guessing it's the same for 1.5-dev as well. JasonWang3 likes this.

May 12, 2010, 14:29
#9
Senior Member

Ben K
Join Date: Feb 2010
Posts: 140
Rep Power: 19
Quote:
 Originally Posted by volker yes, I had the same problem under 1.6.x. but couldn't manage to solve it. maybe someone can help us!

EXE_INC = -I\$(LIB_SRC)/meshTools/lnInclude \

 April 29, 2015, 17:10 Streamwise distance #10 Member   pooyan Join Date: Nov 2011 Posts: 62 Rep Power: 14 How can we change some parameter based on the streamwise location? Do we have same thing as wallDist.H for streamwise variations?

May 1, 2015, 11:34
#11
Member

Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
Quote:
 Originally Posted by volker yes, I had the same problem under 1.6.x. but couldn't manage to solve it. maybe someone can help us! cheers, volker
Hi Volker

I met the same problem. I copy the kOmegaSST model and rename it and then build it. It's no problem. But in my case, it's wrong like yours.

Have you solved this problem?

jason

May 1, 2015, 11:54
#12
Member

Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
Quote:
 Originally Posted by benk Try adding this to your Make/options file: EXE_INC = -I\$(LIB_SRC)/meshTools/lnInclude \
This file is in the option file. I don't think this is the key to this problem.

 December 28, 2017, 11:29 #13 Member   Sangeet Join Date: Jun 2017 Location: India Posts: 43 Rep Power: 9 Hello, I also need the nearest wall distance for applying wall boundary condition to Omega in kOmegaSST turbulence model, can someone help me on exactly how to get this value? Thank You