CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   how to write a 3D linear temperature of UDF (https://www.cfd-online.com/Forums/fluent/49626-how-write-3d-linear-temperature-udf.html)

venus October 27, 2008 08:44

how to write a 3D linear temperature of UDF
 
this is my 2D linear temperature of 2D. DEFINE_PROFILE(linear, t, i) { face_t f; real d=0.; real n=0.; begin_f_loop(f, t) {

d+=1.; } end_f_loop(f, t) begin_f_loop(f, t) {

n+=1.;

F_PROFILE(f, t, i) = 323. + 377.*n/d; } end_f_loop(f, t) } but now i have to write a 3D linear temperature UDF on a cylinder. if i use the 2D UDF on the cylinder, the result of the simulation is very strange. i think the UDF has to add a parameter or something! can anybody help me?

max October 28, 2008 02:46

Re: how to write a 3D linear temperature of UDF
 
Hello Venus, i propose to reformulate your profile in terms of spatial coordinates instead of d and n because the numbering of faces at the boundary and therefor the sequence of the face loop is not so obvious in 3d.

cheers Max


All times are GMT -4. The time now is 15:32.