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

Udf define_adjust

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2009, 15:05
Default Udf define_adjust
  #1
New Member
 
Join Date: Apr 2009
Posts: 6
Rep Power: 16
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, 08:24
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
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, 03:19
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 6
Rep Power: 16
vanni is on a distinguished road
Great!!!!

Thank you very much, it worked.

Vanni
vanni is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 08:37
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12: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 04:22.