Non uniform heat flux for inclined pipe
I have developed a udf for non uniform heat flux on a horizontal pipe . The radius and length of the pipe are 0.033 m and 1m respectively. i have modeled the pipe in xy plane .Here is what I scripted so far :
#include "udf.h" DEFINE_PROFILE(heat_flux, thread, position) { real x[ND_ND]; /* this will hold the position vector */ float y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x, f, thread); y = x[1]; if (-0.033 < y && y < -0.01858) { F_PROFILE(f, thread, position) = -6.2602e10 - 1.5741e13 * y - 1.6338e15 *(y * y) - 8.9775e16 * (y * y * y) - 2.7551e18 * (y * y * y * y) - 4.4779e19 * (y * y * y * y * y) - 3.0114e20 *( y * y * y * y *y); } else if (-0.01858 < y && y < 0.00332) { F_PROFILE(f, thread, position) = 7.0952e6 - 3.1159e9 * y + 3.9774e11 * (y * y) + 1.4705e13 * (y * y * y); } else if (0.00332 < y && y < 0.033) { F_PROFILE(f, thread, position) = 1.94e03; } } end_f_loop(f, thread) } above given code running sucessfully . but it works only horizontal pipe. if i want to tilt the horizontal pipe in some degree say 13 degree . what are the changes needed in the udf? |
your equations of F_PROFILE(f, thread, position) should be dependent on x as well as on y, use sin cos
best regards |
All times are GMT -4. The time now is 19:51. |