CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   same velocity in inlets (http://www.cfd-online.com/Forums/fluent/121465-same-velocity-inlets.html)

 rayan24 July 29, 2013 11:43

same velocity in inlets

I want to impose by UDF a same velocity profile in 3 inlets, but i don't get same velocity in the 3 inlets apparently i impose my profile in function of the distance r!!

how can i impose my velocity profile in the "surface" of inlet to get samevelocity please??

my udf is :

HTML Code:

```#include "udf.h" DEFINE_PROFILE(w_velocity_inlet,t,i) { real x[ND_ND]=3; /* this will hold the position vector */ real r; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); r = x[0]; F_PROFILE(f,t,i) = -((0.0431*pow(r,3))-(0.3857*pow(r,2))+(0.3129*r)+8.8045); } end_f_loop(f,t)```
thanks

 Amir July 29, 2013 15:58

Dear Rayan,

Your profile is a function of x-coordinate, so you will get different results if the elements of these inlets have different x positions! Did you expect something else?!

Bests,

 rayan24 July 29, 2013 17:14

Tank you Amir for your replay,

My 3 inlets are aligned in the XY plane, so the Inlet 1 ranges between x = [1, 4.5], inlet 2 is between x = [5, 7.5] and the inlet 3 is between x = [5, 7.5], so I can't get to impose my velocity profile in each inlet!

Do you have an idea please?

 Amir July 30, 2013 03:41

Quote:
 Originally Posted by rayan24 (Post 442676) Tank you Amir for your replay, My 3 inlets are aligned in the XY plane, so the Inlet 1 ranges between x = [1, 4.5], inlet 2 is between x = [5, 7.5] and the inlet 3 is between x = [5, 7.5], so I can't get to impose my velocity profile in each inlet! Do you have an idea please?
Hi,

There are lots of options. You can either use if-clauses to switch between different thread IDs or simply use 3 UDFs.

Bests,

 rayan24 July 30, 2013 03:46