UDF and functions both are not showing Parabolic profile
2 Attachment(s)
hello all,
i am working on the the bifurcation geometry where, 1 inlet and 2 outlet. at the inlet first i have provided UDF (fully developed parabolic profile) please find the attachment for UDF code. but in the result, it shows constant profile instead of parabolic. after this i have used the ''function'' in fluent for parabolic velocity profile as follow v_mean*(1-(r/r_max)**2) where, v_mean and r_max are constant defined and r=sqrt(x**2+y**2). but no expected result. it shows constant profile instead of parabolic. please help |
Could you put the code here, not in an attachment? It's very hard/annoying to open attachments from a phone, and I guess that the code is not so big.
|
This is the working UDF for 2D profile
#include "C:\Program Files\ANSYS Inc\v162\fluent\fluent16.2.0\src\udf\udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; real h=0.003; real u=0.06392694064; /* for Re = 100 based on Diameter of cylinder */ face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = u*1.5*(1-(4*(y*y/(h*h)))); } end_f_loop(f, thread) } |
Your function is wrong because it assumes you work in the xy-plane, but your picture shows it's yz.
Your UDF is 2D, but should still work a bit. It's your channel centered around y=0? |
Quote:
your right sir my function was wrong, and now i got it. your comment helps me. yes, my channel centered around y=o. |
Quote:
i will try this UDF |
All times are GMT -4. The time now is 06:57. |