找回密码
 注册
查看: 2036|回复: 1

帮忙看一下我的用来定义inlet velocity 的c文件

[复制链接]
发表于 2006-11-29 06:26:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
这下面是我的c文件。请看一下那里有错。谢谢!
这个c文件是定义一个2维风洞的inlet velocity随高度变化:Vx=20*((y+50)/396.24)^0.4
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, index)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f, thread) /* loops over all faces in the thread
passed in the DEFINE macro argument */
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, index) =20.*sqrt((y+50)/396.24);
}
end_f_loop(f, thread)
}[br][br][以下内容由 lxblxb 在 2006年11月29日 06:30am 时添加] [br]
上面c文件中的
F_PROFILE(f, thread, index) =20.*sqrt((y+50)/396.24);
应该改成
F_PROFILE(f, thread, index) =20.*pow((y+50)/396.24,0.4);
发表于 2006-11-30 01:17:30 | 显示全部楼层

帮忙看一下我的用来定义inlet velocity 的c文件

你编译后哪里报错?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表