CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to get the cellcell center to center distance dx dy dz (

dbxmcf August 7, 2008 22:26

Hi, I am trying to implement v
Hi, I am trying to implement vonNeumann and Ritchmyer's artificial viscosity for shock capture, which required a term delta^2, which is the center to center distance (or the vector(dx, dy, dz), the grid distance), how to obtain that with OpenFOAM's field operations?

Thanks a lot!

ngj August 8, 2008 04:23

Hi Roy On patches the inver
Hi Roy

On patches the inverse distance is found as this->patch().deltaCoeffs(). You might find something similar for the interior.
Otherwise, you need to locate owner/neighbour properties for each face and then calculate the distance by hand.

The shock capturing sounds very interesting.

Good luck,


P.S. Have seen a surfaceScalarField definition of deltaCoeffs at some point, but cannot recall where or when.

hjasak August 8, 2008 04:37

mesh.deltaCoeffs() will work.
mesh.deltaCoeffs() will work. It is in surfaceInterpolation.H.



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