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

Parabolic velocity profile at vertical entrance

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2009, 21:29
Default Parabolic velocity profile at vertical entrance
  #1
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)
{
F_CENTROID(y,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!!!

Cheers

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

Old   September 21, 2009, 16:26
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Code:
F_CENTROID(y,f,thread);
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, 07:10
Default UDF for inlet profile
  #3
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15
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;
r=0.0095;
begin_f_loop(f, t)
{
F_CENTROID(y,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

Reply

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


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


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