|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我想实现入口速度边界条件:vx=5.0+5.0*sin(x+y)*sin(10.0*t)
下面的udf程序是否正确:
#include "udf.h"
DEFINE_PROFILE(velocity_xyt, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real xx,yy;
face_t f;
begin_f_loop(f, thread)
{
real t = RP_Get_Real("flow-time");
F_CENTROID(x,f,thread);
xx= x[0];
yy= x[1];
F_PROFILE(f, thread, position) = 5.0+5.0*sin(xx+yy)*sin(10.0*t);
}
end_f_loop(f, thread)
} |
|