CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS (
-   -   transorm UDF from 2D to 3D (

aounallah March 10, 2010 13:33

transorm UDF from 2D to 3D
Hi guys

I want to simulates a 3D channel flow and I need to enter an experimental velocity profile at the inlet,
so I have already done it well in 2D with an UDF that generate the velocity inlet

this is program

#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
y =x[1];
if (y <= 0.025)
F_PROFILE(f,thread,position) = 50.*pow((y/0.025),(1./7.));
F_PROFILE(f,thread,position) = 50.;
end_f_loop(f, thread)

I will be very greatfull if some one can gives me help to transform this 2D program to 3D with the same trend

Thanks in advance

All times are GMT -4. The time now is 03:45.