3D UDF for rectangular domain inlet
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 https://ibb.co/jTy62zm |
Udf
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.
|
Hi, have you found the solution?? I am also trying to use this expression. Please help me out.
|
solution is written by vinerm one line above
|
All times are GMT -4. The time now is 04:25. |