CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Check if face is Boundary (https://www.cfd-online.com/Forums/fluent-udf/210624-check-if-face-boundary.html)

HorstvanGrass October 31, 2018 06:32

Check if face is Boundary
 
Hi,
I'm looping over cells and than of each cell I'm looping over the faces. Each time I got a face I want to check if it's a boundary zone face. Is there a macro, which is resolving this?
d = Get_Domain(1); /* mixture domain if multiphase */
thread_loop_c(t,d)
{

begin_c_loop(c,t)

check_if_boundary(f,t);
c_face_loop(c, t, n)
{
f = C_FACE(c,t,n);

faces[n]=f;
}

obscureed October 31, 2018 16:02

Hi Yann,


You won't get very far with "f=C_FACE(c,t,n);" without "ft=C_FACE_THREAD(c,t,n);" as well. When you have the thread ft (which is of type Thread*), you can test that using BOUNDARY_FACE_THREAD_P(ft) -- check it out in the UDF manual.


You can get other information about the thread type -- see for example https://www.cfd-online.com/Forums/fl...-boundary.html. Remember that each face of a cell could be in a different thread.


Good luck!
Ed

HorstvanGrass November 2, 2018 09:26

Thx, it worked!


All times are GMT -4. The time now is 03:28.