CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   surface integrals (https://www.cfd-online.com/Forums/fluent/42898-surface-integrals.html)

Lucy November 20, 2006 11:41

surface integrals
 
I wrote simple code to calculate sum of flux and scalar0 on outlet.

#include "udf.h" DEFINE_ADJUST(adjust_new, domain) { Thread *t; face_t f; real flux, value; flux=0; value=0;

thread_loop_f(t,domain) { if ( t==Lookup_Thread(domain,5) )

{

begin_f_loop(f,t)

{

value += F_UDSI(f,t,0);

flux +=F_FLUX(f,t);

}

end_f_loop(f,t)

} } printf(flux= %f\n", flux); printf("value= %f\n", value); }

I compared results with results from Surface Integrals window on Fluent. The results should be the same. The flux is the same, but sum of scalar0 is different. Can anybody tell me why ??


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