CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF Unsteady velocity parabolic profile (https://www.cfd-online.com/Forums/fluent/47462-udf-unsteady-velocity-parabolic-profile.html)

Rashad February 27, 2008 15:05

UDF Unsteady velocity parabolic profile
 
Hi Is it possible to give parabolic unsteady velocity inlet with the help of UDF. I tried UDf in given in the documentation it works but when i incorporate space variable x in the unsteady UDF it does not work. Any help Regards Rashad

Paolo Lampitella February 28, 2008 12:27

Re: UDF Unsteady velocity parabolic profile
 
Just substitute your velocity components to these ones

/************************************************** ******************** UDF for specifying a transient velocity profile boundary condition ************************************************** ********************/

#include "udf.h"

DEFINE_PROFILE(x_velocity, t, i)

{

real x[ND_ND];

real x0, y0, time;

face_t f;

time = CURRENT_TIME;

begin_f_loop(f, t)

{

F_CENTROID(x,f,t);

x0 = x[0];

y0 = x[1];

F_PROFILE(f, t, i) = -cos(x0)*sin(y0)*exp(-2.0*time);

}

end_f_loop(f, t)

}

DEFINE_PROFILE(y_velocity, t, i)

{

real x[ND_ND];

real x0, y0, time;

face_t f;

time = CURRENT_TIME;

begin_f_loop(f, t)

{

F_CENTROID(x,f,t);

x0 = x[0];

y0 = x[1];

F_PROFILE(f, t, i) = cos(y0)*sin(x0)*exp(-2.0*time);

}

end_f_loop(f, t)

}

Rashad February 29, 2008 02:36

Re: UDF Unsteady velocity parabolic profile
 
Thankyou Dear Paolo Lampitella Rashad

mikethe October 1, 2018 15:27

thanks guys,

I have a similiar problem with transient parabolic velocity proflie but i need 3D version.

-How can i modify this code?
-Is there a reference paper or definition for given equation above?

Regards, ismail


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