# UDF programming for pressure 3D..HELP

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 17, 2009, 11:21 UDF programming for pressure 3D..HELP #1 New Member   oscar Join Date: Mar 2009 Posts: 7 Rep Power: 10 #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y,z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[1]; F_PROFILE(f,thread,index) = 20. - y*y/(.0745*.0745)*20.; } end_f_loop(f,thread) } This is the UDF programming for x velocity inlet (3D).. If i want to write for pressure difference (3D)...what is the programming for that..thanks

 March 18, 2009, 04:29 #2 Member   Join Date: Mar 2009 Posts: 35 Rep Power: 10 It's similar to define the pressure (difference) if you want to apply a pressure boundary conditon.

 June 28, 2010, 19:28 #3 New Member   Charles de Luzan Join Date: Jun 2010 Location: Cincinnati, OH Posts: 12 Rep Power: 8 Hello, I have a problem using an UDF to define my parabolic inlet velocity profile. I would like to make it this shape: Vx= -0.00094*y*y+-0.00094*z*z+0.67743 I wrote this helped by your program: #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y,z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[1]; F_PROFILE(f,thread,index) = -0.00094*y*y+-0.00094*z*z+0.67743; } end_f_loop(f,thread) } But what I got is a constant profile. Do you see any mistake? Thank you for your attention.

June 29, 2010, 10:14
#4
New Member

Luk
Join Date: Jun 2009
Posts: 24
Rep Power: 9
Quote:
 Originally Posted by Chipsgrottel Hello, I have a problem using an UDF to define my parabolic inlet velocity profile. I would like to make it this shape: Vx= -0.00094*y*y+-0.00094*z*z+0.67743 I wrote this helped by your program: #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y,z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[1]; F_PROFILE(f,thread,index) = -0.00094*y*y+-0.00094*z*z+0.67743; } end_f_loop(f,thread) } But what I got is a constant profile. Do you see any mistake? Thank you for your attention.
x[0] = x
x[1] = y
x[2] = z

Maybe that?
__________________
*******************************

 July 15, 2010, 15:28 Thank you #5 New Member   Charles de Luzan Join Date: Jun 2010 Location: Cincinnati, OH Posts: 12 Rep Power: 8 Actually I couldn't do it even with your idea so I did something different: I designed a long duct with the same conditions as my inlet duct and long enough to let the fluid reach a fully developed profile of velocity. Then I saved it by define -> profile -> write and set it up at the inlet. Finally it worked. Thank you for your help anyway C.

 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 fullmonty FLUENT 5 June 30, 2011 02:40 Gene FLUENT 0 August 10, 2005 13:08 Lam Main CFD Forum 7 May 27, 2004 05:12 Tony Main CFD Forum 5 March 7, 2002 13:40

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

 Contact Us - CFD Online - Top