其实没太大的问题,稍微修改下if语句
# include "udf.h"
DEFINE_PROFILE (inlet_velocity,thread,time)
{
real flow_time;
face_t f;
begin_f_loop(f,thread)
{
flow_time=CURRENT_TIME;
if(flow_time<=0.4)
F_PROFILE(f,thread,time)=10;
else
F_PROFILE(f,thread,time)=0;
}
end_f_loop(f,thread)
}