CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Parabolic velocity profile at vertical entrance

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

LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2009, 20:29
Default Parabolic velocity profile at vertical entrance
New Member
Frank Peng
Join Date: Sep 2009
Posts: 1
Rep Power: 0
ztp911 is on a distinguished road
Hi Guys,

I'm working on a FLUENT question involving a tee-junction. I have one problem which I don't know how to handle. The vertical
inlet is 1 m wide and has its velocity has a parabolic profile. This seems to require some
sort of User Defined Function as part of the boundary condition. I
searched on the Net and found the following C source code which can be compiled into FLUENT:

/************************************************** ***********************/
/* udfexample.c */
/* UDF for specifying a steady-state velocity profile boundary condition */
/************************************************** ***********************/

#include "udf.h"

DEFINE_PROFILE(inlet_y_velocity, thread, position)
real y[ND_ND]; /* this will hold the position vector */
real x;
face_t f;

begin_f_loop(f, thread)
x = y[1];
F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20;
end_f_loop(f, thread)

However, this code defines a parabolic velocity profile for a
horizontal inlet and doesn't quite apply to the question which has a
vertical inlet. Could someone help me please? Much appreciated!!!


Last edited by ztp911; September 21, 2009 at 03:28.
ztp911 is offline   Reply With Quote

Old   September 21, 2009, 15:26
Senior Member
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
x = y[1];
These lines store the y-coordinate in a variable x. If you want the vertical z-direction, you should do x=y[2].

In the next line your code used y, but I assume you want to use your new variable x there. Good luck!
Bernhard is offline   Reply With Quote

Old   September 3, 2013, 06:10
Default UDF for inlet profile
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 14
Goutam is on a distinguished road
I considered a simple laminar pipe flow problem:

#include "udf.h"
DEFINE_PROFILE(inlet_velocity, t, i)
real y[ND_ND];
real x,r;
face_t f;
begin_f_loop(f, t)
x = y[1];
F_PROFILE(f, t, i) = 0.009022 - 0.009022*((x*x)/(r*r));
end_f_loop(f, t)

I used this code at inlet but I am always getting uniform velocity at the inlet. Why? When I initialize the solution from inlet, it shows the value 0.009022?

I didn't find the error? Any suggessions ?????
Goutam is offline   Reply With Quote


fluent, parabolic, tee-junction, velocity profile, vertical inlet

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 06:25
problem in 3d parabolic velocity profile Lokesh FLUENT 8 August 11, 2005 05:36
How to create a parabolic velocity profile Nelson FLUENT 0 July 7, 2005 02:49
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11

All times are GMT -4. The time now is 21:00.