- **Fluent UDF and Scheme Programming**
(*http://www.cfd-online.com/Forums/fluent-udf/*)

- - **x and y distance between cell centroids**
(*http://www.cfd-online.com/Forums/fluent-udf/65884-x-y-distance-between-cell-centroids.html*)

x and y distance between cell centroidshi,
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 |

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 |

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