# 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: 7 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: 10 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: 9 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: 7 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: 10
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: 10 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: 7 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: 10 I think this is the fix for 1.6.x at least: Latest git 1.6.x : cellDistFuncs.H 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: 10
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: 5 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
New Member

Xinguang Wang
Join Date: Feb 2015
Posts: 24
Rep Power: 2
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
New Member

Xinguang Wang
Join Date: Feb 2015
Posts: 24
Rep Power: 2
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.

 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 simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20 nikwin OpenFOAM 3 February 16, 2012 10:27 unoder OpenFOAM Installation 11 January 30, 2008 21:30 liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27 Andrea CFX 2 October 11, 2004 05:12

All times are GMT -4. The time now is 01:29.