Dataset resampling in Paraview
In our category Tips & Tricks for CFD, I propose here to detail a useful Paraview filter, allowing to sample data from one dataset to another one. Let’s have a look at this! 🙂
ParaView is a powerful open source software developed by Kitware, fulfilling all post-processing step requirements. It proposes many functionalities to easily manipulate and visualize data, making it a very good software for CFD post-processing. The software also allows you to use python scripts for user driven automation. In addition, it is possible to generate high quality renderings, an important feature in visualization nowadays.
Among the possibilities, the user can apply a wide range of filters to manipulate his data. I’d like to take a closer look at one of them, which I find quite useful : the ResampleWithDataset filter.
The ResampleWithDataset is a filter available since the Paraview 5.2 version. It allows to sample point and cell data of one dataset onto points of another one. This filter takes two inputs: a source and a destination mesh, which can be any DataSet or Composite DataSet type. The filter samples the point and cell data of the source on the points of the destination mesh. The output DataSet has the same structure as the destination mesh, and its point data contains the resampled values from the source.
Let’s take a simple example :
- A 3D field in a cubic domain as source, showed in Figure 1.
- A cylindrical surface as destination mesh, showed in Figure 2.
We would like to project the 3D field on the cylindrical surface. Selecting the ResampleWithDataset filter, it’s then mandatory to :
- Select the source data arrays (cf. Figure 3).
- Select the destination mesh (cf. Figure 4).
Once this is done, we can see the obtained result in Figure 5 : the cylindrical surface has now a new data array, corresponding to the 3D field interpolation on this surface.
There are many situations where this can be useful, for example by comparing several simulations. I hope you’ve discovered something with this little post!
Thank you for reading this article, and for visiting our website! 🙂