CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

Udf define_adjust

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 28, 2009, 14:05
Default Udf define_adjust
  #1
New Member
 
Join Date: Apr 2009
Posts: 6
Rep Power: 8
vanni is on a distinguished road
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--*/
vanni is offline   Reply With Quote

Old   April 29, 2009, 07:24
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 8
coglione is on a distinguished road
Hello Vanni,

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

cheers
coglione is offline   Reply With Quote

Old   April 30, 2009, 02:19
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 6
Rep Power: 8
vanni is on a distinguished road
Great!!!!

Thank you very much, it worked.

Vanni
vanni is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
Dynamic Mesh UDF Qureshi FLUENT 1 December 2, 2009 01:27
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


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