wassim
Subscriber
Thank you for your reply. nIn the volume, I want to set the initial temperature 293K. However, in the boundary conditions the volume doesn't exist. nI search in the UDF manual and I found several codes such as:n#include udf.hnDEFINE_INIT(my_init_func,d)n{ncell_t c;nThread *t;nreal xc[ND_ND];n/* loop over all cell threads in the domain */nthread_loop_c(t,d)n{n/* loop over all cells */nbegin_c_loop_all(c,t)n{nC_CENTROID(xc,c,t);nif (sqrt(ND_SUM(pow(xc[0] - 0.5,2.),npow(xc[1] - 0.5,2.),npow(xc[2] - 0.5,2.))) < 0.25)nC_T(c,t) = 400.;nelsenC_T(c,t) = 300.;n}nend_c_loop_all(c,t)n}n} nThis one is use it to set the initial temperature in a sphere with radius 0.25.nIn my case it is a cylinder.ncan you advise please.n