Image size changes with the number of grid points

I load time series of .vtk files to visualize the results of my simulation. The number of grids of the domain changes with each successive meshing (coarse grid at the beginning and progressively finer grid at the end) during the simulation while keeping the field of view unchanged. When the data is visualized I noticed that the size of the field of view changes with the number of gridpoints resulting in a constantly changing field of view. I want to keep the field of view constant. Does anyone have any solution?

It sounds like your .vtk files are not setting the SPACING parameter correctly. The SPACING parameter says how much space is in between each grid point. Whatever is writing out your .vtk files should adjust the SPACING to be smaller as the grid gets finer.

All .vtk files have some human readable text at the start. You can open your .vtk file in a text editor to see what SPACING is set to in each file.

Thanks for your reply. I will check this in my files and will include it if the SPACING parameter is not written. I will let you know the result later.

I checked my program that uses to write the .vtk files. DATASET variable is set to RECTILINEAR_GRID. In my search in the vtk documentation, I figured that SPACING is not given as a variable for the RECTILINEAR_GRID. Can we still put that variable in the header?

Because you did not actually post any data, I made an assumption about your data (that it was a uniform regular grid) that was wrong (it is apparently actually a non-uniform rectilinear grid).

If you look at the documentation for the VTK legacy file format, you will see that the spacing of the grid is actually controlled by 3 arrays that you specify: X_COORDINATES, Y_COORDINATES, and Z_COORDINATES. Whatever is creating your vtk files must to be creating coordinate arrays that are consistent from one time step to the next.

Hi Kenneth,
Following are two screenshots at the change of the number of grid points in the domain. You may see that only the Extents are changed (x Extent from 0-480 to 0-960 and Z Extent from 0-160 to 0-320) but the Bounds remains the same in both screenshots. Is this an automatic scaling applied by Paraview? How do I avoid this? Any clue is very appreciated.


Best,
Suranga.

I’m not sure what is going on here. Can you post the data for time steps 63 and 64 so we can take a closer look?

file 63
File Edit Options Buffers Tools Help
vtk DataFile Version 2.0
written by planes2vtk nt= 7851 time=3.150119E+01
BINARY
DATASET RECTILINEAR_GRID
DIMENSIONS 481 1 161
X_COORDINATES 481 float
\277\300^@^@\277\27733\277\276ff\277\275\231\232\277\274\314\315\277\274^@^@\277\27333\277\272ff\277\271
\231\232\277\270\314\315\277\270^@^@\277\26733\277\266ff\277\265\231\232\277\264\314\315\277\264^@^@\277
\26333\277\262ff\277\261\231\232\277\260\314\315\277\260^@^@\277\25733\277\256ff\277\255\231\232\277\254
\314\315\277\254^@^@\277\25333\277\252ff\277\251\231\232\277\250\314\315\277\250^@^@\277\24733\277\246ff
\277\245\231\232\277\244\314\315\277\244^@^@\277\24333\277\242ff\277\241\231\232\277\240\314\315\277\240
^@^@\277\23733\277\236ff\277\235\231\232\277\234\314\315\277\234^@^@\277\23333\277\232ff\277\231\231\232
\277\230\314\315\277\230^@^@\277\22733\277\226ff\277\225\231\232\277\224\314\315\277\224^@^@\277\22333\2
77\222ff\277\221\231\232\277\220\314\315\277\220^@^@\277\21733\277\216ff\277\215\231\232\277\214\314\315
\277\214^@^@\277\21333\277\212ff\277\211\231\232\277\210\314\315\277\210^@^@\277\20733\277\206ff\277\205
\231\232\277\204\314\315\277\204^@^@\277\20333\277\202ff\277\201\231\232\277\200\314\315\277\200^@^@\277
~ff\277|\314\315\277{33\277y\231\232\277x^@^@\277vff\277t\314\315\277s33\277q\231\232\277p^@^@\277nff\27
7l\314\315\277k33\277i\231\232\277h^@^@\277fff\277d\314\315\277c33\277a\231\232\277^@^@\277^ff\277\\314\ \315\277[33\277Y\231\232\277X^@^@\277Vff\277T\314\315\277S33\277Q\231\232\277P^@^@\277Nff\277L\314\315\2\ 77K33\277I\231\232\277H^@^@\277Fff\277D\314\315\277C33\277A\231\232\277@^@^@\277>ff\277<\314\315\277;33\\ 2779\231\232\2778^@^@\2776ff\2774\314\315\277333\2771\231\232\2770^@^@\277.ff\277,\314\315\277+33\277)\2\ 31\232\277(^@^@\277&ff\277$\314\315\277#33\277!\231\232\277 ^@^@\277^^ff\277^\\314\315\277^[33\277^Y\231\ \232\277^X^@^@\277^Vff\277^T\314\315\277^S33\277^Q\231\232\277^P^@^@\277^Nff\277^L\314\315\277^K33\277 \ \231\232\277^H^@^@\277^Fff\277^D\314\315\277^C33\277^A\231\232\277^@^@^@\276\374\314\315\276\371\231\232\ \276\366ff\276\36333\276\360^@^@\276\354\314\315\276\351\231\232\276\346ff\276\34333\276\340^@^@\276\334\ \314\315\276\331\231\232\276\326ff\276\32333\276\320^@^@\276\314\314\315\276\311\231\232\276\306ff\276\3\ 0333\276\300^@^@\276\274\314\315\276\271\231\232\276\266ff\276\26333\276\260^@^@\276\254\314\315\276\251\ \231\232\276\246ff\276\24333\276\240^@^@\276\234\314\315\276\231\231\232\276\226ff\276\22333\276\220^@^@\ \276\214\314\315\276\211\231\232\276\206ff\276\20333\276\200^@^@\276y\231\232\276s33\276l\314\315\276fff\ \276^@^@\276Y\231\232\276S33\276L\314\315\276Fff\276@^@^@\2769\231\232\276333\276,\314\315\276&ff\276 ^
@^@\276^Y\231\232\276^S33\276^L\314\315\276^Fff\276^@^@^@\275\36333\275\346ff\275\331\231\232\275\314\31
4\315\275\300^@^@\275\26333\275\246ff\275\231\231\232\275\214\314\315\275\200^@^@\275fff\275L\314\315\27
5333\275^Y\231\232\275^@^@^@\274\314\314\315\274\231\231\232\274L\314\315\273\314\314\315^@^@^@^@;\314\3
14\315<L\314\315<\231\231\232<\314\314\315=^@^@^@=^Y\231\232=333=L\314\315=fff=\200^@^@=\214\314\315=\23
1\231\232=\246ff=\26333=\300^@^@=\314\314\315=\331\231\232=\346ff=\36333>^@^@^@>^Fff>^L\314\315>^S33>^Y\
231\232> ^@^@>&ff>,\314\315>333>9\231\232>@^@^@>Fff>L\314\315>S33>Y\231\232>^@^@>fff>l\314\315>s33>y\23\ 1\232>\200^@^@>\20333>\206ff>\211\231\232>\214\314\315>\220^@^@>\22333>\226ff>\231\231\232>\234\314\315>\ \240^@^@>\24333>\246ff>\251\231\232>\254\314\315>\260^@^@>\26333>\266ff>\271\231\232>\274\314\315>\300^@\ ^@>\30333>\306ff>\311\231\232>\314\314\315>\320^@^@>\32333>\326ff>\331\231\232>\334\314\315>\340^@^@>\34\ 333>\346ff>\351\231\232>\354\314\315>\360^@^@>\36333>\366ff>\371\231\232>\374\314\315?^@^@^@?^A\231\232?\ ^C33?^D\314\315?^Fff?^H^@^@? \231\232?^K33?^L\314\315?^Nff?^P^@^@?^Q\231\232?^S33?^T\314\315?^Vff?^X^\ @^@?^Y\231\232?^[33?^\\314\315?^^ff? ^@^@?!\231\232?#33?$\314\315?&ff?(^@^@?)\231\232?+33?,\314\315?.ff?\ 0^@^@?1\231\232?333?4\314\315?6ff?8^@^@?9\231\232?;33?<\314\315?>ff?@^@^@?A\231\232?C33?D\314\315?Fff?H^\ @^@?I\231\232?K33?L\314\315?Nff?P^@^@?Q\231\232?S33?T\314\315?Vff?X^@^@?Y\231\232?[33?\\314\315?^ff?^@^
@?a\231\232?c33?d\314\315?fff?h^@^@?i\231\232?k33?l\314\315?nff?p^@^@?q\231\232?s33?t\314\315?vff?x^@^@?
y\231\232?{33?|\314\315?~ff?\200^@^@?\200\314\315?\201\231\232?\202ff?\20333?\204^@^@?\204\314\315?\205\
231\232?\206ff?\20733?\210^@^@?\210\314\315?\211\231\232?\212ff?\21333?\214^@^@?\214\314\31
Y_COORDINATES 1 float
^@^@^@^@
Z_COORDINATES 161 float
^@^@^@^@;\314\314\315<L\314\315<\231\231\232<\314\314\315=^@^@^@=^Y\231\232=333=L\314\315=fff=\200^@^@=\
214\314\315=\231\231\232=\246ff=\26333=\300^@^@=\314\314\315=\331\231\232=\346ff=\36333>^@^@^@>^Fff>^L\3
14\315>^S33>^Y\231\232> ^@^@>&ff>,\314\315>333>9\231\232>@^@^@>Fff>L\314\315>S33>Y\231\232>^@^@>fff>l\3\ 14\315>s33>y\231\232>\200^@^@>\20333>\206ff>\211\231\232>\214\314\315>\220^@^@>\22333>\226ff>\231\231\23\ 2>\234\314\315>\240^@^@>\24333>\246ff>\251\231\232>\254\314\315>\260^@^@>\26333>\266ff>\271\231\232>\274\ \314\315>\300^@^@>\30333>\306ff>\311\231\232>\314\314\315>\320^@^@>\32333>\326ff>\331\231\232>\334\314\3\ 15>\340^@^@>\34333>\346ff>\351\231\232>\354\314\315>\360^@^@>\36333>\366ff>\371\231\232>\374\314\315?^@^\ @^@?^A\231\232?^C33?^D\314\315?^Fff?^H^@^@? \231\232?^K33?^L\314\315?^Nff?^P^@^@?^Q\231\232?^S33?^T\\ 314\315?^Vff?^X^@^@?^Y\231\232?^[33?^\\314\315?^^ff? ^@^@?!\231\232?#33?$\314\315?&ff?(^@^@?)\231\232?+3\ 3?,\314\315?.ff?0^@^@?1\231\232?333?4\314\315?6ff?8^@^@?9\231\232?;33?<\314\315?>ff?@^@^@?A\231\232?C33?\ D\314\315?Fff?H^@^@?I\231\232?K33?L\314\315?Nff?P^@^@?Q\231\232?S33?T\314\315?Vff?X^@^@?Y\231\232?[33?\\\ 314\315?^ff?^@^@?a\231\232?c33?d\314\315?fff?h^@^@?i\231\232?k33?l\314\315?nff?p^@^@?q\231\232?s33?t\31
4\315?vff?x^@^@?y\231\232?{33?|\314\315?~ff?\200^@^@
POINT_DATA 77441
Scalars u’ float
LOOKUP_TABLE default
=8\234+=^H\352!<\262c\336<%\342\245\272\307\226\256\274W\245*\274\313^P\242\275^U^U(\275D\213X\275s\346\

file 64

vtk DataFile Version 2.0
written by planes2vtk nt= 8025 time=3.195118E+01
BINARY
DATASET RECTILINEAR_GRID
DIMENSIONS 961 1 321
X_COORDINATES 961 float
\277\300^@^@\277\277\231\232\277\27733\277\276\314\315\277\276ff\277\276^@^@\277\275\231\232\277\27533\2
77\274\314\315\277\274ff\277\274^@^@\277\273\231\232\277\27333\277\272\314\315\277\272ff\277\272^@^@\277
\271\231\232\277\27133\277\270\314\315\277\270ff\277\270^@^@\277\267\231\232\277\26733\277\266\314\315\2
77\266ff\277\266^@^@\277\265\231\232\277\26533\277\264\314\315\277\264ff\277\264^@^@\277\263\231\232\277
\26333\277\262\314\315\277\262ff\277\262^@^@\277\261\231\232\277\26133\277\260\314\315\277\260ff\277\260
^@^@\277\257\231\232\277\25733\277\256\314\315\277\256ff\277\256^@^@\277\255\231\232\277\25533\277\254\3
14\315\277\254ff\277\254^@^@\277\253\231\232\277\25333\277\252\314\315\277\252ff\277\252^@^@\277\251\231
\232\277\25133\277\250\314\315\277\250ff\277\250^@^@\277\247\231\232\277\24733\277\246\314\315\277\246ff
\277\246^@^@\277\245\231\232\277\24533\277\244\314\315\277\244ff\277\244^@^@\277\243\231\232\277\24333\2
77\242\314\315\277\242ff\277\242^@^@\277\241\231\232\277\24133\277\240\314\315\277\240ff\277\240^@^@\277
\237\231\232\277\23733\277\236\314\315\277\236ff\277\236^@^@\277\235\231\232\277\23533\277\234\314\315\2
77\234ff\277\234^@^@\277\233\231\232\277\23333\277\232\314\315\277\232ff\277\232^@^@\277\231\231\232\277
\23133\277\230\314\315\277\230ff\277\230^@^@\277\227\231\232\277\22733\277\226\314\315\277\226ff\277\226
^@^@\277\225\231\232\277\22533\277\224\314\315\277\224ff\277\224^@^@\277\223\231\232\277\22333\277\222\3
14\315\277\222ff\277\222^@^@\277\221\231\232\277\22133\277\220\314\315\277\220ff\277\220^@^@\277\217\231
\232\277\21733\277\216\314\315\277\216ff\277\216^@^@\277\215\231\232\277\21533\277\214\314\315\277\214ff
\277\214^@^@\277\213\231\232\277\21333\277\212\314\315\277\212ff\277\212^@^@\277\211\231\232\277\21133\2
77\210\314\315\277\210ff\277\210^@^@\277\207\231\232\277\20733\277\206\314\315\277\206ff\277\206^@^@\277
\205\231\232\277\20533\277\204\314\315\277\204ff\277\204^@^@\277\203\231\232\277\20333\277\202\314\315\2
77\202ff\277\202^@^@\277\201\231\232\277\20133\277\200\314\315\277\200ff\277\200^@^@\277^?33\277~ff\277}
\231\232\277|\314\315\277|^@^@\277{33\277zff\277y\231\232\277x\314\315\277x^@^@\277w33\277vff\277u\231\2
32\277t\314\315\277t^@^@\277s33\277rff\277q\231\232\277p\314\315\277p^@^@\277o33\277nff\277m\231\232\277
l\314\315\277l^@^@\277k33\277jff\277i\231\232\277h\314\315\277h^@^@\277g33\277fff\277e\231\232\277d\314\
315\277d^@^@\277c33\277bff\277a\231\232\277\314\315\277^@^@\277_33\277^ff\277]\231\232\277\314\315\27
7^@^@\277[33\277Zff\277Y\231\232\277X\314\315\277X^@^@\277W33\277Vff\277U\231\232\277T\314\315\277T^@^@
\277S33\277Rff\277Q\231\232\277P\314\315\277P^@^@\277O33\277Nff\277M\231\232\277L\314\315\277L^@^@\277K3
3\277Jff\277I\231\232\277H\314\315\277H^@^@\277G33\277Fff\277E\231\232\277D\314\315\277D^@^@\277C33\277B
ff\277A\231\232\277@\314\315\277@^@^@\277?33\277>ff\277=\231\232\277<\314\315\277<^@^@\277;33\277:ff\277
9\231\232\2778\314\315\2778^@^@\277733\2776ff\2775\231\232\2774\314\315\2774^@^@\277333\2772ff\2771\231\
232\2770\314\315\2770^@^@\277/33\277.ff\277-\231\232\277,\314\315\277,^@^@\277+33\277*ff\277)\231\232\27
7(\314\315\277(^@^@\277’33\277&ff\277%\231\232\277$\314\315\277$^@^@\277#33\277"ff\277!\231\232\277 \314
\315\277 ^@^@\277^_33\277^^ff\277^]\231\232\277^\314\315\277^^@^@\277^[33\277^Zff\277^Y\231\232\277^X\
314\315\277^X^@^@\277^W33\277^Vff\277^U\231\232\277^T\314\315\277^T^@^@\277^S33\277^Rff\277^Q\231\232\27
7^P\314\315\277^P^@^@\277^O33\277^Nff\277^M\231\232\277^L\314\315\277^L^@^@\277^K33\277
ff\277 \231\232\277^H\314\315\277^H^@^@\277^G33\277^Fff\277^E\231\232\277^D\314\315\277^D^@^@\277^C33\2
77^Bff\277^A\231\232\277^@\314\315\277^@^@^@\276\376ff\276\374\314\315\276\37333\276\371\231\232\276\370
^@^@\276\366ff\276\364\314\315\276\36333\276\361\231\232\276\360^@^@\276\356ff\276\354\314\315\276\35333
\276\351\231\232\276\350^@^@\276\346ff\276\344\314\315\276\34333\276\341\231\232\276\340^@^@\276\336ff\2
76\334\314\315\276\33333\276\331\231\232\276\330^@^@\276\326ff\276\324\314\315\276\32333\276\321\231\232
\276\320^@^@\276\316ff\276\314\314\315\276\31333\276\311\231\232\276\310^@^@\276\306ff\276\304\314\315\2
Y_COORDINATES 1 float
^@^@^@^@
Z_COORDINATES 321 float
^@^@^@^@;L\314\315;\314\314\315<^Y\231\232<L\314\315<\200^@^@<\231\231\232<\26333<\314\314\315<\346ff=^@
^@^@=^L\314\315=^Y\231\232=&ff=333=@^@^@=L\314\315=Y\231\232=fff=s33=\200^@^@=\206ff=\214\314\315=\22333
=\231\231\232=\240^@^@=\246ff=\254\314\315=\26333=\271\231\232=\300^@^@=\306ff=\314\314\315=\32333=\331\
231\232=\340^@^@=\346ff=\354\314\315=\36333=\371\231\232>^@^@^@>^C33>^Fff> \231\232>^L\314\315>^P^@
^@>^S33>^Vff>^Y\231\232>^\314\315> ^@^@>#33>&ff>)\231\232>,\314\315>0^@^@>333>6ff>9\231\232><\314\315>@
^@^@>C33>Fff>I\231\232>L\314\315>P^@^@>S33>Vff>Y\231\232>\314\315>`^@^@>c33>fff>i\231\232>l\314\315>p^@
^@>s33>vff>y\231\232>|\314\315>\200^@^@>\201\231\232>\20333>\204\314\315>\206ff>\210^@^@>\211\231\232>\2
1333>\214\314\315>\216ff>\220^@^@>\221\231\232>\22333>\224\314\315>\226ff>\230^@^@>\231\231\232>\23333>\
234\314\315>\236ff>\240^@^@>\241\231\232>\24333>\244\314\315>\246ff>\250^@^@>\251\231\232>\25333>\254\31
4\315>\256ff>\260^@^@>\261\231\232>\26333>\264\314\315>\266ff>\270^@^@>\271\231\232>\27333>\274\314\315>
\276ff>\300^@^@>\301\231\232>\30333>\304\314\315>\306ff>\310^@^@>\311\231\232>\31333>\314\314\315>\316ff\

\320^@^@>\321\231\232>\32333>\324\314\315>\326ff>\330^@^@>\331\231\232>\33333>\334\314\315>\336ff>\340^
@^@>\341\231\232>\34333>\344\314\315>\346ff>\350^@^@>\351\231\232>\35333>\354\314\315>\356ff>\360^@^@>\3
61\231\232>\36333>\364\314\315>\366ff>\370^@^@>\371\231\232>\37333>\374\314\315>\376ff?^@^@^@?^@\314\315
?^A\231\232?^Bff?^C33?^D^@^@?^D\314\315?^E\231\232?^Fff?^G33?^H^@^@?^H\314\315? \231\232?
ff?^K33?^L^@^@?^L\314\315?^M\231\232?^Nff?^O33?^P^@^@?^P\314\315?^Q\231\232?^Rff?^S33?^T^@^@?^T\314\315?
^U\231\232?^Vff?^W33?^X^@^@?^X\314\315?^Y\231\232?^Zff?[1]\231\232?^^ff?^_33? ^@^@
? \314\315?!\231\232?"ff?#33?^@^@?\314\315?%\231\232?&ff?‘33?(^@^@?(\314\315?)\231\232?*ff?+33?,^@^@?,
\314\315?-\231\232?.ff?/33?0^@^@?0\314\315?1\231\232?2ff?333?4^@^@?4\314\315?5\231\232?6ff?733?8^@^@?8\3
14\315?9\231\232?:ff?;33?<^@^@?<\314\315?=\231\232?>ff??33?@^@^@?@\314\315?A\231\232?Bff?C33?D^@^@?D\314
1\232?vff?w33?x^@^@?x\314\315?y\231\232?zff?{33?|^@^@?|\314\315?}\231\232?~ff?^?33?\200^@^@
POINT_DATA 308481
Scalars u’ float
LOOKUP_TABLE default


  1. 33?^^@^@?^\314\315?^ ↩︎

I don’t think pasting binary files into a discourse comment is going to work. Can you attached the files by using the upload button at the top of the comment box or using drag and drop?

Here are the files.
xz1_0064.vtk (1.2 MB)
xz1_0063.vtk (305.3 KB)
Thanks,

This is really weird. When you go to the later time step with the larger extent, the Information tab is correctly reporting the changed extent and the data are correctly rescaled in the view, but for some reason it is only loading the smaller extent of the data. That is, at the later time step it should be loading a 961x1x321 array, but it instead is just loading a 481x1x161 array.

This looks like it might be a bug with the VTK pipeline. I think either the pipeline at the reader is not updating the whole extent during the request information phase or the update extent is not being updated at the bottom of the pipeline during the request update extent phase.

@utkarsh.ayachit, do you want to take a look at this?

One of my colleagues suggested me to use a new Paraview session for each change in grid resolution. I did that and was able to see the entire domain. However, this is painful in creating animations. I had to figure out the time steps where the resolution is altered and load them into separate Paraview sessions and create separate videos for each change in resolution. And then join each avi file to compose the entire animation. If we could find a better solution for this that would be great.

One other question is whether I can get the time variable in the header of these file to annotate with the animation. Does anyone has idea about it?

Usually caused by incoherence between extent and actual data.

I think the problem is that the WHOLE_EXTENT of this data is changing over time and ParaView is not changing the UPDATE_EXTENT accordingly. ParaView keeps trying to pull the extent from time step 0 even though that extent is no longer valid.

So, for any given file in the time series, there is no incoherence between the extent and the data. You can load any file in this series on its own just fine. But when you try to animate it, ParaView applies the extent from the first file to all files, and the incoherence appears. I raised a bug report here: https://gitlab.kitware.com/paraview/paraview/-/issues/20863.

While discussing this problem on the bug report, we found a possible workaround for this problem. Try adding the Group Datasets filter. (It is one of the common filters on the third toolbar.) That seems to fix the updating problems.

Yes, I do not think this is supported to have a growing WHOLE_EXTENT in ParaView

Group Datasets filter worked for my case.

Hello, I’m currently facing the same problem. My WHOLE_EXTENT is growing over time but paraview doesn’t update and keep showing the data located in the first WHOLE_EXTENT. I’m using .pvti files with 5 pieces (.vti) that are about 3GB each. And in this case the “Group Datasets” filter doesn’t seem to fix the problem. Have you any idea on what I could try to solve it ?