|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
/***********************************************************************
vprofile.c
UDF for specifying steady-state velocity profile boundary condition
************************************************************************/
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND];/* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20.;
}
end_f_loop(f, thread)
}
上面是FLUENT中UDF的一个原例,读入FLUENT中interpret时出现错误:
Error: C:\Documents and Settings\Administrator\My Documents\libudf\src\myudf.c.txt: line 1: parse error.
不明白,第一行就有语法错误.我刚学,实在不懂,请高手指点,不胜感激.
|
|