[Nek5000-users] calling avg_all

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Jul 12 12:43:48 CDT 2012


Thanks Paul
Rich




nek5000-users at lists.mcs.anl.gov 
Sent by: nek5000-users-bounces at lists.mcs.anl.gov
07/12/2012 10:35 AM
Please respond to
nek5000-users at lists.mcs.anl.gov


To
nek5000-users at lists.mcs.anl.gov
cc

Subject
Re: [Nek5000-users] calling avg_all







Hi Rich,

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,

        _               _
(1)    u =(1/n) sum_i  u_i ,

and the average of the square,

       ____                _    _
(2)   (uu)  =(1/n) sum_i  u_i  u_i  ,

from which we can compute the rms (squared)
       ____       ____    _     _
(3)   (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, <uv> <vw> <uw>, from which you can get Reynolds
stresses, etc.

Paul






On Thu, 12 Jul 2012, nek5000-users at lists.mcs.anl.gov wrote:

> Dear Nek people:
>
> I am performing DNS  and I want to compute the time mean velocities and
> pressure as well as the Reynolds stresses. So I tried just doing a 
simple
> call to subroutine avg_all from subroutine userchk in the .usr file with
> no restrictions (no specific time steps, just evey time step).

> 1st question. Does this accomplish a running time average for the 
desired
> variables?

> 2nd question. I don't want the associated files listing all of the
> associated variables printed out every time step, only so often. Is this
> accomplished by setting parameter 68 (iastep) to the frequency of 
desired
> outputs? Or does iastep determine how often subroutine avg_all is called
> as is implied in the .rea file.

> 3rd question. I tried to look at obtained results in the rms an rms2 
files
> in Visit, but it doesn't recognize the time mean/rms variables. What's 
up
> with that?
>
> Thanks
> Rich
>
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20120712/1b1ec205/attachment.html>


More information about the Nek5000-users mailing list