Parabolic velocity profile in 3d with UDF
4 Attachment(s)
Hi,
I am trying to get parabolic velocity at circular inlet of the pipe(figures and UDF code attached). Ideally velocity contour at inlet should show maximum velocity at center then decreasing towards outer side. But i am getting that in only one plane. Any suggestions to solve that? In attachments, image1 is vel contour at inlet, images 2 and 3 are the same at planes perpendicular to each other and in the pipe along its length. Thanks in advance. |
Quote:
#include "udf.h" #include "math.h" DEFINE_PROFILE(inlet_x_velocity, thread, index) { real x[ND_ND]; /* this will hold the position vector */ real y; real z; real a; face_t f; begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/ { F_CENTROID(x,f,thread); y =x[1]; z =x[1]; a = pow((pow(y,2)+pow(z,2)),0.5); F_PROFILE(f, thread, index) = 2*0.00000491976*(1- (a*a/(0.10214*0.10214))); } end_f_loop(f, thread) } *****Axis is on the X direction |
All times are GMT -4. The time now is 11:12. |