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/)
-   -   How to get the cellcell center to center distance dx dy dz (https://www.cfd-online.com/Forums/openfoam-solving/58661-how-get-cellcell-center-center-distance-dx-dy-dz.html)

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,

Niels

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.

Enjoy,

Hrv


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