CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 29, 2009, 13:26
Default x and y distance between cell centroids
  #1
Member
 
Akour
Join Date: May 2009
Posts: 79
Rep Power: 8
ak6g08 is on a distinguished road
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
ak6g08 is offline   Reply With Quote

Old   June 30, 2009, 02:44
Default
  #2
Member
 
Join Date: Mar 2009
Location: Istanbul, Turkiye
Posts: 45
Rep Power: 8
gemini is on a distinguished road
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
gemini is offline   Reply With Quote

Reply

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 27 March 20, 2015 04:38
cell to wall distance azmir CD-adapco 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 CD-adapco 6 November 15, 2004 05:41
cell to cell relation CMB CD-adapco 1 December 4, 2003 05:05


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