# Merging simulation data from vtk and vtu files

**URL:** https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474
**Category:** ParaView Support
**Created:** [February 16, 2021, 5:48pm UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474 "2021-02-16T17:48:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![peterl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/41988e/32.png) [@peterl](https://discourse.paraview.org/u/peterl)
#### Post date: [February 16, 2021, 5:48pm UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/1 "2021-02-16T17:48:00Z")

</div>

I would like to merge two simulation data sets, one based on a structured and one on an unstructured mesh together and validate my model against another one by computing absolute value differences of certain quantities.

I saw that some people ran into the same issues after grouping, getting an appendix (Partial) to all their scalar fields and not being able to compute a new scalar field computed from both, quantities of dataset 1 and 2. They were advised to try the AppendAttributes filter.

I did all that. Still, after applying the AppendAttributes filter, the quantities are still (partial). And I can plot quantities of either dataset 1 or 2, but as soon as I use the calculator to computer something like abs(q1-q2) I always get “Syntax error: Operator expected;” and the calculator result gets appended by (?).

If I understand it correctly, I do not have to interpolate both datasets onto a single mesh as this is done implicitly. Am I wrong about that? Or is it maybe not possible to combine data from structured/unstructured meshes?

Thanks a lot for your help!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 16, 2021, 5:53pm UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/2 "2021-02-16T17:53:49Z")

</div>

AppendAttributes would only make sense if both your inputs have the same number of cells and points.

If that is not the case, you want to use ResampleWithDataset.

---

<div class="post-metadata">

### Author: ![peterl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/41988e/32.png) [@peterl](https://discourse.paraview.org/u/peterl)
#### Post date: [February 17, 2021, 10:50am UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/3 "2021-02-17T10:50:56Z")

</div>

Thank you for that information.

When I apply the filter ResampleWithDatasets, I am asked to specify either a source or an input - but only one, I cannot select both sources/inputs. I tried applying the filter on the already grouped together datasets and also tried to apply it on dataset 1 and specify dataset 2 as a source/input in the filter. But both approaches don’t work. I get an error ‘Algorithm vtkPResampleWithDataSet(0x14feb7ba0) returned failure for request’.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 17, 2021, 10:58am UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/4 "2021-02-17T10:58:22Z")

</div>

Steps:

- Click on the dataset containing data arrays you want to resample
- Add a ResampleWithDataSet filter
- In the input window, click on the “Destination Mesh” radio box
- In the input window, click on the dataset you want to use the geometry as output
- Click on OK
- Check PassPointData and PassCellData arrays,
- Apply

---

<div class="post-metadata">

### Author: ![peterl](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/41988e/32.png) [@peterl](https://discourse.paraview.org/u/peterl)
#### Post date: [February 17, 2021, 1:57pm UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/5 "2021-02-17T13:57:27Z")

</div>

Thank you so much for your reply!

I just realized, on our cluster an older Paraview 5.6 version is installed, why I couldn’t find the “Destination Mesh” radio box nor the PassPointData and PassCellData options. Repeating your steps with “Source” instead of “Destination Mesh” in Paraview 5.6 still results in an error once I use the calculator after sampling and subsequent grouping: “Syntax error: expecting a variable name.”

So I will try this again with Paraview 5.8. Thanks again.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 17, 2021, 2:01pm UTC](https://discourse.paraview.org/t/merging-simulation-data-from-vtk-and-vtu-files/6474/6 "2021-02-17T14:01:18Z")

</div>

Indeed, the naming were changed a few months ago to avoid confusion. Let me know.
