|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
在下的UDF程序中有如下一段程序:
DEFINE_SOURCE(ymom_source, c, t, dS, eqn)
{
real ransu;
real midus;
real mass, source;
real temp,atm;
real x[ND_ND];
face_t f;
Thread *tf;
int n;
atm=101325.0;
midus=1610;
ransu=0.6887*pow(C_P(c,t)/atm,0.62)*con/1000;
temp=3000;
c_face_loop(c, t, n) /* loops over all faces on a cell */
{
f = C_FACE(c,t,n);
tf = C_FACE_THREAD(c,t,n);
if(temp>F_T(f,tf))
temp=F_T(f,tf);
}
if(temp>700)
{
source=-2035.6*midus*ransu*midus*ransu/C_R(c,t);
dS[eqn] =2035.6*midus*ransu;
}
else
{ source=0;
dS[eqn]=0;
}
return source;
}
编译通过后,在CASE文件中设置好后,初始化时,出现如下错误:
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: ()
测试后发现问题出在下面这段代码中:
c_face_loop(c, t, n) /* loops over all faces on a cell */
{
f = C_FACE(c,t,n);
tf = C_FACE_THREAD(c,t,n);
if(temp>F_T(f,tf))
temp=F_T(f,tf);
}
左思右想,不知道是何原因,望高手能给预指点,先谢谢了。 |
|