软件信息:
Fluent 14.0
问题描述:
三维的模型,想让入口速度随高度变化,函数为:V=0.05*ln(400*Z)
编辑UDF如下:
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real z;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
z=x[1]
F_PROFILE(f,thread,position)=0.05*ln(400*Z);
}
end_f_loop(f,thread)
}
需要哪儿做改动才可以用?现在一直出现“no function prototype” |