UDF Temperature boundary Conditions
1 Attachment(s)
I'm trying to set a variable temperature as boundary condition on the exterior surface of a cylinder. I work in 3D and I've done the attached udf. It is well compiled under Fluent but there is no fluctuation of temperature along the tube. In my case the Temperature should change on the Z axis but in the simulation it seems that it changes on the x axis. Could you tell my if my UDF is OK and why it doesn't work ?
Thanks Here's the code : #include"udf.h" /* profile for temperature */ DEFINE_PROFILE(z_temperature,t,i) { real z[ND_ND]; real y; face_t f; begin_f_loop(f,t) { F_CENTROID(z,f,t); y=z[0]; F_PROFILE(f,t,i) =4.6706*10*10*10*10*10*10*y*y*y*y*y+2.3199*10*10*1 0*10*10*10*y*y*y*y-85471*y*y*y-72106*y*y-437.51*y+1722.5; } end_f_loop(f,t) } |
z[0] reads the x-coordinate. No wonder your profile changes with x.
use z[2] instead. |
Thanks a lot, it works !
I'm beginner in the UDF coding, I don't know all the stuff about it :) |
I'm also new at udf and I want to stabilish simple boundary conditions.
I'm trying to implement stream function to compare my result with fluent's result. On the cavity walls, Velocity is zero. Do I have to mention this or when I simulate I set this on fluent? Look what I've done: Quote:
|
All times are GMT -4. The time now is 21:29. |