CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   TEMPERATURE-AVERAGE (https://www.cfd-online.com/Forums/fluent/44511-temperature-average.html)

mech April 24, 2007 05:58

TEMPERATURE-AVERAGE
 
Hi everyone, The following UDF can be used to get the volume averaged temperature. How can I get area wighted average temperature at a cross sectioin of a 3D-channel by UDF? Can you help me? Thanks.

#include "udf.h" DEFINE_ADJUST(my_adjust, d) { Thread *t; /* Integrate temperature. */ real sum_tem=0.; cell_t c;

thread_loop_c (t,d) {

begin_c_loop (c,t)

sum_tem += C_T(c,t)* C_VOLUME(c,t);

end_c_loop (c,t) }


Nak April 25, 2007 16:06

Re: TEMPERATURE-AVERAGE
 
You can simply create a plane at the required cross section location and use Report-->surface integrals-->area-weighted average in the Fluent panel. No need for UDF to do that. Hope it helps...

--Nak.


All times are GMT -4. The time now is 01:12.