CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to write a UDF for a transient temperature (https://www.cfd-online.com/Forums/fluent-udf/215565-how-write-udf-transient-temperature.html)

deathstar March 8, 2019 15:41

How to write a UDF for a transient temperature
 
I'm trying to write a UDF of a transient temperature BC to be applied on a wall. The data that I will use for this purpose is a thermo-couple data obtained from the process that I'm interested in. So how to write the correct UDF for this case? Can I use the code shown below? Kindly, correct me if this is wrong.

#include "udf.h"
DEFINE_PROFILE(parafin_profiless,thread,position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position) = ((-2.508e-07)*pow(t, 4))+((7.147e-05)*pow(t,3))+((-0.007235)*pow(t,2))+((0.2014)*t)+(304.1);
}
end_f_loop(f,thread)
}

AlexanderZ March 10, 2019 21:23

create monitor on your boundary wall and check temperature there, compare with experiment
UDF code looks correct

best regard


All times are GMT -4. The time now is 02:13.