CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Wall distance in BC

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

LinkBack Thread Tools Display Modes
Old   June 14, 2011, 04:19
Default Wall distance in BC
Sylvain Aguinaga
Join Date: Feb 2010
Posts: 39
Rep Power: 9
Sylvain is on a distinguished road
Hi everybody,

I'm trying to design a boundary condition which prescribes the velocity and other scalars in function of the distance from the ground instead of the z coordinate.
To do so, I planned to use the wallDist function included inside wallDist.H

But if you use this function you need to define the mesh variable, included inside createMesh.H, which requires the runtime variable include in createtime.H, which requires itself variables included in setRootCase.H, which requires the argc and argv variables that I can hardly find.

I didn't found any example of BC which uses the wallDist function, and then I wonder if this function defined in the fvmesh class can be used for the fvPatchfield class. More, I'm surprised that there is no BC which is based on the distance to the wall, so I guess that it is maybe more tricky than it appears…

Thus I have two questions: first, is it possible to use walldist.H for a boundary condition, and if yes how? Second, is there any other way to calculate the wall distance to prescribe a BC?

Thanks ahead for any comments

Sylvain is offline   Reply With Quote

Old   June 14, 2011, 19:54
Senior Member
Julien de Charentenay
Join Date: Jun 2009
Location: Australia
Posts: 230
Rep Power: 11
julien.decharentenay is on a distinguished road
Send a message via Skype™ to julien.decharentenay

I was thinking of doing something similar, but has not found the time to even start to investigate (and my knowledge of OpenFOAM is still limited).

My avenue of exploration were:
1) Look at the wall distance calculation in the domain and recover it on the boundary face (using a zero gradient approximation);
2) Alternatively, try to calculate the wall distance on the face itself (on the 2d approximation).

I would really appreciate if you can keep me updated on your progress (and I will do so if I get to it).

Julien de Charentenay
julien.decharentenay is offline   Reply With Quote


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
udf wall distance segmentation violation gento FLUENT 1 April 15, 2016 15:59
calculating wall distance wallDist volker OpenFOAM Programming & Development 11 May 1, 2015 11:54
distance to wall in given direction nikwin OpenFOAM 3 February 16, 2012 10:27
cell to wall distance azmir CD-adapco 0 March 27, 2007 01:03
Distance to the nearest wall... Michal FLUENT 6 February 13, 2001 15:49

All times are GMT -4. The time now is 03:02.