|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2008-3-19 21:11:55
|
显示全部楼层
急!流场问题,请各位提宝贵建议!
我写了一段代码,请大家看看对不对
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, index) /*定义初始速度u=u1/k*log(y/y0)*/
{
real x[ND_ND];
real y;
face_t f;
real u1=0.202
real k=0.42
real y0=0.00053
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, index) = u1/k*log(y/y0);
end_f_loop(f, thread)
}
DEFINE_PROFILE(K_velocity, thread, index) /*定义初始K值,它与初始速度有关k=1/2*u*1.5%*/
{
face_t f;
Thread *t;
begin_f_loop(f, thread)
F_PROFILE(f, thread, index) = 1/2*F_U(f,t)*0.015
end_f_loop(f, thread)
} |
|