大家好,我想编写一个换热系数和辐射随温度变化的UDF,当边界大于1800K时,换热系数是3000,辐射率为0;小于1800K时,换热系数是0,辐射率为0.4.以下是程序源代码:请问哪里有问题,编译没问题,一初始化,就报错!
#include"udf.h"
#include"math.h"
float heat[305];
float Coordinates[305];
static np2=0;
DEFINE_PROFILE(usteady_coefficient,thread,position)
{ face_t f;
begin_f_loop(f,thread)
{ real T=F_T(f,thread);
if(T<=1800)
F_PROFILE(f,thread,position)=0;
else
F_PROFILE(f,thread,position)=3000;
}
end_f_loop(f,thread)
}
DEFINE_PROFILE(usteady_emissivity,thread,position)
{ face_t f;
begin_f_loop(f,thread)
{ real T=F_T(f,thread);
if(T<=1800)
F_PROFILE(f,thread,position)=0.4;
else
F_PROFILE(f,thread,position)=0;
}
end_f_loop(f,thread)
}
错误提示:
![编写了换热系数随温度变化的UDF,结果fluent并行程序老是报错怎么办????急急急!]()
1.jpg |