Open dshaver-ANL opened 4 years ago
This is partially answered in the averaging section. I think it would be better to do it as a tutorial rather than a new section of documentation.
It might be good to come back and update this to do Reynolds stresses and turbulent heat fluxes or at least an average velocity profile in a pipe.
The following link: https://www.google.com/url?q=https://lists.mcs.anl.gov/pipermail/nek5000-users/2012-July/001883.html&sa=D&source=hangouts&ust=1592425866078000&usg=AFQjCNEXHUT_ZfaJMH2uk7WTE-mv7k1VsQ
Has the following info, that needs to be distilled into a meaningful FAQ and/or tutorial for avg_all and extract of the Reynolds stress tensor:
avg_all keeps a running tally, normalized by number of steps in the tally, of serveral quantities, and then dumps these and restarts the tallies after each "iastep" (p68) or iostep, if p68=0. So, if p68=500, each tally will be an average entailing 500 timesteps. You can subsequently average these files together to get longer-time averages.
The reason you might not want to simply, say, step p68 to 5000 is that sometimes jobs terminate early -- your queue slot ends at lower step than anticipated, etc. So this approach gives the flexibility to subsequently post-process long-time averages.
In order to constuct averages from sequences of averages, we need tallies of, for example, u and u^2. This allows one to compute the average, u =(1/n) sum_i u_i ,
and the average of the square,
(uu) =(1/n) sum_i u_i u_i ,
from which we can compute the rms (squared)
(u')^2 = (uu) - u * u
In order to able to easily compue the rms from a sequence of files (e.g., as illustrated in (1)--(3)), the rms file contains the u^2 average, the avg file contains the u-average, and these are then combined either with other files, as in (1) and (2), and then together, as in (3), to get the rms.
Different users have taken different approaches to (1)--(3). We have some ad hoc averaging tools for the .fld files. For larger runs, most people average by loading multiple f0000 or .fld files into nek5000, from which one can perform all the steps. For many cases, step (3) can also be done in postx.
I believe that (3) can also be done in Visit by defining a function of variables -- one tricky thing there is that the u-bar and u^2-bar are coming from different files and I believe that Visit operations are generally applied to operands from the same file (e.g., the same nominal timeslice).
Note that the rm2 file contains the cross product running averages, , from which you can get Reynolds
stresses, etc.