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/)
-   -   First UDF with temperature (http://www.cfd-online.com/Forums/fluent-udf/99616-first-udf-temperature.html)

Kwiaci April 7, 2012 17:28

First UDF with temperature
 
Hello everyone!

I try to write an UDF which will be defining a temperature or heat flux profile on the front wall of my model. It would be ideally to use example UDF from manual wit necessary changes. I tried to do it on my own but nothing happens. Can you help me to change it? I know that I have to change "inlet_x_velocity" (name) for sth different and how to add additional conditions (convection etc.)?

#include "udf.h"


DEFINE_PROFILE(inlet_x_velocity, thread, index)
{
real x[ND_ND];
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, index) = 20. - y*y*20.;
}
end_f_loop(f, thread)
}


All times are GMT -4. The time now is 15:21.