|
[Sponsors] |
April 4, 2012, 20:57 |
UDF for velocity profile
|
#1 |
Member
Join Date: Jan 2011
Posts: 45
Rep Power: 15 |
Hi,
I'm trying to write a UDF for an inlet velocity boundary condition. I want my velocity profile varies vertically and transversally. I know how to write a function for each case but not for both at the same time. x = longitudinal coordinate, y = vertical coordinate, z = transversal coordinate. U(z) = 1.0 + sen((2*pi/750)*z); horizontal velocity as a function of z-coordinate. U(y) = U(z)*(y/12.8)^0.142857 The center of my channel inlet is at (x,y,z)=(0,0,0), and the contours extent to z = +-175 and y = +-15. For the vertical velocity profile I wrote the following function: DEFINE_PROFILE(Velocity, t, i) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, t) /* loops over all faces in the thread passed in the DEFINE macro argument */ { F_CENTROID(x,f,t); y = x[1]; y = y+15; F_PROFILE(f, t, i) = 2*pow((y/(12.8)),0.142857); } end_f_loop(f, t) } But how can I iclude in the function the tranversal variation of velocity??? Any help will be appreciated!! Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
3D UDF Paraboilc Velocity Profile (Can't Maintain) | Sing | FLUENT | 12 | August 7, 2017 07:25 |
Simulation with UDF for species mass fraction and velocity profile | virgy | Fluent UDF and Scheme Programming | 8 | February 7, 2012 05:30 |
Please Help! Temperature profile UDF for 3D geometry | subhankar_bhandari | FLUENT | 2 | April 16, 2011 06:30 |
UDF parse error at profile function line | Wiggy | Fluent UDF and Scheme Programming | 1 | July 27, 2009 16:59 |
Associating profile files for the UDS though a UDF | Bharath | FLUENT | 0 | December 1, 2006 16:58 |