CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF for velocity profile

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2012, 20:57
Default UDF for velocity profile
  #1
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
egge24 is on a distinguished road
Hi,

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 */
{
F_CENTROID(x,f,t);
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!!

Regards
egge24 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
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 07: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 06:30
UDF parse error at profile function line Wiggy Fluent UDF and Scheme Programming 1 July 27, 2009 16: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 11:41.