CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF for 3D velocity profile (http://www.cfd-online.com/Forums/fluent/80735-udf-3d-velocity-profile.html)

pichai October 5, 2010 05:52

UDF for 3D velocity profile
 
Dear all,

Does anyone has a sample of UDF for velocity profile in 3D duct ?

Please help me.

lehoang_mai October 5, 2010 06:07

This is typical UDF, you can use:
--------------------------------------------------------------------------------
#include "udf.h"

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

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
z = x[2];
//Vmax = 20.//
F_PROFILE(f, thread, position) = Vmax;
}
end_f_loop(f, thread)
}
---------------------------------------------------------------------------------
In this profile velocity is = 20m/s. for other profile(parabol,hyperbol....) chage it in function F_PROFILE.
Best wish for you!

pichai October 5, 2010 06:48

Thank so much lehoang_mai.

do you mind if I need your help agian ?

Could you post an example of 3D of velocity boundary layer on flat plate ?

lehoang_mai October 5, 2010 06:51

what did you mean? picture, isn't it?

pichai October 5, 2010 06:55

sorry, I mean UDF of velocity profile on flat plate.

I think velocity profile on flat plate is like my problem that is the wind on the earth surface

thank in advance for your help.

lehoang_mai October 5, 2010 07:10

I think, fluent can read UDF for all surfaces(earth,plate...), with them you hook UDF. Try to write your UDF and hook it in Fluent. :)
Nice for you!


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