Dataset resampling in Paraview

Hi everybody!
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! 🙂

About Paraview

ParaView is a powerful open source software developed by Kitware[1], 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.

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.
Source dataset : 3d field
Figure 1 : Source dataset
Destination dataset : cylindrical surface
Figure 2 : Destination mesh

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).
Source selection
Figure 3 : Source selection
Destination selection
Figure 4 : Destination selection

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!

Resampling result
Figure 5 : Resampling result

Thank you for reading this article, and for visiting our website! 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *