|
[Sponsors] |
May 18, 2007, 02:34 |
Please... help with UDF...
|
#1 |
Guest
Posts: n/a
|
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???
|
|
May 19, 2007, 00:24 |
Re: Please... help with UDF...
|
#2 |
Guest
Posts: n/a
|
hi, how u added udf header file in ur computer?can u explain it to me?
|
|
May 21, 2007, 00:08 |
Re: Please... help with UDF...
|
#3 |
Guest
Posts: n/a
|
#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)); } |
|
May 22, 2007, 05:57 |
Re: Please... help with UDF...
|
#4 |
Guest
Posts: n/a
|
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. |
|
May 23, 2007, 01:43 |
Re: Please... help with UDF...
|
#5 |
Guest
Posts: n/a
|
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) } } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |