|January 16, 2011, 17:44||
DEFINE_ADJUST udf problem
Join Date: May 2009
Posts: 11Rep Power: 10
I'm writing an udf where I first store temperature at the end of each time step. This part work fine - I do it like this:
d = Get_Domain(1);
C_UDMI(c,t,0) = C_T(c,t);
Then in the second part I want to divide current (not converged) temperature with the converged one from the last time step (this one is stored under C_UDMI(c,t,0)).
C_UDMI(c,t,1) = C_UDMI(c,t,0)/C_T(c,t);
To check if it works fluent should give a value of 1 all over domain if I calculate this part in the last (converged) iteration of the new time step, right? - that's because also DEFINE_EXECUTE_AT_END macro will calculate C_UDMI(c,t,0) at this point. I hope I'm making some sense and that it's clear what I'm doing.
If I use DEFINE_ADJUST macro it doesn't give the correct result (1 all over domain at the end of the time step). But if I use DEFINE_EXECUTE_ON_DEMAND it does. It also gives the correct result if I use custom field function tool in Fluent GUI - but this way is not useful for me because I need this variable to define material property further on...
Thanks for any comments and ideas!
|Thread||Thread Starter||Forum||Replies||Last Post|
|ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM||Rizwan||Fluent UDF and Scheme Programming||32||May 8, 2015 06:05|
|what's the problem with my udf||zzyan||FLUENT||0||November 4, 2010 04:56|
|Problem with my udf||july||Fluent UDF and Scheme Programming||3||June 20, 2010 06:56|
|udf compiling problem||akr||FLUENT||3||August 22, 2007 07:14|
|UDF problem||chiseung||FLUENT||4||January 10, 2002 10:58|