CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Wall distance volScalarField

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

Reply
 
LinkBack Thread Tools 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: 96
Rep Power: 7
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: 11
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: 96
Rep Power: 7
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

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
Wall distance? stein lee Main CFD Forum 4 November 15, 2013 22:26
cell to wall distance azmir CD-adapco 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
UDF: Distance from the wall Gabor FLUENT 4 August 19, 2002 02:26


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