Data Translator for measured PIV data

Particle Image Velocimetry (PIV) is one way of experimentally measuring the velocity of a fluid. EnSight is highly suited for analysis of PIV results but there must be some way to load the data. One PIV data format is DaVis .vec or .ve7 which is an ascii file that is basically a comma-separated (.csv) file with one header line. The original data is a collection of points with defined XY position and velocity in X and Y directions. Using python I translated the .vec file to EnSight case gold format. I created a 2D part with a mesh instead of just a collection of data points so that more analysis could be performed.

Download the script. Updated 2012-08-21

Online documentation for this script.

The following images are from relative velocity measured for a rotating pump. Since the data is on a mesh, most CFD post processing techniques can be used.

(Above) Streamlines calculated with and colored by velocity.

(Above) Colored by vorticity, which was calculated in EnSight from the measured velocity.

Many other visualization techniques could also be used such as isosurfaces and elevated surfaces. Other uses might be to compare measured data vs. CFD side by side, or by directly calculating the difference. If using CFD data be careful to compare equivalent data. For example, the measured data has no information about the z component of the velocity. So if your simulation is 3D you must create a 2D velocity vector for comparison to experiment.

This translator is still fairly rough and the documentation is limited, so please contact me if you want to use it. Running the script will open a window to select a .vec file.

Update 4/2012: The script has been modified to work with DaVis 7 format. Also fixed one bug. My test data set is still very small, so if you experience a problem with the translator please send the data to me.

Update 8/2012: The script now has an option to create a transient case from multiple PIV files. It also now treats the data points as element centers instead of nodes of the mesh. Has better GUI for making selections, and reports on the success or failure of the translation.

Leave a Reply