CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Distance between boundary cell and boundary face (https://www.cfd-online.com/Forums/openfoam-solving/167109-distance-between-boundary-cell-boundary-face.html)

STutexas February 23, 2016 16:07

Distance between boundary cell and boundary face
 
Hi

I wanted to find out if there is a function in OpenFOAM that directly gives you the distance between boundary cell center and boundary face centre. I wanted to use it for coding my boundary condition.

I know that there is function (\delta()) that exists in swak4foam in groovyBC but I cannot directly use it in OpenFOAM.

Thank you.

Saurabh

Artur March 13, 2016 07:40

Hi,

If you have a look at yPlus.C (in OF 3.0.0):

Code:

volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
which should do what you need I think. The description of this class reads:
"Distance calculation for cells with face on a wall. Searches pointNeighbours to find closest."

All the best,

A


All times are GMT -4. The time now is 10:20.