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/)
-   -   How to write a UDF for time-sampled data? (https://www.cfd-online.com/Forums/fluent-udf/233811-how-write-udf-time-sampled-data.html)

pcsingh February 12, 2021 12:41

How to write a UDF for time-sampled data?
 
Flow Time
Area weighted Average Temp(K)

2.4
299.881237

2.6
299.859884

2.8
299.848791

3.0
299.842712

3.2
299.839355

3.4
299.837498

3.6
299.836468

3.8
299.835896

4.0
299.835577

4.2
299.835399

This is the type of data I am getting during my simulation (at a different flow time, I am getting area-weighted average temperature) ;

So, I want to write a UDF which automatically stores these data and do the average. Please suggest.
Write now I am using report file definition to get these value and, manually I am averaging it. Which is tough for 150-160 simulations.
I got to know about Time Sampled Data
T_mean= C_STORAGE_R(c,t, SV_T_MEAN)/delta_time_sampled;
But don't know how to implement this at the outlet.


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