|
[Sponsors] |
January 24, 2007, 10:15 |
udf
|
#1 |
Guest
Posts: n/a
|
Temp Gradient in UDF
Hi I have a problem accessing the temperature gradient in a UDF. I want to give temperature gradient on the 2-D wall. (Methematical fucntion is T(x)= 30 + ( 1.5 * lxl ) I am writing using DEFINE_PROFILE. I just following UDF manuals Ex. But my udf file didn't warking. I didn't know what is problem.. becuz I'm rookie on fluent. Could anyone help me in this *** cpp file (made by me) *** #include "udf.h" DEFINE_PROFILE(wall_temp,thread,index) { real x[ND_ND]; real temp; face_t f; begin_f_loop(f,thread) { temp = F_T(f,thread); F_UDMI(f,thread,0) = 30 + (1.5 * x ); if (x < 1) x * = - 1 } end_f_loop(f,t) } |
|
January 24, 2007, 15:39 |
Re: udf
|
#2 |
Guest
Posts: n/a
|
there are errors in the udf. F_UDMI(f,thread,0) is reqd. only if a user defined memory is not needed for storing some information.
begin_f_loop(f,thread) will loop over all the faces where you are hooking the udf. get the centroid of each face using the macro F_CENTROID(x,f,thread) u will get x,y,z coordinates as x[0],x[1],x[2] then define your profile F_PROFILE(f,t,i) = f(x,y,z) You may refer the documentations.... Best wishes, Sujith |
|
January 25, 2007, 00:08 |
Re: udf
|
#3 |
Guest
Posts: n/a
|
dear Sugith
Thanks for your advice. I'll more try again. Can I send mail to you when I have a problen about this? Have a nice day. |
|
January 25, 2007, 09:17 |
Re: udf
|
#4 |
Guest
Posts: n/a
|
most welcome
|
|
January 29, 2007, 09:59 |
Re: udf
|
#5 |
Guest
Posts: n/a
|
hi Sujith
I tried again.. But I failed again.. I was so confuse. can you help me? I made new udf file... even though that failed interpreted. ****************************************** #include <udf.h> #include <math.h> DEFINE_PROFILE(temp_wall,thread,position) { real x [ND_ND]; real r,z,y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); r=x[1]; r=sqrt(x*x); F_PROFILE(f,thread,position)=30.+(1.5*r); } end_f_loop(f,thread) } |
|
January 29, 2007, 10:54 |
Re: udf
|
#6 |
Guest
Posts: n/a
|
Hi Sujith
I succeed interpreted. But I failed the compiling.. I don't know what is problem.. ************************************************** ** #include <udf.h> DEFINE_PROFILE(temp_wall,thread,position) { real x [ND_ND]; real a,y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); a=x[1]; F_T(f,thread)=30.+(1.5*fabs(a)); } end_f_loop(f,thread) } I need your help |
|
January 29, 2007, 11:51 |
Re: udf
|
#7 |
Guest
Posts: n/a
|
What is the error message? Probly u will not be havin a recommended microsoft compiler for windows
|
|
January 29, 2007, 21:08 |
Re: udf
|
#8 |
Guest
Posts: n/a
|
Message is
I succeed interpreted. but I failed compiling.. massage aappear after clik Load button at compiling. "pening library "Temp_wall"... Error: open_udf_library: can't not found file. Error Object: ()" And I use visual c++ |
|
|
|
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 |