3D UDF Paraboilc Velocity Profile with max velocity
Hello,
I am simulating the air flow over a 3D building in a wind domain using a paraboilc velocity inlet profile. I have this UDF but i would like have a max velocity in my UDF, exemple 5 m/s // UDF code for 3D parabolic Velocity Profile // #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; real z; // Vertical Distance face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); z = x[2]; F_PROFILE(f, thread, position) = 24.9 *pow(z,0.27); } end_f_loop(f, thread) } Thank you |
If you just want to limit the velocity, you could look at the lesser of two values: your function, and 5.0. Like this:
Code:
#include "udf.h" Code:
#include "udf.h" |
All times are GMT -4. The time now is 14:52. |