CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ANSYS (http://www.cfd-online.com/Forums/ansys/)
-   -   transorm UDF from 2D to 3D (http://www.cfd-online.com/Forums/ansys/73526-transorm-udf-2d-3d.html)

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;
begin_f_loop(f,thread);
{
F_CENTROID(x,f,thread);
y =x[1];
if (y <= 0.025)
F_PROFILE(f,thread,position) = 50.*pow((y/0.025),(1./7.));
else
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 23:34.