马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
定义了新变量Tnorm=(T-Tmin)/(Tmax-Tmin)用了UDF在Fluent中运行(已启用能量方程)后出现:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object:()
如题
附源程序:
#include "udf.h"
DEFINE_ON_DEMAND(on_demand_calc)
{
cell_t c;
Thread *t;
Domain *d=Get_Domain(1);
real tmax=0.,tmin=0.,temp;
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
temp=C_T(c,t);
if(temp<tmin||tmin==0.)tmin=temp;
if(temp>tmax||tmax==0.)tmax=temp;
}
end_c_loop(c,t)
}
thread_loop_c(c,d)
{
begin_c_loop(c,t)
{
temp=C_T(c,t);
C_UDMI(c,t,0)=(temp-tmin)/(tmax-tmin);
}
end_c_loop(c,t)
}
} |