24小时热门版块排行榜    

查看: 1117  |  回复: 0

zjk123123

新虫 (初入文坛)

[交流] fluent出现错误Error:received a fatal signal(segmentation fault)

以下是我的程序,求助各位。谢谢
#include"udf.h"
#include"stdio.h"
#include"mem.h"
#include"math.h"
#include"dynamesh_tools.h"
FILE *fp;
real x_cg[ND_ND];
int i;
face_t f;
Thread *t;
DEFINE_CG_MOTION(value,dt,vel,omega,time,dtime)
{
Thread *thread;
Domain *domain;
real force[3]={0,0,0};            
real moment[3]={0,0,0};
vel[0]=0;
for(i=0;i<ND_ND;i++)
{
        x_cg=DT_CG(dt);
}
domain=Get_Domain(1);
thread=Lookup_Thread(domain,5);
fp=fopen("date.txt","a";
Compute_Force_And_Moment(domain,thread,x_cg,force,moment,TRUE);
fprintf(fp,"time=%f, force[0]=%f, force[1]=%f\n", time,force[0],force[1]);
Message ("time=%f, force[0]=%f, force[1]=%f\n", time,force[0],force[1]);
fclose(fp);
}

DEFINE_PROFILE(inlet_x_velocity,t,position)
{
face_t f1;
begin_f_loop(f1,t)
{
  F_PROFILE(f1,t,i)=0.5;      
}
end_f_loop(f,t)
}
/*向右为正*/
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zjk123123 的主题更新
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见