CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   fluent upf---I need help (http://www.cfd-online.com/Forums/fluent-udf/66562-fluent-upf-i-need-help.html)

gyliang July 18, 2009 23:31

fluent udf---I need help
 
Dear friends,
I am a new of using fluent.Recently I want to compare my results with fluent.At the free surface the y-direction gradient of x-direction velocity u and x-direction gradient of temperature have a relation as follows:
du/dy=-dT/dx,dT/dy=0. I write my udf as follows ,but fluent will feed back error when I initialize .Could give me some help ? because most of the time I can not access to this web,so are you kind to contact me at gyliang@cqu.edu.cn? Best wishes !

/************************************************** ****************************
myudf.c
UDF for specifying v gradient of velocity u and temperature at the free surface
************************************************** ****************************/
#include "udf.h"
real xigema = -1; /* the coefficient after dimensioned */

DEFINE_PROFILE(inlet_x_velocity,thread,position)
{
cell_t c;
begin_c_loop(c, thread)
{
C_T_RG(c,thread)[1]=0.0;
C_UDMI(c,thread,0)=C_T_G(c,thread)[0];
C_U_RG(c,thread)[1]=xigema*C_UDMI(c,thread,0);
}
end_c_loop(c, thread)

}


All times are GMT -4. The time now is 07:23.