CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Udf define_adjust (http://www.cfd-online.com/Forums/fluent-udf/64078-udf-define_adjust.html)

vanni April 28, 2009 14:05

Udf define_adjust
 
Hello guys,

I have a problem while interpreting this udf that modifies omega in a slide mesh simulation.
The error is :
"structure reference not implemented" referring to THREAD_VAR(tc).fluid.omega=a

What is the mistake?
Thank you
Vanni


/*---Begin UDF---*/

#include "udf.h"
#define FLUID_ID 1

DEFINE_ADJUST(omega_adjust,domain)
{
if (first_iteration)
{
Thread *tc;
real a;
a=0.5;
tc = Lookup_Thread(domain,FLUID_ID);
THREAD_VAR(tc).fluid.omega=a;
}
}

/*--END UDF--*/

coglione April 29, 2009 07:24

Hello Vanni,

some macros like THREAD_VAR() can not be used in interpreted udf mode. Compile your source file and it will work.

cheers

vanni April 30, 2009 02:19

Great!!!!

Thank you very much, it worked. :)

Vanni


All times are GMT -4. The time now is 11:37.