|
|
发表于 2004-7-19 17:05:12
|
显示全部楼层
关于patch问题请教
这个fluent可以做,比较简单的udf方式实现初始化问题:
#include "udf.h"
DEFINE_PROFILE(pressure_boundary——名字随便起, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y; /* 纵坐标对应的变量 */
face_t f; /* this will hold the position vector */
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread); /* 标准的语句,得到边界上每小段中心处的坐标 */
y = x[1]; /* 这是纵坐标,横坐标是x[0] */
F_PROFILE(f, thread, position) = ......; /* 压力关于坐标的函数 */
}
end_f_loop(f, thread)
}
然后再fluent中编译一下,再hooks一下就行了。
具体概念参考udf帮助 |
|