|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
下面一段UDF已经通过了编译但是在运行时,出现如下提示:
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: ()
UFD程序:
#include "udf.h"
#define k 1.380658e-23
#define pi 3.1415926
#define d 4.17e-10
DEFINE_ON_DEMAND(Knudsen)
{
real x[ND_ND];
real x1,f1;
real T,P,namd,Kn;
Thread* t;
cell_t c;
Domain* domain;
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{
C_CENTROID(x,c,t);
x1=x[0];
if (x1<23.)
f1=-tan(3.1415926/6)*x1+7.2649;
else if(x1<65.1)
f1=65.-sqrt(pow(50.,2)-pow(x1,2));
else
f1=tan(3.1415926/9)*x1+11.7913;
T=C_T(c,t);
P=C_P(c,t);
namd=k*T/(pow(2,0.5)*pi*d*d);
Kn=namd/f1;
C_UDMI(c,t,0)=Kn;
}
end_c_loop(c,t)
}
}
是何原因?谢谢…… |
|