# Parabolic velocity profile at vertical entrance

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

 September 20, 2009, 20:29 Parabolic velocity profile at vertical entrance #1 New Member   Frank Peng Join Date: Sep 2009 Posts: 1 Rep Power: 0 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 03:28.

 September 21, 2009, 15:26 #2 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 12 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!

 September 3, 2013, 06:10 UDF for inlet profile #3 Senior Member   Goutam Saha Join Date: Dec 2011 Location: UK Posts: 128 Rep Power: 5 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 ?????

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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Sing FLUENT 9 November 26, 2014 08:58 Lokesh FLUENT 8 August 11, 2005 05:36 Nelson FLUENT 0 July 7, 2005 02:49 R P CFX 2 October 26, 2004 02:13 Abhi Main CFD Forum 12 July 8, 2002 09:11

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