CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

x and y distance between cell centroids

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

LinkBack Thread Tools Display Modes
Old   June 29, 2009, 13:26
Default x and y distance between cell centroids
Join Date: May 2009
Posts: 79
Rep Power: 10
ak6g08 is on a distinguished road

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)? 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..

ak6g08 is offline   Reply With Quote

Old   June 30, 2009, 02:44
Join Date: Mar 2009
Location: Istanbul, Turkiye
Posts: 45
Rep Power: 10
gemini is on a distinguished road

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 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
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 01:03
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB Siemens 6 November 15, 2004 05:41
cell to cell relation CMB Siemens 1 December 4, 2003 05:05

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