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

calculating wall distance wallDist

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By su_junwei
  • 1 Post By benk
  • 1 Post By benk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2010, 04:43
Default calculating wall distance wallDist
  #1
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 16
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, 05:17
Default
  #2
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
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, 08:46
Default
  #3
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18
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, 09:24
Default
  #4
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 16
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, 12:26
Default
  #5
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
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
lpz456 likes this.
su_junwei is offline   Reply With Quote

Old   May 10, 2010, 12:09
Default
  #6
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
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, 13:15
Default
  #7
New Member
 
Volker Tritschler
Join Date: Jan 2010
Posts: 20
Rep Power: 16
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, 14:23
Default
  #8
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
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.
benk is offline   Reply With Quote

Old   May 12, 2010, 15:29
Default
  #9
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
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 \
chen wang likes this.
benk is offline   Reply With Quote

Old   April 29, 2015, 18:10
Default Streamwise distance
  #10
Member
 
pooyan
Join Date: Nov 2011
Posts: 62
Rep Power: 15
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, 12:34
Default
  #11
Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
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, 12:54
Default
  #12
Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
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

Old   December 28, 2017, 12:29
Default
  #13
Member
 
Sangeet
Join Date: Jun 2017
Location: India
Posts: 43
Rep Power: 9
sangeet is on a distinguished road
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
sangeet is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
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 06:12


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