24小时热门版块排行榜    

查看: 1379  |  回复: 0

weipei0529

木虫 (正式写手)

[求助] 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 与声明不同
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 weipei0529 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 北京林业大学硕导招生广告 +3 kongweilin 2026-03-26 3/150 2026-03-26 00:53 by 15723253818
[考研] 08工学调剂 +13 用户573181 2026-03-20 18/900 2026-03-25 22:00 by zbssa
[考研] 311求调剂 +4 勇敢的小吴 2026-03-20 4/200 2026-03-25 18:12 by xcjcqu
[考研] 347求调剂 +4 L when 2026-03-25 4/200 2026-03-25 13:37 by cocolv
[考研] 282求调剂 +3 wcq131415 2026-03-24 3/150 2026-03-25 12:16 by userper
[考研] 一志愿吉林大学材料与化工303分求调剂 +4 为学666 2026-03-24 4/200 2026-03-25 11:27 by BruceLiu320
[考研] 07化学280分求调剂 +7 722865 2026-03-23 7/350 2026-03-25 09:29 by aa331100
[考研] 340求调剂 +5 话梅糖111 2026-03-24 5/250 2026-03-25 06:53 by ilovexiaobin
[考研] 资源与环境 调剂申请(333分) +7 holy J 2026-03-21 7/350 2026-03-24 17:24 by xiaohai104
[考研] 291求调剂 +3 HanBeiNingZC 2026-03-24 3/150 2026-03-24 16:34 by barlinike
[考研] 300求调剂,材料科学英一数二 +5 leaflight 2026-03-24 5/250 2026-03-24 16:25 by laoshidan
[考研] 307求调剂 +3 余意卿 2026-03-21 6/300 2026-03-24 15:03 by 余意卿
[考研] 269求调剂 +4 我想读研11 2026-03-23 4/200 2026-03-23 21:25 by pswait
[考研] 一志愿重庆大学085700资源与环境,总分308求调剂 +7 墨墨漠 2026-03-23 8/400 2026-03-23 20:36 by Creta
[考研] 石河子大学(211、双一流)硕博研究生长期招生公告 +3 李子目 2026-03-22 3/150 2026-03-22 21:01 by 怎么释怀
[考研] 生物学调剂 +5 Surekei 2026-03-21 5/250 2026-03-22 14:39 by tcx007
[考研] 求调剂 +7 Auroracx 2026-03-22 7/350 2026-03-22 12:38 by 素颜倾城1988
[考研] 材料与化工(0856)304求B区调剂 +3 邱gl 2026-03-20 7/350 2026-03-21 19:05 by 15709483992
[考研] 求调剂 +3 白QF 2026-03-21 3/150 2026-03-21 13:12 by zhukairuo
[考研] 一志愿苏州大学材料求调剂,总分315(英一) +5 sbdksD 2026-03-19 5/250 2026-03-20 22:10 by luoyongfeng
信息提示
请填处理意见