<span style="font-family:courier new,monospace">Hi Paul and Aleks,</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">I wanna do it inside nek, too! The size of my data is ~comparable to the high resolution case in "A comparison of Nek5000 and OpenFOAM for DNS of turbulent channel flow" => E=5,...,9, N ~ 5000,...,10000.</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">The question however doesn't aim on how to postprocess a particular dataset but is more a general question...</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">I'll try to illustrate another example with the same kind of problem to describe what I mean:</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">We look at the following grid</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             --> i3=1,...,5        -->i4=1,...,5</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             #---+------+------+---#---+------+------+---#                 jglob=9</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |                </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               ^</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             |      Element 3      |      Element 4      |               |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">           ^ |                     |                     | ^             |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">j3=1,...,5| #---+------+------+---#---+------+------+---# | j4=1,...,5  |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               | </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |               | </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             |      Element 1      |      Element 2      |               |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">             |                     |                     |               |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">             +   +      +      +   +   +      +      +   +               | jglob=2</span><span style="font-family:courier new,monospace"><br>
j1=1,...5 ^ |                     |                     | ^             |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">           | #---+------+------+---#---+------+------+---# | j2=1,...5   | jglob=1</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">            --> i1=1,...,5        -->i2=1,...,5</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">            ------------------------------------------></span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">      iglob=1   2      3      ...                       9</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Now i have a list with values defined on the "global" nodes.</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">Lets say we have a 1d profile U(:,jglob)</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">      9    #   ***</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                |   </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">      8    +   ***************</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                  |   </span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">                   |   </span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">      7    +   *********************</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">           |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">            |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">      6    +   ************************</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                 |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">      5    #   *************************</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">      4    +   ************************</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                 |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">                   |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">      3    +   *********************</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">                   |</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">            |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">      2    +   ***************</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">                  |</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">jglob=1   #   ***</span><br><br><br>How can I add or subtract this profile which is given on the "global nodes" to each point of the field.<br>Or asked another way: how do I get the global index as a function of the local index (jglob(j))?<br>
<br>Thanks in advance!<br>Jan F.<br><br>Am 9. März 2012 19:23 schrieb <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>>:<br>><br>><br>> Jan,<br>><br>> For what you want, I would do it inside nek, but it could<br>
> also be done in VisIt or in postnek by sampling the field<br>> along many z-lines and then averaging these together.<br>><br>> What is the size (E,N) of your data?<br>><br>> Regards,<br>><br>> Paul<br>
><br>><br>><br>> On Fri, 9 Mar 2012, <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a> wrote:<br>><br>>> Hi Aleks,<br>>><br>>> thank you for posting your routines. They are certainly very useful!<br>
>> But my point is to find an easy and quick way to check a single velocity<br>>> field. That can usually be done by taking the means over the full box and<br>>> subtracting them (as described in the first mail) from the instantaneous<br>
>> field.<br>>> I don't wanna do my full postprocessing that way. It's just to have a quick<br>>> look on the data (in particular the fluctuations)...<br>>> Do you think that is possible?<br>
>><br>>> Thanks!<br>>> Jan F.<br>>><br>>> Am 9. März 2012 15:34 schrieb <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>>:<br>>><br>>>> Hi Jan,<br>
>>><br>>>> Here are routines that I sometimes use that call avg_all for the list of a<br>>>> dump binary files given in a.list<br>>>><br>>>> <a href="http://www.mcs.anl.gov/~obabko/avg_fld.usr">http://www.mcs.anl.gov/~obabko/avg_fld.usr</a><br>
>>><br>>>> Use<br>>>><br>>>>    call avg_fld_all<br>>>><br>>>> in post-processing mode of Nek5000 (nsteps=0 in .rea) with a created<br>>>> a.list file of your binary .f files (for .fld files uncomment line with p66<br>
>>> & p67 = 4)<br>>>><br>>>> Best.<br>>>> Aleks<br>>>><br>>>><br>>>><br>>>> ----- Original Message -----<br>>>> From: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a><br>
>>> To: <a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a><br>>>> Sent: Wednesday, March 7, 2012 4:10:44 AM<br>>>> Subject: [Nek5000-users] Add/subtract 1d-mean profile<br>
>>><br>>>><br>>>> Hi NEKs,<br>>>><br>>>> I'm new to NEK and as a first exercise I'm calculating DNS of turbulent<br>>>> channel flow. So far everything is fine and works as is should.<br>
>>><br>>>> Now i wanna do some postprocessing with the (binary) files I dumped out.<br>>>> Let's say I wanna look at a single file:<br>>>><br>>>> Is it possible to calc the 1d mean of u over the whole channel domain (for<br>
>>> example with "call planar_average_s") then take this 1d mean profile and<br>>>> subtract it from u at every point to get u' (=> u'(i,j,k,e) = u(i,j,k,e) -<br>>>> <u>(j))?<br>
>>><br>>>> As I didn't dump the averages with "avg_all()" the hint given in<br>>>> <a href="https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2010-May/000451.htmlin">https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2010-May/000451.htmlin</a> this case is not applicable.<br>
>>><br>>>><br>>>> Thanks!<br>>>> Jan Frielinghausen<br>>>><br>>>> _______________________________________________<br>>>> Nek5000-users mailing list<br>>>> <a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>
>>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>>>> _______________________________________________<br>>>> Nek5000-users mailing list<br>
>>> <a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>>>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
>>><br>><br>> _______________________________________________<br>> Nek5000-users mailing list<br>> <a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
><br>