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

(ask) how to create UDF for inlet velocity profile

Register Blogs Community New Posts Updated Threads Search

Like Tree21Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 26, 2016, 04:58
Default
  #19
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Quote:
Originally Posted by Keyu View Post
Hi,

I have seen and used UDFs for the inlet x velocity, but what do I do to make a UDF for inlet y velocity.

Here is the UDF that I used for inlet x velocity.
[
#include "udf.h"
#define umean 10.0
#define R 0.0005
DEFINE_PROFILE(inlet-x-velocity,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = (3./2.)*umean*(1-pow((y-R)/R,2));
}
end_f_loop(f,t)
}
]

I tried replacing x with y and vice versa to hopefully get the y-direction velocity, but unsuccessful.

Any suggestions here will be useful.

Thanks,
Keyu
This line varies the position along the X, Y, Z axis (0,1,2 respectively).

y = x[1];

If you want a velocity profile normal to the Y direction, you need to use the variation of the position in the X direction if 2D and X and/or Z direction if 3D.
Bruno Machado is offline   Reply With Quote

 


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
UDF problems - velocity profile Oli Fluent UDF and Scheme Programming 6 October 24, 2016 10:38
How to create non-uniform velocity profile in FLUENT? pankaj FLUENT 7 October 24, 2016 04:52
udf for velocity profile in a geometry having two inlets shubham208011 Fluent UDF and Scheme Programming 0 April 6, 2009 15:13
UDF velocity and temperature Raj FLUENT 3 February 1, 2009 18:29
UDF velocity profile at nodes Emad FLUENT 2 January 29, 2009 06:35


All times are GMT -4. The time now is 12:11.