|
[Sponsors] |
June 29, 2009, 14:26 |
x and y distance between cell centroids
|
#1 |
Member
Akour
Join Date: May 2009
Posts: 79
Rep Power: 17 |
hi,
I am looking to implement a finite volume equation directly via the connectivity macros available, and ive come across the 'ds' as the distance between centroids. I dont really want a generic distance between centroids however, I would like the dx and dy values...since I have an orthogonal grid, and want to calculate individual vectors. is there a function which outputs the x distance between two centroids and faces, and the y distance between them as well (as its cycling across all the cells/faces)?...my grid is non-uniform. ideally i would like to represent cells in terms of a sort of north,south,east,west type coordinate system, but I cant see how to do that with a UDF. can someone please help.. Thanks ak |
|
June 30, 2009, 03:44 |
|
#2 |
Member
Join Date: Mar 2009
Location: Istanbul, Turkiye
Posts: 47
Rep Power: 17 |
Hi,
Use C_CENTROID (UDF manual Section 3.2.2) and F_CENTROID (UDF manual Section 3.2.3) to obtain the coordinates of cell center and face center. Then you can easily calculate any distance you wish... best luck Gemini |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
calculate distance from wall to neighbourig cell centroid | rr123 | Fluent UDF and Scheme Programming | 39 | March 14, 2017 02:41 |
cell to wall distance | azmir | Siemens | 0 | March 27, 2007 02:03 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |
cell to cell relation | CMB | Siemens | 1 | December 4, 2003 05:05 |