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

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

 July 7, 2010, 03:51 how to find the index of the adjacent cell of one cell? #1 New Member   Join Date: Jun 2009 Posts: 21 Rep Power: 8 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 ?

 July 7, 2010, 22:55 #2 New Member   Join Date: Jul 2010 Posts: 2 Rep Power: 0 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; } }

 July 8, 2010, 03:26 #3 New Member   Join Date: Jun 2009 Posts: 21 Rep Power: 8 Than you very much ! Last edited by jing113cn; July 8, 2010 at 05:15.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Mohsin FLUENT 0 March 10, 2010 03:12 brooksmoses OpenFOAM Post-Processing 2 December 8, 2008 11:00 CF Main CFD Forum 0 December 19, 2007 00:08 Ben Main CFD Forum 5 June 22, 2007 11:23 Noe CFX 3 March 20, 2006 09:33

All times are GMT -4. The time now is 22:35.