CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (

mech April 24, 2007 05:58

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

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...


All times are GMT -4. The time now is 18:34.