CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to get the cellcell center to center distance dx dy dz

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

Like Tree1Likes
  • 1 Post By hjasak

LinkBack Thread Tools Display Modes
Old   August 7, 2008, 22:26
Default Hi, I am trying to implement v
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 10
dbxmcf is on a distinguished road
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!
dbxmcf is offline   Reply With Quote

Old   August 8, 2008, 04:23
Default Hi Roy On patches the inver
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,759
Rep Power: 29
ngj will become famous soon enoughngj will become famous soon enough
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.
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 8, 2008, 04:37
Default mesh.deltaCoeffs() will work.
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,810
Rep Power: 25
hjasak will become famous soon enough
mesh.deltaCoeffs() will work. It is in surfaceInterpolation.H.


mbookin likes this.
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote


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
center of pressure kartik FLUENT 0 July 2, 2008 10:10
center of pressure Filippo FLUENT 2 March 29, 2007 02:48
Center of Pressure Balder Siemens 1 October 13, 2006 13:39
Center of pressure edi FLUENT 0 March 10, 2006 12:45
About Cell Center Harry FLUENT 0 December 3, 2000 05:33

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