|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
在FLUTNT全工略书中对UDS对流项定义编译可以通过,但是一计算就出现下面的错误,请同仁指教
错误为:
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: ()
原程序为
#include "udf.h"
DEFINE_UDS_FLUX(my_uds_flux,f, t, i)
{
Thread *t0, *t1 = NULL;
cell_t c0, c1 = -1;
real NV_VEC(psi_vec), NV_VEC(A);
t0=F_C0_THREAD(f,t);
c0=F_C0(f,t);
if(NULL!=F_C1_THREAD(f,t))
{
t1=F_C1_THREAD(f,t);
c1=F_C1(f,t);
}
else
{
t1 = NULL;
c1 = -1;
}
if (NULL == t1)
{
NV_D(psi_vec,=,F_U(f,t),F_V(f,t),F_W(f,t));
NV_S(psi_vec, *=,F_R(f,t));
}
else
{
NV_D(psi_vec, =, C_U(c0,t0),C_V(c0,t0),C_W(c0,t0));
NV_D(psi_vec, +=, C_U(c1,t1),C_V(c1,t1),C_W(c1,t1));
NV_S(psi_vec, /=, 2.);
NV_S(psi_vec, *=, ((C_R(c0,t0)+C_R(c1,t1)/2.0)));
}
F_AREA(A,f,t);
return NV_DOT(psi_vec, A);
} |
|