
#include "udf.h"
DEFINE_PROFILE(inlet_velocity, thread, index)
{
real x[ND_ND],y
face_t f
begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread)
y = x[1]
F_PROFILE(f, thread, index) =2.4*ln(350*y)+5.5
}
end_f_loop(f, thread)
}
UDF定义进出口,定义材料性质猛滑,定义流体初始差世化等,具体在用户界面里的define-----user-defined------functions导入程序文件就行虚知肢,程序可以用C语言编写,用txt写字板或者word以及专业的编程软件都行,最后把它们转成.c的文件就行了/迹行*profile.c* B lei/野判/颂州改*UDF for specifying steady-state velocity profile boundary condi*/
#include"udf.h"
#define zo 10
#define uo 12
DEFINE_PROFILE(inlet_x_velocity,thread,index)
{
real x[ND_ND]
real z
face_t f
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread)
z=x[2]
F_PROFILE(f,thread,index)=uo*pow((z/zo),0.16)
}
end_f_loop(f,thread)
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)