CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

UDF for velocity profile

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   April 4, 2012, 19:57
Default UDF for velocity profile
Join Date: Jan 2011
Posts: 42
Rep Power: 8
egge24 is on a distinguished road

I'm trying to write a UDF for an inlet velocity boundary condition. I want my velocity profile varies vertically and transversally. I know how to write a function for each case but not for both at the same time.

x = longitudinal coordinate,
y = vertical coordinate,
z = transversal coordinate.

U(z) = 1.0 + sen((2*pi/750)*z); horizontal velocity as a function of z-coordinate.

U(y) = U(z)*(y/12.8)^0.142857

The center of my channel inlet is at (x,y,z)=(0,0,0), and the contours extent to z = +-175 and y = +-15.

For the vertical velocity profile I wrote the following function:

DEFINE_PROFILE(Velocity, t, i)
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f, t) /* loops over all faces in the thread passed
in the DEFINE macro argument */
y = x[1];
y = y+15;

F_PROFILE(f, t, i) = 2*pow((y/(12.8)),0.142857);

end_f_loop(f, t)

But how can I iclude in the function the tranversal variation of velocity???

Any help will be appreciated!!

egge24 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 06:25
Simulation with UDF for species mass fraction and velocity profile virgy Fluent UDF and Scheme Programming 8 February 7, 2012 05:30
Please Help! Temperature profile UDF for 3D geometry subhankar_bhandari FLUENT 2 April 16, 2011 05:30
UDF parse error at profile function line Wiggy Fluent UDF and Scheme Programming 1 July 27, 2009 15:59
Associating profile files for the UDS though a UDF Bharath FLUENT 0 December 1, 2006 16:58

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