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

urgent udf problem, please help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2007, 06:53
Default urgent udf problem, please help
  #1
mehrdad
Guest
 
Posts: n/a
Hi all I'm trying to compile a udf with my problem. when i copmile it, i get some errores from the fluent. one of this errores is "illegal use of this type as an expression". i don,t know why i get this error. some part of my udf is as follow: DEFINE_EXECUTE_AT_END(main_part) {

...

face_t f;

cell_t c0;

Domain *domain;

domain = Get_Domain(1); ----> Thread *t = Lookup_Thread(domain, ID);

Thread *t0 = t -> t0;

... the error is for the line that has ---->.

Thanks for your help.
  Reply With Quote

Old   August 7, 2007, 07:52
Default Re: urgent udf problem, please help
  #2
Joe
Guest
 
Posts: n/a
You havnt defined ID.
  Reply With Quote

Old   August 7, 2007, 08:17
Default Re: urgent udf problem, please help
  #3
mehrdad
Guest
 
Posts: n/a
thank you for your reply, i have defined it, but i didn't show it on my message. i have set it from the boudary condition panel.
  Reply With Quote

Old   August 7, 2007, 08:23
Default Re: urgent udf problem, please help
  #4
Joe
Guest
 
Posts: n/a
This should work:


Domain *domain;
Thread *t;
Thread *t0;
face_t f;
cell_t c0;

domain = Get_Domain(1);
t = Lookup_Thread(domain, ID);

t0 = t -> t0;
  Reply With Quote

Old   August 7, 2007, 08:48
Default Re: urgent udf problem, please help
  #5
mehrdad
Guest
 
Posts: n/a
thank you joe for your replies. i examined your suggestion and it worked correctly. but i have faced with a new problem in my code. i try to dot product two vectores but it not work. this part of my code is:

... c0 = F_C0(f, t); F_AREA(A, f, t); deltemp = C_T_G(c0,t0); Qin = - 1.2 * ND_DOT(deltemp, A) / NV_MAG(A); ...

this error is at the final line of the\is code. and error is "not enough actual parameters for macro 'ND_DOT'".
  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 Problem ozgur Fluent UDF and Scheme Programming 18 January 17, 2016 15:40
Pressure profile UDF for unsteady-state problem? Mohsen Keshavarzian FLUENT 2 August 20, 2008 05:22
parallel UDF problem kerem FLUENT 2 June 20, 2006 07:56
Switch problem! using 2 custom udf laws at the same time HP FLUENT 0 September 15, 2004 10:48
UDF variables F1, y / problem with UDF Fabian FLUENT 6 June 2, 2003 11:22


All times are GMT -4. The time now is 20:57.