|
[Sponsors] |
April 25, 2016, 19:45 |
2D UDF for inlet y velocity
|
#1 |
New Member
Keyu Dhingani
Join Date: Dec 2015
Location: San Diego, CA
Posts: 3
Rep Power: 10 |
Hi,
I have seen and used UDFs for the inlet x velocity, but what do I do to make a UDF for inlet y velocity. Here is the UDF that I used for inlet x velocity. [ #include "udf.h" #define umean 10.0 #define R 0.0005 DEFINE_PROFILE(inlet-x-velocity,t,i) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = (3./2.)*umean*(1-pow((y-R)/R,2)); } end_f_loop(f,t) } ] I tried replacing x with y and vice versa to hopefully get the y-direction velocity, but unsuccessful. Any suggestions here will be useful. Thanks, Keyu |
|
April 26, 2016, 06:01 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
This line varies the position along the X, Y, Z axis (0,1,2 respectively).
y = x[1]; If you want a velocity profile normal to the Y direction, you need to use the variation of the position in the X direction if 2D and X and/or Z direction if 3D. ps: you asked in a topic and created another one with exactly the same question. there is no need to do that. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF inlet velocity profile mismatch with Fluent | ChristineL | Fluent UDF and Scheme Programming | 15 | November 25, 2016 07:45 |
Having trouble adapting serial UDF to work in parallel | muyuntao | Fluent UDF and Scheme Programming | 1 | November 10, 2015 14:42 |
Velocity boundary condtion UDF help | victoryv | Fluent UDF and Scheme Programming | 2 | October 9, 2012 16:27 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
UDF component in Cyliderical Velocity? | Hongchan Kim | FLUENT | 3 | April 24, 2001 13:20 |