udf在服务器上显示语法错误,udf编译提示语法错误

最近把UDF导入FLUENT时,老提示语法错误,各位姐姐哥哥们帮小弟看看程序吧:

#include "stdio.h"

#include "udf.h"

#define Ac 2.e-7

#define m 0.5

#define fc 2500.

#define fm 833.

#fefine t0 0.08

DEFINE_CG_MOTION(droplet,dt,cg_vel,cg_omega,time,dtime)

{

Thread *t;

face_t f;

real velo,loc;

/*reset velocities*/

NV_S(cg_vel,=,0.0);

NV_S(cg_omega,=,0.0);

if(!Data_Valid_P())

return;

/*get the thread Pointer for which this motion is defined*/

t = DT_THREAD(dt);

/*compute velocity and location of vibration*/

velo=Ac*2*M_PI*(m*fm*sin(2*M_PI*fc*(time-t0))*cos(2*M_PI*fm*(time-t0))+m*fc*cos(2*M_PI*fc*(time-t0))*sin(2*M_PI*fm*(time-t0))+fc*cos(2*M_PI*fc*(time-t0)));

loc=Ac*(1+m*sin(2*M_PI*fm*(time-t0)))*sin(2*M_PI*fc*(time-t0));

Message("\nUDF droplet:time=%f,x_vel=%10.8f,loc(m)=%10.8f\n",time,velo,loc);

/*set y_component of velocity*/

cg_vel[0]=velo;

}

编译时,提示错误如下:

c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2143: 语法错误 : 缺少“{”(在“:”的前面)

c:\fluent.inc\fluent6.3.26\src\config.h(119) : error C2059: 语法错误:“:”

C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2061: 语法错误: 标识符“CX_DLL_GetProc”

C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: 语法错误:“;”

C:\Fluent.Inc\fluent6.3.26\cortex\src\dll.h(58) : error C2059: 语法错误:“类型”

..\..\src\RKEOS.c(31) : warning C4005: “T_REF”: 宏重定义

c:\fluent.inc\fluent6.3.26\src\prop.h(116) : 参见“T_REF”的前一个定义

..\..\src\RKEOS.c(80) : warning C4133: “=”: 从“void (*)(char *,...)”到“int (*)(char *,...)”的类型不兼容

..\..\src\RKEOS.c(372) : warning C4028: 形参 3 与声明不同

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值