CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for varying inlet velocity with z-distance

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

LinkBack Thread Tools Display Modes
Old   May 18, 2006, 10:22
Default UDF for varying inlet velocity with z-distance
Peter Wilkins
Posts: n/a

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_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,

  Reply With Quote

Old   May 18, 2006, 11:10
Default Re: UDF for varying inlet velocity with z-distance
Siddharth Khowala
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

  Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF paraboloid velocity inlet rosco FLUENT 10 June 2, 2017 08:01
UDF for Inlet velocity Mijin Kim FLUENT 0 September 28, 2009 04:50
Urgent! Help on UDF to set inlet velocity Ray Hong FLUENT 4 December 30, 2005 13:32
udf parabolic velocity inlet with unsteady case Faruk Beyca FLUENT 3 November 28, 2005 15:25
UDF paraboloid velocity inlet Ronak Shah FLUENT 0 June 4, 2003 09:44

All times are GMT -4. The time now is 14:58.