CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   paraview ignores SPACING in STRUCTURED_POINTS vtk data? (http://www.cfd-online.com/Forums/paraview/109814-paraview-ignores-spacing-structured_points-vtk-data.html)

jaffar November 27, 2012 10:36

paraview ignores SPACING in STRUCTURED_POINTS vtk data?
 
2 Attachment(s)
Hello everyone,

I got this unexpected problem with 1d plots in paraview (ver. 3.14.1, 64bit under debian) which just drives me nuts and I hoped someone would be able to help me with it. To my surprise Paraview is capable of so many highly sophisticated stuff and yet most of the time when I encounter difficulties it is with the most basic functionality. Well maybe I just didnt do enough RTFM, I dont know. ;)

So here is what I do:
I am running simulations in 1 and 2 dimensions, the output of which are files in vtk legacy(?) format using STRUCTURED_POINTS datasets to visualize the time evolution of an order parameter field (so i output a file every once in a while, give it a name indicating the timestep and then, using paraview can view the time evolution, which works just nice).

The discretization (distance between gridpoints) that I use does not change during the runtime of one simulation, however I need to be able to visually compare results from simulations carried out with different discretization. To this end, I need Paraview to take into account the spacing between datapoints to plot the data against real space coordinates rather than grid coordinates.

Luckily, the STRUCTURED_POINTS dataset format allows to specify a SPACING which I set to the discretization that I used for simulation. Now, in 2d plots that just works flawlessly but in 1d plots, paraview just seems to ignore it and uses a spacing of 1 instead.

So here is the vtk file header of my data I use.
# vtk DataFile Version 2.0

ASCII

DATASET STRUCTURED_POINTS
DIMENSIONS 44 1 1
ORIGIN 0 0 0
SPACING 0.500000 1 1

POINT_DATA 44
SCALARS segment_density double 1
LOOKUP_TABLE default
+0.000000
+0.000000
+0.031564
-0.013016
+0.025856
.....

The output I would expect is an x-range of 0..22 where each datapoint is 0.5 points apart, however what I get is a range of 0..44 with a spacing of 1.0 points... :confused: (see the attached file rescale_ignored.jpg)

Interestingly, if i just "made it" a 2d plot by hand, setting
DIMENSIONS 44 2 1
POINT_DATA 88
and then doubling the point data by copy and pasting, it will show me a 2d plot with the approprate rescaling. (see the attached file rescale_just_fine.jpg)
Actually if I then used the plot over line feature of Paraview it would be a workaround to my problem but this just should not be the solution to this, right?

Any attempt to help will be appreciated, I googled a lot but 1d does not seem to concern too many users of paraview. :(
If I should provide additional information on the problem, please let me know.

Thanks,

Stefan


All times are GMT -4. The time now is 02:08.