|
[Sponsors] |
November 13, 2008, 03:17 |
How to access Zone ID using dynamic thread
|
#1 |
Guest
Posts: n/a
|
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; t=DT_THREAD(dt); zone=THREAD_ID(t); 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]; } else { cg_vel[0] = vel[0]; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF- how to look up a dynamic thread (urgent help) | itoa | Fluent UDF and Scheme Programming | 2 | February 12, 2016 13:51 |
problem on dynamic mesh zone | erkan | FLUENT | 2 | January 8, 2009 17:01 |
Zone threads pointing to a certain cell thread | Michele | FLUENT | 0 | November 14, 2008 10:44 |
Zone access - Scheme language | cfd_newbie | FLUENT | 0 | April 2, 2008 21:13 |
Macro to get Thread/Zone Name | Abhijeet | FLUENT | 4 | March 31, 2006 12:15 |