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/)
-   -   impose temperature udf (https://www.cfd-online.com/Forums/fluent-udf/123910-impose-temperature-udf.html)

rayan24 September 24, 2013 04:16

impose temperature udf
 
Hi,

I want to impose a different temperature a different time, i want to impose 700K between t=0 and t=10s and T=400 K between t=10s and t=50s, can you see this udf and suggest me a correction, please?

Code:

#include "udf.h"
DEFINE_PROFILE(inlet_temperature,t,i)

{
real x[ND_ND];
real r;
face_t f;
real dt=CURRENT_TIME;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);

if ( dt <= 10)
F_PROFILE(f,t,i) =700;
}

if (10 < dt <= 50)

    F_PROFILE(f,t,i) =400;
end_f_loop(f,t)
}



All times are GMT -4. The time now is 01:37.