CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

how to find the index of the adjacent cell of one cell?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2010, 03:51
Default how to find the index of the adjacent cell of one cell?
  #1
New Member
 
Join Date: Jun 2009
Posts: 22
Rep Power: 16
jing113cn is on a distinguished road
Hello,

I want to get the tempreture in the left cell next to one cell. And there are 4 faces on one cell in my grid. How can I do this with udf ?
jing113cn is offline   Reply With Quote

Old   July 7, 2010, 22:55
Default
  #2
New Member
 
Join Date: Jul 2010
Posts: 2
Rep Power: 0
dayigu is on a distinguished road
Thread *tf;
face_t f;
cell_t c0;
real x[ND_ND], xf[ND_ND];
int n;
real T;

C_CENTROID(x, c, t);
c_face_loop(c, t, n) /* loops over all faces of a cell */
{
tf = C_FACE_THREAD(c,t,n);
f = C_FACE(c,t,n);
F_CENTROID(xf, f, tf);
if is_left_to_the_cell(x, xf) /* is the face left to the cell? */
{
c0 = F_C0(f, tf);
if (c0 == c) /* is itself */
c0 = F_C1(f, tf);
T = C_T(c0,t);
break;
}
}
dayigu is offline   Reply With Quote

Old   July 8, 2010, 03:26
Default
  #3
New Member
 
Join Date: Jun 2009
Posts: 22
Rep Power: 16
jing113cn is on a distinguished road
Than you very much !

Last edited by jing113cn; July 8, 2010 at 05:15.
jing113cn is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Velocity Inlet zone has two adjacent Cell zones Mohsin FLUENT 0 March 10, 2010 02:12
Retrieving boundary patch values adjacent to a given cell brooksmoses OpenFOAM Post-Processing 2 December 8, 2008 10:00
Find fraction of area of cell occupied by body CF Main CFD Forum 0 December 18, 2007 23:08
Algorithm to find cell no. in O-grid for a point Ben Main CFD Forum 5 June 22, 2007 11:23
how to find a specific cell Noe CFX 3 March 20, 2006 08:33


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