|
[Sponsors] |
August 4, 2018, 19:43 |
3d velocity profile
|
#1 |
New Member
mehran mohammadi
Join Date: Aug 2016
Posts: 13
Rep Power: 10 |
hi all
I'm working on curvature inlet that upload its picture below .i want to define 3d velocity profile for inlet. my flow is turbulence and my udf is written below #include "udf.h" #define ymin 0.03031 #define ymax 0.03500 #define umean 12.5 #define B 1/7 DEFINE_PROFILE(x_velocity,t,i) { real x[ND_ND],y,h_y,del_y,ufree; face_t f; h_y=ymax-ymin; del_y=h_y*0.5; ufree=umean*(B+1); begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; if((y-ymin)<=del_y) F_PROFILE(f,t,i)= -1*(ufree*pow((y-ymin)/del_y,B)); else F_PROFILE(f,t,i)= -1*(ufree*pow((h_y-(y-ymin))/del_y,B)); } end_f_loop(f,t) } i chose a component type for velocity inlet and give this udf as a x velocity profile and set 0 for other component but fluent set a profile that upload its picture blow ( my profile vector must be in x direction but it is not) I was wondering if someone could point me in the right direction on implementing this function for this particular case Untitled.jpg geom.jpg profile.jpg |
|
August 27, 2018, 03:03 |
|
#2 |
Senior Member
|
You inlet boundary is parallel to z-axis, why do you assign x-velocity instead of z-velocity? Another problem is in the implementation. In C language if you do two integers division 1/7 you will get an integer 0, which might not what you have intended. Please use floating point division (1.0/7) instead.
|
|
September 10, 2018, 07:29 |
|
#3 |
New Member
mehran mohammadi
Join Date: Aug 2016
Posts: 13
Rep Power: 10 |
hi black mask thank you for replying it has been working
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[UDF] Relative coordinates in logarithmic velocity profile | cfdworker | Fluent UDF and Scheme Programming | 25 | July 13, 2017 04:44 |
InterFoam - Validation for velocity profile in simple channel | me.ouda | OpenFOAM Running, Solving & CFD | 0 | October 19, 2015 07:42 |
Logarithmic velocity profile | cfdworker | Fluent UDF and Scheme Programming | 0 | April 23, 2009 20:09 |
[boundary condition] logarithmic velocity profile | cfdworker | FLUENT | 2 | April 18, 2009 00:36 |
Prescribed inflow velocity profile - how to? | Alan | Main CFD Forum | 10 | October 28, 2005 13:14 |