|
|
[求助]
稳定流+脉动流模拟,导入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 ] |
» 猜你喜欢
» 本主题相关价值贴推荐,对您同样有帮助:
|