|
[Sponsors] |
UDF for varying inlet velocity with z-distance |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 18, 2006, 11:22 |
UDF for varying inlet velocity with z-distance
|
#1 |
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, 12:10 |
Re: UDF for varying inlet velocity with z-distance
|
#2 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf parabolic velocity inlet with unsteady case | Faruk Beyca | FLUENT | 4 | June 24, 2022 11:45 |
UDF paraboloid velocity inlet | rosco | FLUENT | 10 | June 2, 2017 09:01 |
UDF for Inlet velocity | Mijin Kim | FLUENT | 0 | September 28, 2009 05:50 |
Urgent! Help on UDF to set inlet velocity | Ray Hong | FLUENT | 4 | December 30, 2005 13:32 |
UDF paraboloid velocity inlet | Ronak Shah | FLUENT | 0 | June 4, 2003 10:44 |