CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How to get average flow quantities from oscillating steady solver results in FLUENT (https://www.cfd-online.com/Forums/fluent/204818-how-get-average-flow-quantities-oscillating-steady-solver-results-fluent.html)

superluminality August 1, 2018 12:55

How to get average flow quantities from oscillating steady solver results in FLUENT
 
3 Attachment(s)
I simulate one case using pressure-based, steady solver. Pressure-velocity coupling scheme is SIMPLEC. After 1,000 iterations all the residuals becomes flat, with the continuity residual around 3e-1 (obviously not small enough to be satisfactory). Flow quantity (e.g. temperature) on one sampled point was also monitored. Temperature on this sampled point oscillates from 295 K to 312 K for every 20 iterations.
Now I want to calculate the average flow quantities (including velocity magnitude, temperature) over the whole fluid domain during those 20 iterations. Could anyone tell me how to do it in FLUENT?
PS: For transient solver in FLUENT, you can enable the option 'data sampling for time statistics' to average among time steps. But for steady solver in Fluent, is there similar way to average among iterations?
Pictures of scaled residual and temperature history on the sampled point are also attached for reference.

LuckyTran August 1, 2018 13:16

Fluent doesn't have this option built-in. Although I agree it would be a nice diagnostic tool to have. You should request it as a feature to Ansys support and maybe it'll show up in a future version.

superluminality August 1, 2018 13:25

Many thanks for your reply. Is it possible to use Macros in 'Execute Commands' under 'Calculation Activities', or even, hook up a UDF? I have tried these manners but still haven't got a clue... Many thanks if you could give a hint.

superluminality August 1, 2018 13:26

Quote:

Originally Posted by LuckyTran (Post 701208)
Fluent doesn't have this option built-in. Although I agree it would be a nice diagnostic tool to have. You should request it as a feature to Ansys support and maybe it'll show up in a future version.

Many thanks for your reply. Is it possible to use Macros in 'Execute Commands' under 'Calculation Activities', or even, hook up a UDF? I have tried these manners but still haven't got a clue... Many thanks if you could give a hint.

LuckyTran August 1, 2018 18:15

You are right it certainly is doable with a udf. Off the top of my head I don't know what the final form would be. You would only need to loop through the cell thread and keep an index of the iteration count. It sounds simple at least... You might want to google udf's for calculating the time-average and replacing the time-step with iterations.

superluminality August 2, 2018 05:12

Quote:

Originally Posted by LuckyTran (Post 701233)
You are right it certainly is doable with a udf. Off the top of my head I don't know what the final form would be. You would only need to loop through the cell thread and keep an index of the iteration count. It sounds simple at least... You might want to google udf's for calculating the time-average and replacing the time-step with iterations.

Many thanks! I have not used UDF before and would try as you've suggested. Is there any other resource (like UDF samples and tutorials) you suggested which could help me to tackle this problem ASAP?

AlexanderZ August 2, 2018 07:58

ansys fluent customization manual
google
youtube
this forum as well

best regards

superluminality August 2, 2018 13:39

Quote:

Originally Posted by LuckyTran (Post 701233)
You are right it certainly is doable with a udf. Off the top of my head I don't know what the final form would be. You would only need to loop through the cell thread and keep an index of the iteration count. It sounds simple at least... You might want to google udf's for calculating the time-average and replacing the time-step with iterations.

I have compiled a UDF to achieve this purpose after learning programming with it in Customization Manual. In the meantime, I have contacted ANSYS technical support and they created a feature request. Hopefully it will be done automatically in future versions. Many thanks for your kind reply!


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