udf有问题,你试试这个
#include "udf.h"
DEFINE_PROFILE(inlet_velocity, t, i)
{
	real x[ND_ND],y,vel;
	face_t f;
	
	begin_f_loop(f,t)
	{
		F_CENTROID(x, f, t);
		y = x[1];
		if(y>0.0393)
			vel = 29.5; 
		else 
			vel = 29.5 * pow((y / 0.0393), 1/7);		
		
		F_PROFILE(f, t, i) = vel;
	}
	end_f_loop(f,t)
}