|
[Sponsors] |
March 31, 2020, 20:03 |
3D UDF for rectangular domain inlet
|
#1 |
New Member
AL AMEEN AHMED RUFAI
Join Date: Nov 2019
Posts: 2
Rep Power: 0 |
Hi, I am trying to model a UDF for my wind tunnel inlet using power law.
1; when I try computing my inlet conditions from in reference value I get *nan* in velocity section (#include "udf.h" #define P 1./7. //power law n value 7// #define uref 1.32 // m higeht of inlet// DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); z = x[2]; F_PROFILE(f, thread, position) = 40*pow(z/uref,P); } end_f_loop(f, thread) } 2; I get the same issue and error when I try using the function expression. uref [m s^-1] * (z / z_ref [m]) ** alpha3.my inlet is at x=-1 using magnitude and direction under velocity specification method Last edited by aar007; March 31, 2020 at 20:06. Reason: additional information |
|
April 1, 2020, 04:10 |
Udf
|
#2 |
Senior Member
|
The UDF is alright and you can use it. However, this cannot be used for initialization. DEFINE_PROFILE is not executed before initialization. You have to initialize by providing some value for the velocity.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 11, 2022, 08:06 |
|
#3 |
New Member
Ved prakash
Join Date: Sep 2019
Posts: 2
Rep Power: 0 |
Hi, have you found the solution?? I am also trying to use this expression. Please help me out.
|
|
May 11, 2022, 23:58 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
solution is written by vinerm one line above
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbomachinery Mass imbalance | sheaker | CFX | 12 | September 5, 2019 09:09 |
Ansys Fluent UDF, Wall Average Temperature Depend On Inlet Velocity | ozgeozge | Fluent UDF and Scheme Programming | 1 | April 15, 2019 02:31 |
Fluent UDF wrong number of cells in parallel - correct in serial | dralexpe | Fluent UDF and Scheme Programming | 7 | May 17, 2018 09:26 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
Reduced domain/ Pressure inlet to velocity inlet | victoryv | FLUENT | 1 | June 29, 2013 15:45 |