monkeying 发表于 2006-7-14 11:28

菜鸟请教:简单的UDF程序通过编译,但初始化出错,大家能帮我看看,查出错误吗

#include "udf.h"
#include "mem.h"
#define diam 2.0e-4

DEFINE_PROFILE(x_inertial,t,i)
{
real Re,mu;      /* variable declarations */
cell_t c;
//C_CENTROID(x,c,t);
real vx=C_U(c,t);/*x-velocity*/
real r=C_R(c,t);   /*density*/
   mu=C_MU_L(c,t);    /*层流viscosity*/
// mu=7.95e-06;
Re=vx*r*diam/mu;
begin_f_loop(c,t)
{
          if (Re<5)
                   F_PROFILE(c,t,i)=0;
          else
                  F_PROFILE(c,t,i)=5.84e4;
}
end_f_loop(c,t)
}

点击init报错
Error:
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: ()
页: [1]
查看完整版本: 菜鸟请教:简单的UDF程序通过编译,但初始化出错,大家能帮我看看,查出错误吗