CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   macro to get Boundary condition (http://www.cfd-online.com/Forums/fluent/32466-macro-get-boundary-condition.html)

Seb November 7, 2003 08:59

macro to get Boundary condition
 
Hi All,

does somebody know any UDF macro to get the type of boundary condition assigned to a boundary face?

Thanks.

ap November 7, 2003 13:26

Re: macro to get Boundary condition
 
If you just want to understand if a face belongs to a face, you can use an if statement like the following:


if (BOUNDARY_FACE_THREAD_P(thread))
{
//Code
}


If you need to know what kind of boundary condition you have, you can do the following:


if (THREAD_TYPE(t) == THREAD_F_INTERIOR) //Interior
{
//Code
}
else if(THREAD_TYPE(t) == THREAD_F_POUTLET) //Pressure outlet
{
//Code
}
else if(THREAD_TYPE(t) == THREAD_F_VINLET) // Velocity inlet
{
//Code
}


changing the THREAD_F_ and adding other if, in order to adapt the if statment to your needs.

Outflow is THREAD_F_OUTFLOW
Pressure inlet is THREAD_F_PINLET

Hi :)

ap


All times are GMT -4. The time now is 12:29.