|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
想做三维管路的流场仿真,模拟参考资料上二维的情况写的udf.
想给定一个抛物曲面的入口速度,可是按照下面的程序,在编译的时候出现16行变量没有定义的错误。Error: D:\user\R\velocity-inlet.c: line 16: Z: undeclared variable请高手帮我看看到底哪里出了问题,谢谢。
/*******************************************************************/
/* vprofile.c */
/* UDF for specifying steady-state velocity boundary condition */
/*****************************************************************/
#include "udf.h"
#include "math.h"
DEFINE_PROFILE(inlet_y_velocity, thread, position)
{ real x[ND_ND];
real y;
real z;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y= x[1];
Z= x[2];
F_PROFILE(f, thread, position) =2-(y*y+z*z)/(0.005*0.005)*2;
}
end_f_loop(f, thread)
}
|
|