# How to concatenate a .vtr file with itself to create a new object?

**URL:** https://discourse.paraview.org/t/how-to-concatenate-a-vtr-file-with-itself-to-create-a-new-object/14327
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [April 3, 2024, 10:19pm UTC](https://discourse.paraview.org/t/how-to-concatenate-a-vtr-file-with-itself-to-create-a-new-object/14327 "2024-04-03T22:19:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rohan](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/f19dbf/32.png) [@Rohan](https://discourse.paraview.org/u/Rohan)
#### Post date: [April 3, 2024, 10:19pm UTC](https://discourse.paraview.org/t/how-to-concatenate-a-vtr-file-with-itself-to-create-a-new-object/14327/1 "2024-04-03T22:19:34Z")

</div>

I have a simulation result, saved as a .vtr file. The simulation result is 2D and periodic along the x-axis.  
I would like to concatenate the `.vtr` file with itself along the x-periodic direction, and get another combined `.vtr` file (or any other VTK object) on which I can run the `StreamTracer` filter so as to visualize velocity (a point array) over 2 axial periods.

I have tried the following with `pvpython` but this does not lead to a contiguous dataset which can integrate streamlines over 2 periods.

```auto
my_data = XMLRectilinearGridReader(FileName="./path/to/file.vtr")
trans_data = Transform(Input=my_data)
trans_data.Transform.Translate = [xShift, 0.0, 0.0]
merged_data = AppendDatasets(Input=[my_data, trans_data])

```

The `StreamTracer` only integrates over one of the appended blocks at a time. Here the `xShift=32`, and the file has 32 points along x with coordinates `np.arange(0.5, 32.5)`.

I have not been able to figure out the answer to this by searching online, and apologies if this is a is a re-post.
