CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Heat Flux calculation inside domain (https://www.cfd-online.com/Forums/fluent-udf/109294-heat-flux-calculation-inside-domain.html)

shikamaru November 14, 2012 09:51

Heat Flux calculation inside domain
 
Hi,

I looked for an option to calculate heat flux in a surface/line (2D) inside domain but only found the option to output heat flux / Total surface heat flux in the boundary walls. Has anyone tried this before? I am also trying to write a udf for this but I am stuck on how to calculate the surface area normal to the heat flux.

I am using this for heat flux calculation. Not sure if this is right yet -

Code:

                                C_CENTROID(xc,cell,cell_thread);
                                tg_x = C_T_RG(cell,cell_thread)[0];
                                tg_y = C_T_RG(cell,cell_thread)[1];
                                con = C_K_EFF(cell,cell_thread,0.85);
                                tg_n = (pow(pow(tg_x,2)+pow(tg_y,2)),0.5);
                                heat_flux = con*tg_n;

Help anyone?


All times are GMT -4. The time now is 00:27.