[yt-users] Loading ASCII VTK data
Lukas Bystricky
lukasbystricky at gmail.com
Thu Jun 2 13:47:45 PDT 2016
Hi John,
Yes, sorry it is vertex centered, I forgot to mention that. The data comes
from a staggered grid however, (the velocities and pressures defined on
separate grids); currently I'm just interpolating everything to the same
grid. In principle I could interpolate everything to a cell centered grid
(which is the native grid for the pressure), but I'd have to think about
how to handle boundary conditions in that case. Does YT handle staggered
grids in a natural way?
Thanks again,
Lukas
On Thu, Jun 2, 2016 at 3:49 PM, John Zuhone <jzuhone at gmail.com> wrote:
> Hi Lukas,
>
> So I was actually able to convert your file to binary VTK and get started
> with it in yt, but I hit a roadblock.
>
> Your data is “vertex-centered” in our parlance, but we don’t as of yet
> support vertex-centered data.
>
> If you can convert to cell-centered data, we can probably support you out
> of the box, but for now vertex-centered data is not yet implemented.
>
> For example, here is what the header for an Athena VTK file looks like:
>
> # vtk DataFile Version 3.0
> PRIMITIVE vars at time= 2.700111e+03, level= 0, domain= 0
> BINARY
> DATASET STRUCTURED_POINTS
> DIMENSIONS 257 257 257
> ORIGIN -2.000000e+00 -2.000000e+00 -2.000000e+00
> SPACING 1.562500e-02 1.562500e-02 1.562500e-02
> CELL_DATA 16777216
> SCALARS density float
> LOOKUP_TABLE default
>
> Let us know…
>
> John
>
> On May 16, 2016, at 10:04 PM, Lukas Bystricky <lukasbystricky at gmail.com>
> wrote:
>
> Hi all,
>
> I'm trying to load in some data from an ASCII VTK file (attached for
> reference) that I created following the guidelines here:
> http://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf. I can
> load this file into Visit and I was hoping that to load it into yt would be
> as simple as :
>
> ds = yt.load("lid_driven_cavity_20.vtk")
>
> When I try that however I get the error message:
>
> Traceback (most recent call last):
> File "visualization.py", line 3, in <module>
> ds = yt.load("lid_driven_cavity_20.vtk")
> File "C:\Users\Dave\Anaconda2\lib\site-packages\yt\convenience.py", line
> 84, in load
> return candidates[0](*args, **kwargs)
> File
> "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py",
> line 470, in __init__
> Dataset.__init__(self, filename, dataset_type,
> units_override=units_override)
> File
> "C:\Users\Dave\Anaconda2\lib\site-packages\yt\data_objects\static_output.py",
> line 190, in __init__
> self._parse_parameter_file()
> File
> "C:\Users\Dave\Anaconda2\lib\site-packages\yt\frontends\athena\data_structures.py",
> line 528, in _parse_parameter_file
> self.domain_left_edge = grid['left_edge']
> KeyError: 'left_edge'
>
> Is it possible to load in such a file to yt? If not, since I'm writing my
> own data file, how could I edit it to make it readable by yt?
>
> Thanks in advance,
>
> Lukas
> <lid_driven_cavity_20.vtk>_______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160602/f7439815/attachment.html>
More information about the yt-users
mailing list