|
|
发表于 2011-8-30 19:51:40
|
显示全部楼层
回复 1# as5643 的帖子
请参考Fluent帮助中的DEFINE_PROFILE( name, t, i)
例:
/***********************************************************************
UDF for specifying steady-state parabolic pressure profile boundary
profile for a turbine vane
************************************************************************/
#include "udf.h"
DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5;
}
end_f_loop(f,t)
} |
|