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

UDF for varying inlet velocity with z-distance

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2006, 10:22
Default 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
  Reply With Quote

Old   May 18, 2006, 11:10
Default 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
  Reply With Quote

Reply


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
udf parabolic velocity inlet with unsteady case Faruk Beyca FLUENT 4 June 24, 2022 10:45
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 12:32
UDF paraboloid velocity inlet Ronak Shah FLUENT 0 June 4, 2003 09:44


All times are GMT -4. The time now is 10:15.