# UDF for varying inlet velocity with z-distance

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

 May 18, 2006, 10:22 UDF for varying inlet velocity with z-distance #1 Peter Wilkins Guest   Posts: n/a Hi, I'm trying to write a UDF which will enable me to specify the inlet velocities at a boundary in terms of the z position of the point on the boundary. Can someone tell me what is wrong with my code (this is to specify x-velocity): #include "udf.h" DEFINE_PROFILE(unsteady_inlet_x_velocity, thread, position) { real z, x[ND_ND]; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); z=x[1]; F_PROFILE(f, thread, position) = -1*0.129112*(z*10); } end_f_loop(f, thread) } I've used similar UDFs in 2D problems but I'm not sure how to make it work in 3D. I'd appreciate it if someone can help! Thanks very much, Peter

 May 18, 2006, 11:10 Re: UDF for varying inlet velocity with z-distance #2 Siddharth Khowala Guest   Posts: n/a hi I think if u need the z coordinate then it should be possibly x[2].The rest seems ok .Hope it helps regards

 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 rosco FLUENT 9 March 5, 2017 01:51 Mijin Kim FLUENT 0 September 28, 2009 04:50 Ray Hong FLUENT 4 December 30, 2005 13:32 Faruk Beyca FLUENT 3 November 28, 2005 15:25 Ronak Shah FLUENT 0 June 4, 2003 09:44

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