10

I'm trying to use XTK to display 3D CFD data on my webpage. I can generate ASCII VTK files containing my data (mesh points, velocity, pressure) following the format guide here and I can visualize it it Visit.

When I try loading into XTK however, (by changing the file name in their skull tutorial) I get the error :

TypeError : f is null

in xtk.js, and nothing displays.

Has anyone had similar problems?

Here is a sample VTK file of mine.

P.S. I know that Paraview has trouble reading the FieldData, so I tried removing that for XTK but with no luck.

Lukas Bystricky
  • 1,222
  • 6
  • 16
  • 34

1 Answers1

0

I tried loading it into ParaView and got an error that the data was expecting the DIMENSION rather than the FIELDDATA.. so I just deleted the FIELD and TIME lines and also nudged everything up a line...

# vtk DataFile Version 3.0
Fast Fluid Dynamics data

ASCII
DATASET RECTILINEAR_GRID
FIELD FieldData 1
TIME 1 1 double
0.07
DIMENSIONS 6 6 6

So the header instead of this

# vtk DataFile Version 3.0
Fast Fluid Dynamics data
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 6 6 6

It loads into ParaView OK (v 5.0) so I guess should be OK for XTK? Data is here - http://pastebin.com/xrYyHv6F I can't get it render with XTK using the Skull example at goxtk.com - but it is a valid VTK file now - I would suggest having a look at how to load a rectilinear grid or have a go in ParaView.

Hope that helps.

g.stevo
  • 745
  • 3
  • 10