CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

calculating wall distance wallDist

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

Like Tree1Likes
  • 1 Post By benk

Reply
 
LinkBack Thread Tools Display Modes
Old   April 28, 2010, 03:43
Default calculating wall distance wallDist
  #1
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 7
volker is on a distinguished road
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
volker is offline   Reply With Quote

Old   April 28, 2010, 04:17
Default
  #2
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Hi volker

Please try the

volScalarField y = wallDist(mesh).y();

y is the distance to the nearest wall.

Junwei
su_junwei is offline   Reply With Quote

Old   April 29, 2010, 07:46
Default
  #3
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 9
idrama is on a distinguished road
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
idrama is offline   Reply With Quote

Old   April 29, 2010, 08:24
Default
  #4
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 7
volker is on a distinguished road
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
volker is offline   Reply With Quote

Old   April 29, 2010, 11:26
Default
  #5
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 10
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Quote:
Originally Posted by idrama View Post
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
su_junwei is offline   Reply With Quote

Old   May 10, 2010, 11:09
Default
  #6
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
benk is on a distinguished road
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?
benk is offline   Reply With Quote

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

cheers, volker
volker is offline   Reply With Quote

Old   May 10, 2010, 13:23
Default
  #8
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
benk is on a distinguished road
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.
benk is offline   Reply With Quote

Old   May 12, 2010, 14:29
Default
  #9
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 10
benk is on a distinguished road
Quote:
Originally Posted by volker View Post
yes, I had the same problem under 1.6.x. but couldn't manage to solve it.
maybe someone can help us!
Try adding this to your Make/options file:

EXE_INC = -I$(LIB_SRC)/meshTools/lnInclude \
benk is offline   Reply With Quote

Old   April 29, 2015, 17:10
Default Streamwise distance
  #10
Member
 
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 5
sam1364 is on a distinguished road
How can we change some parameter based on the streamwise location? Do we have same thing as wallDist.H for streamwise variations?
sam1364 is offline   Reply With Quote

Old   May 1, 2015, 11:34
Default
  #11
New Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 10
Rep Power: 2
JasonWang3 is on a distinguished road
Quote:
Originally Posted by volker View Post
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
JasonWang3 is offline   Reply With Quote

Old   May 1, 2015, 11:54
Default
  #12
New Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 10
Rep Power: 2
JasonWang3 is on a distinguished road
Quote:
Originally Posted by benk View Post
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.
JasonWang3 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20
distance to wall in given direction nikwin OpenFOAM 3 February 16, 2012 10:27
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 04:08.