fluent速度udf
求编写一个平板2维的速度入口,靠边为抛物线主流速度为0.555m/s,高8m#include"udf.h"DEFINE_PROFILE(inlet_x_velocity,...
求编写一个平板2维的速度入口,靠边为抛物线主流速度为0.555m/s,高8m
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;
h = 8; /* inlet height in m */
begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */
F_PROFILE(f, thread, position) = 0.555*(1.0-y*y);
}
end_f_loop(f, thread)
}
这是抛物线的,但全都是,我想要一个只有近壁区是抛物线的,编程不熟一时不知咋改 展开
#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;
h = 8; /* inlet height in m */
begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */
F_PROFILE(f, thread, position) = 0.555*(1.0-y*y);
}
end_f_loop(f, thread)
}
这是抛物线的,但全都是,我想要一个只有近壁区是抛物线的,编程不熟一时不知咋改 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询