vtm to vtr conversion

I have to compare two sets of output files. One is from OpenFOAM, and the other is from my own CFD solver. OpenFOAM generated files in .vtm format when I used “foamToVTK”. These are VTK multi-block files. Even though I am simulating a 2D problem, the output is 3D, which is the standard procedure in OpenFOAM. On the other hand, my CFD solver generates output in .vtr format.

I need to subtract the field variables (velocity and pressure fields) from both these output files somehow so that I can extract the difference/error between these two. If the mesh is exactly the same, we can use “appendAttributes”, but this is not working here.

If somebody can guide me in this direction, it would greatly help.

You may want to use ResampleWithDataSet to resample the openfoam data into your dataset.

You can then use Calculator on the results to compute the difference or anything else.

1 Like

Thank you for the quick suggestion. I will try this.

I tried and this is exactly what I needed. Thanks a lot!