[Nek5000-users] Outputting to 2d VTK using Postnek

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Jan 5 14:59:19 CST 2018


Hi, everyone:

I am still having problems outputting 2d VTK files. I have tried modifying
the function vtk_out_hex() in postnek/trap.f (see attached file) by adding
an extra conditional for when mz == 1 (which is true for 2d). In this case,
I have simply copied the original code, but omitted the k loop and set k =
1.

When I do this, postnek will output the cell information for 2d simulations
(CELLS), although it is still outputting the 8 points per cell (3d) since I
am not sure which 4 of the 8 points might be correct for the 2d case. I
have tried visualizing the 2d VTK file using various combinations of the 4
points: (1,2,3,4), (5,6,7,8), (1,3,5,7), etc., but the results still do not
look correct.

I have attached the modified version of vtk_out_hex() that I have written.
I have also attached the VTK output that it produces: eddy_uv_mod.vtk.

I'm afraid I am a bit stuck here without better knowledge of the underlying
data structures in Nek. Any help or nudges in the correct direction are
appreciated!

Thanks,
Taiyo



On Wed, Dec 6, 2017 at 1:47 PM, <nek5000-users at lists.mcs.anl.gov> wrote:

> Hi, all:
>
> I have run into problems using postnek/postex to convert simulation output
> to VTK format for 2d simulations (3d simulations work fine). I have tested
> this using the eddy_uv example from the NekExamples directory. When using
> postex, I use the option "DUMP vtk ALL", which produces the attached VTK
> output. It seems that the grid point position information is incorrect.
>
> Also, I have looked through the postnek functions in trap.f and it seems
> that VTK cell information (CELLS, CELL_TYPES) is omitted for 2d cases. Is
> there a way to output this information for 2d results?
>
> Perhaps there is something I am overlooking? Any help is greatly
> appreciated.
>
> Thanks,
> Taiyo
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>


-- 
Taiyo J. Wilson
Research Engineer
Illinois Rocstar LLC
108 Hessel Blvd.
Champaign, IL 61820
twilson at illinoisrocstar.com
www.illinoisrocstar.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180105/a6354433/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk_out_hex_mod.f
Type: text/x-fortran
Size: 8012 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180105/a6354433/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eddy_uv_mod.vtk
Type: application/octet-stream
Size: 208429 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180105/a6354433/attachment-0001.obj>


More information about the Nek5000-users mailing list