Carmeliet

Cavity Flow PIV Dataset

Download

Link: http://mururoa.ethz.ch:5000/fbsharing/7mesML1u

CaseFilenameFrequencyFile Size
ThinBLCavity2D_ThinBL_AVG10Hz.h510 Hz1.95 GB
ThinBLCavity2D_ThinBL_TR600Hz.h5600 Hz1.95 GB
5mCavity2D_Spire05m_AVG10Hz.h510 Hz1.95 GB
5mCavity2D_Spire05m_TR600Hz.h5600 Hz1.95 GB
15wCavity2D_Spire05m_AVG10Hz.h510 Hz1.95 GB
15wCavity2D_Spire05m_TR600Hz.h5600 Hz1.95 GB

Data Evaluation

The HDF5 data format can be read by almost any data analysis tool, sch as MATLAB (http://ch.mathworks.com/help/matlab/ref/hdf5read.html)
We prefer Python and developed the pyFlowStat module. It can be used to easily read and plot the PIV data. However, a sample MATLAB code is provided below.

The module is found here: https://github.com/ETH-BuildingPhysics/pyFlowStat

Make sure to install the Python HDF5 library: http://www.h5py.org/

If you don't have a python distribution installed already, the Anaconda distribution is a good place to start: http://continuum.io/downloads
It includes the editor Spyder, a programm similar to the MATLAB use interface.

Sample python code:


from pyFlowStat import SurfaceFunctions
from pyFlowStat import SurfacePlotter

import matplotlib.pyplot as plt

import h5py

hdf5filename=r'Cavity2D_Spire05m_TR600Hz.h5'
h5file=h5py.File(hdf5filename)

#To load all frames, uncomment these two lines
#slist=SurfaceFunctions.loadSurfaceList_hdf5(hdf5filename,keyrange='full',createDict=False)
#s0=slits[0]

#To load one frame
s0=SurfaceFunctions.loadSurface_hdf5(h5file,0,keyrange='full')

h5file.close()

fig=plt.figure()
ax=plt.subplot(1,1,1)
im=SurfacePlotter.PlotField(ax,s0,'Uy',vmin=-1.0,vmax=1.0,cmap='RdYlBu')
cb=plt.colorbar(im)
cb.set_label('Uy [m/s]')
ax.set_xlabel('x [mm]')
ax.set_ylabel('y [mm]')
plt.show()


Sample minimal MATLAB code. Note: MATLABs pcolor plots the center of the piv pixel and interpolates the color inbetween):


hdf5filename=r'Cavity2D_Spire05m_TR600Hz.h5'

data=h5read(hdf5filename,'/Surface0/vy')
dim=h5read(hdf5filename,'/Surface0/dim')
minX=dim(1)
minY=dim(2)
maxX=dim(3)
maxY=dim(4)
dx=h5read(hdf5filename,'/Surface0/dx')

ysteps=round((maxY-minY)/dx)+1
xsteps=round((maxX-minX)/dx)+1
yrange=linspace(minY,maxY,ysteps)
yrange=fliplr(yrange)
xrange = linspace(minX,maxX,xsteps)

[X,Y]=meshgrid(xrange, yrange)

pcolor(X,Y,data')

colormap('jet')
shading flat
axis equal tight

Bitte wechseln Sie Ihren Browser
Seite zuletzt geändert am 20.08.2015 14:48 Uhr