|
[Sponsors] |
how to find the index of the adjacent cell of one cell? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2010, 04:51 |
how to find the index of the adjacent cell of one cell?
|
#1 |
New Member
Join Date: Jun 2009
Posts: 22
Rep Power: 17 |
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, 23: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, 04:26 |
|
#3 |
New Member
Join Date: Jun 2009
Posts: 22
Rep Power: 17 |
Than you very much !
Last edited by jing113cn; July 8, 2010 at 06:15. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Velocity Inlet zone has two adjacent Cell zones | Mohsin | FLUENT | 0 | March 10, 2010 03:12 |
Retrieving boundary patch values adjacent to a given cell | brooksmoses | OpenFOAM Post-Processing | 2 | December 8, 2008 11:00 |
Find fraction of area of cell occupied by body | CF | Main CFD Forum | 0 | December 19, 2007 00:08 |
Algorithm to find cell no. in O-grid for a point | Ben | Main CFD Forum | 5 | June 22, 2007 12:23 |
how to find a specific cell | Noe | CFX | 3 | March 20, 2006 09:33 |