[Nek5000-users] Transfer data from an nelx*nely*nelz array of Nth-order to an n*n*n array for FFT analysis

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri May 4 07:48:18 CDT 2012


Dear All,

This has been a topic of great interest of late and we've
had a lot of discussion among the developers.

Ultimately, the choice of approach has to be influenced by
the anticipated scale of the analysis.   If you're going to
analyze 128^3, this can likely be done with matlab on a
single workstation.   If you're planning to look at 4096^3,
then a custom approach would be required in order to go after
the statistics of interest, in parallel.   The latter case
is harder - and it is certainly hard to provide a general solution.

Katie has been working on putting our sem2lex (spectral element to
lexicographical ordering) code into the tools directory, which
is a stand-alone code that will take output fields associated
with any SEM mesh generated by genbox (which ensures that the 
elements are ordered lexicographically, ex-ey-ez) and maps it
to pointwise lexicographical ordering (i,j,k).  Such data is
then ready for processing in matlab or other code.

This is a reasonable approach up to around 400 cubed, I would
guess, but might be unwieldy after that.   Probably sem2lex will
work for even larger datasets.  The question then is how you
would process them.

Regarding the question of resolution, I typically go with a 
one-to-one ratio --- If I have Ex elements in the x-direction
of order N, then I set nx=N*Ex.   (Note that N=lx1-1, where 
lx1 is specified in the SIZE file.)

One can argue whether this choice of nx is over- or under-sampled.
My sentiment is that you shouldn't attach too much significance
to the upper part of the spectrum in any case since resolution
is marginal there in any case.  (Another way of thinking about
it --- as you near the Nyquist limit of kmax=nx/2, the results
are necessarily dominated by numerical truncation error, and not
physics.)

We hope to have the sem2lex in the repo soon (i.e., next week)
and will send out an email when it's in place.

I hope this helps.

Paul




On Fri, 4 May 2012, nek5000-users at lists.mcs.anl.gov wrote:

> Hi Neks,
> another point I'm (even more) interested in is: how do you do your FFT analysis?
> I guess in a first step the grid is mapped onto a regular grid
> (ifreguo = .true.) and in a second step the FFT is computed at that
> grid.
> Then the question arises: What is a good choice for "nrg" (with nrg as
> the dimension of regular grid (nrg**ndim)...)? nrg=lx1 or lx1-1?
> Regards
> Jan
>
> 2012/4/13 Jan Frielinghausen <jan.frielinghausen at googlemail.com>:
>> Hi Neks, Hi Can,
>> I too would be very interested in getting more information about these routines.
>> regards
>> Jan
>>
>> Am 5. April 2012 18:10 schrieb  <nek5000-users at lists.mcs.anl.gov>:
>>> Hi neks !
>>>
>>> For a given velocity field
>>> (vx(1:lx1,1:ly1,1:lz1,1:lelv),vy(1:lx1,1:ly1,1:lz1,1:lelv),vz(1:lx1,1:ly1,1:lz1,1:lelv))
>>> i would like to calculate the energy spectrum, this implies FFT
>>> transformation on regular arrays
>>> vx(1:n,1:n,1:n),vy(1:n,1:n,1:n),vz(1:n,1:n,1:n) (need
>>> deltax=deltay=deltaz=cst).
>>> On the emailing-list it has been said :
>>> "We do have off-line serial routines
>>> that can transfer data from an nelx x nely x nelz array of Nth-order
>>> elements to an nxnxn array - this allows for analysis by FFTs etc"
>>>
>>>
>>> Can you please tell me more about this ? What are these routines ??
>>> B.regards
>>> Can
>>>
>>> _______________________________________________
>>> 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