[Nek5000-users] Add/subtract 1d-mean profile

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sat Mar 10 20:35:07 CST 2012


Hi Jan,

Thanks for the input.

I guess my first question is the following.  When you say you
want to

"add or subtract this profile which is given on the global nodes
to each point of the field"

it seems we need to be talking in the context of some software
that is going to read the field in and then process the data.

At present, I know of only 3 codes to do that: nek, VisIt, and 
postnek (though there have been custom, one-off, codes written
in the past).

Second question is --- What do you want to do with this field
after you have subtracted the mean profile?   Do you want to
write it to disk, visualize it, use it in a calculation, 
analyze it with more statistics, or....?

In any case, it seems likely that processing in nek is the
way to go because it has the ability to read the data, write
the data, and readily compute statistics.   In this mode, you
simply are using nek as a post-processor and not for timestepping.

Please advise if that's the path you wish to take, or if you
had something else in mind.

Cheers,

Paul




On Sun, 11 Mar 2012, nek5000-users at lists.mcs.anl.gov wrote:

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


More information about the Nek5000-users mailing list