24小时热门版块排行榜    

查看: 629  |  回复: 1

settle

铜虫 (小有名气)

[求助] 稳定流+脉动流模拟,导入UDF函数出错

我模拟的是稳定流和脉动流,选择的速度入口,入口在下面,出口为完全发散,在上面,模型几何结构下如图



我编写的程序为/***********************************************************************/
/* unsteady flow.c*/                                                   
/***********************************************************************/




#include "udf.h"
#define P ? ? ?                         /* the periodic of pulsed flow */
#define U 6.80                            /* the uniform flow velocity */
#define W 0.27                    /* the wave amplitude of pulsed flow */



DEFINE_PROFILE(unsteady_velocity, thread, positon)
{
   face_t f;
   real t =CURENT_TIME
   real pre;
   pre=(int)(t/P);                /*the periodic number of pulsed flow*/



   begin_f_loop(f, thread)
        {
             if((t/P-pre)<0.5)
             {
                F_PROFILE(f, thread, position)=U+W;
              }
            else
              {   F_PROFILE(f, thread, position)=U;
              }
              }
            end_f_loop(f, thread)
             }

但在fluent里,define——user-define导入自定义函数后,fluent总出现下面的错误提示:
cpp -I"D:\FLUENT\Fluent\Fluent.Inc\fluent6.3.26/src" -I"D:\FLUENT\Fluent\Fluent.Inc\fluent6.3.26/cortex/src" -I"D:\FLUENT\Fluent\Fluent.Inc\fluent6.3.26/client/src" -I"D:\FLUENT\Fluent\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig
h>" "E:\fluent results\unseady flow.c.txt"
Error: E:\fluent results\unseady flow.c.txt: line 18: CURENT_TIME: undeclared variable
这可能是我编写程序问题,但不知道怎么解决,请教高手这该如何解决,谢谢

[ Last edited by settle on 2014-3-2 at 00:16 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

settle

铜虫 (小有名气)

请教高手啊
2楼2014-03-02 13:50:58
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 settle 的主题更新
信息提示
请填处理意见