|
[Sponsors] |
October 8, 2012, 17:31 |
Velocity boundary condtion UDF help
|
#1 |
Member
Join Date: Sep 2012
Location: FL
Posts: 79
Rep Power: 13 |
I have a rectangular inlet (2x1-in X and Z)for a 3 D problem where I want to give a UDF for y velocity (-ve direction). The centre of the of the rectangular inlet is at (-2.5,2,8). The maximum velocity is 10. The profile is parabolic in x and z directon. I have written a UDF. But the velocity comes out to be >100.
I don't know where I'm I doing wrong. /************************************************** ***********************/ /* udf- velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_y_velocity, thread, index) { real p[ND_ND]; real x,z; face_t f; begin_f_loop(f, thread) { F_CENTROID(p,f,thread); x = p[1]; z= p[1]; F_PROFILE(f, thread, index) = (10-10*((x+2.5)*(x+2.5))-10*(((z-2)/0.5)*((z-2)/0.5))); } end_f_loop(f, thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Massflow or average velocity boundary condition | Sideshore | OpenFOAM Pre-Processing | 6 | September 27, 2016 15:09 |
UDF error - parabolic velocity profile - 3D turbine | Zaqie | Fluent UDF and Scheme Programming | 9 | June 25, 2016 19:08 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 17:15 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 15:45 |
UDF problem : inlet velocity in cyl. coord. system | Jongdae Kim | FLUENT | 0 | June 15, 2004 11:21 |