[Nek5000-users] ?= Output format of Nek5000 fil
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Tue Feb 28 03:02:07 CST 2017
Hi,
About format of ###.f files.f As it was written it is binary format
supporting both single- and multi-file output. That is why you have
single (or more) digit before the dot in the file number. If you specify
multiple file output this first digit numbers files in a single snapshot
and the last five digits give snapshot number. When it comes to file
interior. First you have 132 character long header that is ascii and can
be read directly. It contains:
- wdsizo - number of words per real field (to distinguish between
single and double precision output
- nxo,nyo,nzo - number of grid points in the element in each direction
- nelo - number of elements in given file (important for multi-file output)
- nelgt - global number of elements (in all files; the same as nelo for
single file output)
- time - real number for simulation time
- istep - time step
- fid0 - current file number (for multi-file output, 0 for single file
output)
- nfileoo - number of files in the snapshot
- few characters specifying what fields are saved; e.g. XUP - means
coordinates, velocity, pressure. Notice the coordinates do not have to
be saved in a file, but they can!!!
- p0th - this is only in new format and gives averaged pressure (not
all simulations specify this number)
The header is followed by single real (4 bytes) test pattern to
distinguish between big and little endian. Next come nelo integers with
local-to-global element mapping, which assigns every element in the file
its global identity that was used by nek5000 during simulation. After
that you have fields you've specified for writing
- X - physical coordinate - vector
- U - velocity -vector
- P - pressure - scalar
- T - temperature - scalar
- S - passive scalar -scalar; here you can have digits specifying number
of passive scalars
All variables are specified per element, however in the case of scalars
you have nelo sections with nxo*nyo*nzo reals, but for vectors you get
ndim*nelo sections with nxo*nyo*nzo reals, as vector component are saved
per element, to per array. It means you have vx, vy, vz for first
element, next vx, vy, vz for second element and so on.
Concluding. If you want to know exact physical position of your grid
points you have to save coordinates in the file. You do it in ###.rea
file by specifying at the end of the file:
6 SPECIFICATIONS FOLLOW
T COORDINATES
T VELOCITY
T PRESSURE
F TEMPERATURE
F TEMPERATURE GRADIENT
or in ###.par file be setting
[MESH]
writeToFieldFile = yes
When you have them in the file you can easily read coordinates and use
them in any way.
I hope this was not too long and detailed.
Regards
Adam
On 27/02/17 11:10, nek5000-users at lists.mcs.anl.gov wrote:
> Hello,
>
> Thank you Paul, I tried your method and it worked. But offsetting the slide trouble me, and I would like to really handle the data freely. I got almost all the ingredient I needed, I just need a function that when I feed it the cell information, it give me the coordinates of points. It must be somewhere in the source code, or may be on Internet, is anyone know about it?
>
> Thank you very much.
>
>
>
>
>
> On Friday, February 24, 2017 18:33 CET, nek5000-users at lists.mcs.anl.gov wrote:
>
>> Sometimes visit will have dropouts if your slice corresponds precisely to the location of an element
>> interface.
>>
>> Offsetting the slice by, say, .00001, will often correct that issue...
>>
>> Paul
>>
>> ________________________________________
>> From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
>> Sent: Friday, February 24, 2017 9:15 AM
>> To: nek5000-users at lists.mcs.anl.gov
>> Subject: Re: [Nek5000-users] ?==?utf-8?q? Output format of Nek5000 file
>>
>> Thank you for your quick response. I just feel more comfortable working interactively with data. The reading tool of data and mesh with Matlab are already there, I just need a way to map the coordinate of those data with the mesh information.
>>
>> More specific reason is I read the data with Visit, and when I take slides, it appear a strange white band in my fields, and I don't know the reason so I need an alternative way to visualize my fields.
>>
>>
>>
>>
>> On Friday, February 24, 2017 17:45 CET, nek5000-users at lists.mcs.anl.gov wrote:
>>
>>> * Yes the .fXXXXX files are the binary fld files. The ASCII and the old binary format ends with .fldXX.
>>> * Is there any special reason why you want to load the data into MATLAB?
>>>
>>>
>>> -----Original message-----
>>>> From:nek5000-users at lists.mcs.anl.gov <nek5000-users at lists.mcs.anl.gov>
>>>> Sent: Friday 24th February 2017 16:46
>>>> To: nek5000-users at lists.mcs.anl.gov
>>>> Subject: [Nek5000-users] Output format of Nek5000 file
>>>>
>>>> Hello everyone,
>>>>
>>>> I have recently started to work with Nek5000, I have few question about the output format:
>>>>
>>>> -In all the documents available, they talk about .fld file, but I launched the quickstart tutorial, and I got only .f000... data file. Is this the same?
>>>>
>>>> -I found a Matlab script that read binary data into Matlab, and the data I received is a matrix of : nel . N^3 . fields
>>>> So I guess for each spectral element, and for each field, the file store N^3 numbers, corresponding to the values. But I have read somewhere that you can't mix the equally spaced value with GLL points. So in the binary file I got, what type of mapping is using? GLL abscissas or equally spaced?
>>>>
>>>> -About GLL points, I got it in 1D, but when it come to 3D, with curved elements, it become a bit complex, do you know where in the program or are there any pre-made tool that map the GLL points coordinates base on coordinate of vertices and curvature?
>>>>
>>>>
>>>> Thank you,
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>> _______________________________________________
>> 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