|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我想用UDF把一个圆柱形腔体的一个底面设为移动的膜,但仿真结果看起来好像这样设置并不行。我的方法是把这个底面设定为moving wall,然后速度用UDF来定义。请问是不是哪里出了问题?谢谢。
我的UDF如下:
#include "udf.h"
#define OMEGA 10.0 /* User constants can be set like this */
#define V_AMP 5.0
DEFINE_PROFILE(y_velocity, ft, var)
{
real flow_time;
face_t f; /* Face index has its own type */
flow_time = CURRENT_TIME; /* Special Fluent macro */
begin_f_loop(f,ft) /* Fluent has special face loop macros too */
{
F_PROFILE(f,ft,var) =-V_AMP * cos(OMEGA*flow_time);
}
end_f_loop(f,ft)
} |
|