UDF加载问题(冰块边界条件-温度随时间变化)初始化就闪退,源代码如下,麻烦各位大佬帮忙查看,谢谢? 20
浏览:1591
#include "udf.h"
/*定义温度*/
DEFINE_PROFILE(flux_profile,thread,i)
{
real tempe;
face_t f;
real flow_time=RP_Get_Real("flow-time");
begin_f_loop(f,thread)
{tempe=C_T(f,thread);
if(flow_time>0.001&&flow_time<=10)
{
tempe=260+2*flow_time;
}
else if(flow_time>10&&flow_time<=20)
{
tempe=280;
}
else if(flow_time>20&&flow_time<=30)
{
tempe=280-0.5*flow_time;
}
else if(flow_time>30&&flow_time<=40)
{
tempe=265;
}
else
{tempe=265;
}
F_PROFILE(f,thread,i)=tempe;
}
end_f_loop(f,thread)
}