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/)
-   -   How to identify different zones using UDF? (https://www.cfd-online.com/Forums/fluent-udf/63973-how-identify-different-zones-using-udf.html)

legendyxg April 25, 2009 08:25

How to identify different zones using UDF?
 
My model has two porous zones with diffenent porosity, so the mass diffusivity coefficients differ and I want to define the diffusivity coefficient seperately in each zone. How can I identify this two different zones? I hope someone can help me, thank you!

gemini May 4, 2009 06:05

You should check the cell thread id number of the domain.

Example:

real id_of_zone_a = 2;
real id_of_zone_b = 4;
real id_of_zone_c = 7;
if(THREAD_ID(c,t) == id_of_zonea)
{
porosity = sometihng
more calculations..
}
else if(THREAD_ID(c,t) == id_of_zonec)
{
porosity = sometihng
more calculations..
}
else if(THREAD_ID(c,t) == id_of_zonec)
{
porosity = sometihng
more calculations..
}

else
{

}




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