CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   urgent help parabolic velocity profile in 3D (https://www.cfd-online.com/Forums/fluent/84374-urgent-help-parabolic-velocity-profile-3d.html)

Angeline January 27, 2011 07:49

urgent help parabolic velocity profile in 3D
 
Hi guys ,

i need one urgent help. i want to write the UDF for parabolic velocity profile for a flow in pipe. Z-is the axis. I define the profile in x and y direction. It doesn't work. Please read it and help out.



#include "udf.h"

DEFINE_PROFILE(inlet_z_velocity, thread, position)
{
real z[ND_ND];
real x,y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(z,f,thread);
x = z[1];
y = z[2];

F_PROFILE(f, thread, position) = 10*pow(1-(x/0.15),1/7);
F_PROFILE(f, thread, position) = 10*pow(1-(y/0.15),1/7);
}
end_f_loop(f, thread)
}


All times are GMT -4. The time now is 08:34.