FLUENT  Using a User Defined Function (UDF) to obtain unsteady statistics of dependent variables in a timedependent calculation
In a time dependent FLUENT calculation, you may want to obtain unsteady statistics (mean values and RMS values) of dependent variables. This solution provides a method to do this via a UserDefined Function (UDF). The following UDF shows how this can be done. Inside the UDF, make sure that the header file "models.h" is included. ############# #define RMS(mean_accum, rms_accum, n, nsq) sqrt(fabs(rms_accum/n  SQR(mean_accum)/nsq)) u_m = C_STORAGE_R(c,t,SV_U_MEAN)/delta_time_sampled ... V_MEAN ... W_MEAN u_rms = RMS(C_STORAGE_R(c,t, SV_U_MEAN), C_STORAGE_R(c,t, SV_U_RMS), delta_time_sampled, SQR(delta_time_sampled)); ############### 

