CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   How to access Zone ID using dynamic thread (

Ali November 13, 2008 03:17

How to access Zone ID using dynamic thread
Hi I want to get zone ID of a moving boundary in a DEFINE_CG_MOTION macro. I used DT_THREAD and THREAD_ID in my udf but when I printed my results, I got wrong values for zone id. please tell me what is the problem? (note: vel[1] and vel[0] are calculated in previous stages of udf.)

DEFINE_CG_MOTION(motion, dt, cg_vel, cg_omega, time, dtime) {

Thread *t;

int zone;



Message ("ZONE_ID : %g\n",zone);

NV_S(cg_vel, =, 0.0);

NV_S(cg_omega, =, 0.0);

if (zone == 20) /* 20 is a zone ID for a specific

boundary */


cg_vel[0] = vel[1];




cg_vel[0] = vel[0];

} }

All times are GMT -4. The time now is 00:08.