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

Please... help with UDF...

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2007, 03:34
Default Please... help with UDF...
  #1
Nady
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???
  Reply With Quote

Old   May 19, 2007, 01:24
Default Re: Please... help with UDF...
  #2
sudhir
Guest
 
Posts: n/a
hi, how u added udf header file in ur computer?can u explain it to me?
  Reply With Quote

Old   May 21, 2007, 01:08
Default Re: Please... help with UDF...
  #3
Nady
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));

}
  Reply With Quote

Old   May 22, 2007, 06:57
Default Re: Please... help with UDF...
  #4
rana
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.
  Reply With Quote

Old   May 23, 2007, 02:43
Default Re: Please... help with UDF...
  #5
Nady
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) }

}

}
  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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
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 06:43.