ÎÒÄ£ÄâµÄÊÇÎȶ¨Á÷ºÍÂö¶¯Á÷£¬Ñ¡ÔñµÄËÙ¶ÈÈë¿Ú£¬Èë¿ÚÔÚÏÂÃæ£¬³ö¿ÚΪÍêÈ«·¢É¢£¬ÔÚÉÏÃæ£¬Ä£Ðͼ¸ºÎ½á¹¹ÏÂÈçͼ

ÎÒ±àдµÄ³ÌÐòΪ/***********************************************************************/
/* 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 ] |