Please... help with UDF...
Who can explain me,,, how can i access to C_UDMI, if before that i recorded some information to C_UDMI(c,t,i)=temperature in one define_profile, then how to get this temperature in another define_profile???
|
Re: Please... help with UDF...
hi, how u added udf header file in ur computer?can u explain it to me?
|
Re: Please... help with UDF...
#include "udf.h" #include "mem.h"
DEFINE_PROFILE(av_temp_out,t, index) { real tavg; real x[ND_ND],y,tavg1,s,s1; face_t f; s=0; tavg1=0; begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; tavg=F_T(f,t); s1=y*y*3.14; s+=s1; tavg1 +=tavg*s1; } end_f_loop(f,t) tavg1/=s; printf("\n Tavg1 = %g \n",tavg1); F_UDMI(f,t,0) = tavg1; } DEFINE_PROFILE(av_temp_in,t,index) { face_t f; int UDM_checked = 0; F_PROFILE(f,t,index)=F_UDMI(f,t,0); printf("\n F_PROFILE(f,t,index) = %g \n", F_PROFILE(f,t,index)); } |
Re: Please... help with UDF...
dear nady and sudhir,
i am struggling for the last few months to make 2 UDFs. can u help me out pls. i am trying udfs for the DPM phase. ur help will be lot for me. kind regards. |
Re: Please... help with UDF...
I didn't find any answers on how to make it, and therfore i made it in another way:
#define WALL_ID 14 #define WALL_ID1 15 DEFINE_EXECUTE_AT_END(aver_temp) { Domain *d; Thread *t; real x[ND_ND],y,tavg1,s,s1,tavg; face_t f; real time=CURRENT_TIME; d = Get_Domain(1); s=0; tavg1=0; thread_loop_f (t,d) { if(THREAD_ID(t)==WALL_ID) { begin_f_loop(f,t) { F_CENTROID(x,f,t); y=x[1]; tavg=F_T(f,t); s1=y*y*3.14; s+=s1; tavg1 +=tavg*s1; } end_f_loop(f,t) } } tavg1/=s; thread_loop_f(t,d) { if (THREAD_ID(t)==WALL_ID1) { begin_f_loop(f,t) { if (time<=86400) F_T(f,t)=tavg1; else F_T(f,t)=290; } end_f_loop(f,t) } } } |
All times are GMT -4. The time now is 09:52. |