Transient Temperature Profile
Posted January 16, 2013 at 10:04 by diamondx
UDF for a transient temperature profile
Quote:
Have figured it out. Here is the script, hope it might be of help to others:
#include "udf.h"
DEFINE_PROFILE(inlet_temperature,t,i)
{
real x[ND_ND];
real time;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
time=CURRENT_TIME;
if(time<40)
F_PROFILE(f,t,i)=300;
else
F_PROFILE(f,t,i)=340;
}
end_f_loop(f,t)
}
#include "udf.h"
DEFINE_PROFILE(inlet_temperature,t,i)
{
real x[ND_ND];
real time;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
time=CURRENT_TIME;
if(time<40)
F_PROFILE(f,t,i)=300;
else
F_PROFILE(f,t,i)=340;
}
end_f_loop(f,t)
}
Total Comments 0