CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

How to access Zone ID using dynamic thread

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2008, 03:17
Default How to access Zone ID using dynamic thread
  #1
Ali
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];

} }
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 23:04.