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

Wall distance volScalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2007, 05:23
Default Hi all, Does anyone have any
  #1
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17
r2d2 is on a distinguished road
Hi all,
Does anyone have any suggestion as to how to define a volScalarField that is the distance to the wall patches in the mesh.
tried:

#include "wallDist.H"

...bla bla

volScalarField d
(
IOobject
(
"d",
runTime.timeName(),
runTime,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("d", dimLength, SMALL),
calculatedFvPatchScalarField::typeName
);

d = wallDist(mesh);

...does not compile...
Error---->(
wallDistance.C: In function âint main(int, char**)â:
wallDistance.C:43: warning: use of old-style cast
/home/radu/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude/wallDist.H:99: error: âFoam::wallDist::wallDist(const Foam::wallDist&)â is private
wallDistance.C:43: error: within this context
make: *** [Make/linuxGcc4DPOpt/wallDistance.o] Error 1



)


Is this going to give me the minimum of the distance (say if I have more than one patch or I have two connected wall patches like in a corner)?
Cheers,
Radu
r2d2 is offline   Reply With Quote

Old   July 19, 2007, 08:17
Default Try d = wallDist(mesh).y()
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Try d = wallDist(mesh).y()
eugene is offline   Reply With Quote

Old   July 19, 2007, 09:01
Default Thanks Eugene, Seems to work
  #3
Member
 
Radu Mustata
Join Date: Mar 2009
Location: Zaragoza, Spain
Posts: 99
Rep Power: 17
r2d2 is on a distinguished road
Thanks Eugene,
Seems to work fine. Tried it with icoFoam/cavity
and OK.
Radu
r2d2 is offline   Reply With Quote

Old   October 10, 2018, 13:54
Default
  #4
Member
 
Join Date: Apr 2016
Posts: 30
Rep Power: 10
shanvach is on a distinguished road
Hi all,

I have a similar query as posted on this thread. Along with the wall distance how do i get the vector joining the point in the domain to the point on the wall?

Thanks and Regards,
Shantanu Vachhani
shanvach 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
UDF: Distance from the wall Gabor FLUENT 6 May 24, 2018 08:27
Wall distance? stein lee Main CFD Forum 4 November 15, 2013 22:26
cell to wall distance azmir Siemens 0 March 27, 2007 02:03
Near wall distance factor Jonas Pedro Caumo CFX 4 December 11, 2006 10:42
Wall distance Student Main CFD Forum 2 August 4, 2005 23:33


All times are GMT -4. The time now is 21:57.