|
|
发表于 2010-10-18 19:54:51
|
显示全部楼层
我这里写了一个UDF,初速度是14.7m/s,减速度是9.81的UDF
#include "udf.h"
DEFINE_PROFILE(wall_x_velocity, thread, position)
{
face_t f;
real flow_time=RP_Get_Real("flow-time");
if(flow_time<1.5)
{
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 14.7-9.81*flow_time;
}
end_f_loop(f, thread)
}
else
{
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 0;
}
end_f_loop(f, thread)
}
} |
|