CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   accessing upstream cell - UDF (

bohis April 7, 2008 05:12

accessing upstream cell - UDF
Hi, I am using the following subroutine to access the upstream cell and I am facing the following problem: This subroutine is done for each cell of the fluid domain, but the neighbouring upstream cell is not found for each of them. To make matters worse, it seems very random. I would expect that the neigboring cell should be found in every cell. Do you know where the problem is? Thanks a lot!!!!!

Q=0; c_face_loop(c, t, n) /* loops over all faces of a cell */ { f = C_FACE(c,t,n); /* identify global face index */ tf = C_FACE_THREAD(c,t,n);

if (Q > F_FLUX(f,tf)) { Q = F_FLUX(f,tf); c1 = F_C1(f,tf); /* global index of neighbouring cell */ t1 = F_C1_THREAD(f,tf); }


All times are GMT -4. The time now is 19:47.