|
[Sponsors] |
January 29, 2007, 10:08 |
UDF help (about temp gradient)
|
#1 |
Guest
Posts: n/a
|
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 spent a lot of time with manual. But I failed. I need your help. |
|
January 29, 2007, 10:59 |
Re: UDF help (about temp gradient)
|
#2 |
Guest
Posts: n/a
|
Use DEFINE_profile macro, F_T and F_centroid. read centroid of the cell, assingn x(0) to a variable, and define the function on each face as F_T(f,t)= 30 + (1.5 * fabs(a)).where a=x(0). I hope this should work. All the best.
|
|
January 29, 2007, 11:12 |
Re: UDF help (about temp gradient)
|
#3 |
Guest
Posts: n/a
|
thanks for your advice.
I tried.. But that couldn't interpreted.. and I don't know what is problem.. when I tried interpreted, than message came out -line 13: a: undeclared variable can you help me? my ccp file is ************************************************** * #include <udf.h> DEFINE_PROFILE(temp_wall,thread,position) { real x [ND_ND]; real r,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) } |
|
January 29, 2007, 11:29 |
Re: UDF help (about temp gradient)
|
#4 |
Guest
Posts: n/a
|
you have not defined variable a, use r instead or define real a instead of real r,y; ur udf. u r using x[1], i hope ur wall is in y direction.
|
|
January 29, 2007, 11:45 |
Re: UDF help (about temp gradient)
|
#5 |
Guest
Posts: n/a
|
thanks a lot. I succeed interpreted. but I failed compiling..
massage aappear "pening library "Temp_wall"... Error: open_udf_library: μ§μ λ νμΌμ μ°Ύμ μ μ-μ΅λλ€.(<--KOREAN) Error Object: ()" what's prlblem? |
|
January 29, 2007, 11:49 |
Re: UDF help (about temp gradient)
|
#6 |
Guest
Posts: n/a
|
And my wall is in X direction
--------------------------->(wall-direction) and My changed cpp file is ************************************************** * #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) } |
|
January 30, 2007, 00:40 |
Re: UDF help (about temp gradient)
|
#7 |
Guest
Posts: n/a
|
Hi, I am able to compile as well as load. try the following udf. Keep the [filename].c file in your working directory.. and confirm that you have a c compiler.
#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[0]; F_T(f,thread)=30.+(1.5*fabs(a)); } end_f_loop(f,thread) } |
|
January 30, 2007, 00:41 |
Re: UDF help (about temp gradient)
|
#8 |
Guest
Posts: n/a
|
x[0], x[1], x[2] stands for x,y and z dirctn respetively. If you ahve your wall in x direction use x[0]
|
|
January 30, 2007, 01:04 |
Re: UDF help (about temp gradient)
|
#9 |
Guest
Posts: n/a
|
Thanks a lot Pinks.
I use visual C++. But I don't know why didn't compiling. I'll try again. (I got it about problem. udf coding is work, and compiler has a problem. is correct?) And can I ask again if I continually failed ? Have a nice day.. see ya |
|
January 30, 2007, 02:10 |
Re: UDF help (about temp gradient)
|
#10 |
Guest
Posts: n/a
|
Finally, I found problem.
my c compiler has not udf.h file. bottom is message when try compiling to use C++ --------------------Configuration: temp_wall - Win32 Debug-------------------- Compiling... temp_wall.cpp d:\fluenty\c++\temp_wall.cpp(1) : fatal error C1083: Cannot open include file: 'udf.h': No such file or directory Error executing cl.exe. temp_wall.exe - 1 error(s), 0 warning(s) how can I do it ? |
|
January 31, 2007, 01:02 |
Re: UDF help (about temp gradient)
|
#11 |
Guest
Posts: n/a
|
Fluent provides free compiler visual studio.NET at the following link http://www.fluentusers.com/support/i...udf_serial.htm. If you are licensed user you can download. You just need to launch Fluent the .net command prompt.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to Access Wall Normal Concentration Gradient | Daniel Tanner | Fluent UDF and Scheme Programming | 4 | February 18, 2015 15:35 |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
UDF temp gradient tutotial | tejasvikrishna | FLUENT | 0 | April 4, 2011 12:10 |
UDF for Species Mass Fraction Gradient *IN SPECIFIC ZONE * -- e.g. along axis of sym. | ksiegs2 | Fluent UDF and Scheme Programming | 0 | February 27, 2011 13:55 |
UDF for species-mass-fraction gradient at outlet | sisir | FLUENT | 0 | June 9, 2007 03:40 |