CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Custom field (temperature - time) (https://www.cfd-online.com/Forums/fluent/134922-custom-field-temperature-time.html)

m0stik May 7, 2014 04:22

Custom field (temperature - time)
 
Hello,
I have built a calcul on Fluent 14.5 and I have a problem,
I would like to apply a temperature increasing with time on a wall.
The temperature increases as a Ln(x) function, how can I do this ?

I have the formula of the temperature.

Can I use: Define / custome field function / ... I cannot select time as unknow variable.

Thanks for your help and sorry if I made mistake (I'm french student)

Bye

m0stik May 7, 2014 04:52

Reading on the forum I have found that I have to creat an UDF file,
In a text file I have written :

#include "udf.h"

DEFINE_PROFILE(HC_temp_BC,thread,i)
{
face_t f;
begin_f_loop(f,thread)
{
t=CURRENT_TIME;
F_PROFILE(f,thread,i)=(23.55*ln(t))+339.2;
}
end_f_loop(f,thread)
}

(23.55*ln(t))+339.2 is the formula of the temperature after experimental trials, do you think it's ok ? Can I use this udf file ?

When I try to compil it in Fluent, I cannot select the file ? maybe because it's a .txt ?

Thanks

Bionico May 7, 2014 06:14

Hello m0stik,
yes, you have to rename it changing the format from .txt to .c

Regards


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