Table of Contents



1 PIV data post processing



  • input: data from piv experiments
  • output: x velocity in tranverse direction


1.1 input data:


PIV data post processing_post-processing




1.2 output:


PIV data post processing_post-processing_02




1.3 code analysis


PIV data post processing_post-processing_03




1.4 code-Matlab

%goal: read multiple .dat files and fill into a matrix
% x y coordinate: 57 x 27

clear;clc;
m=zeros(1539,5)% 120*4 matrix
filename = sprintf('PIVlab_T11_007.dat');
fid=fopen(filename,'rt');
c=textscan(fid,'%f','HeaderLines',6,'delimiter',' '); % ignore the first 15 rows, and 'space' as delimiter
c=cell2mat(c); % cell array into a single matrix.
fclose(fid);
m=reshape(c,5,1539); %
m1=m';
csvwrite('piv_01.csv',m1);
save -ascii piv1.txt m1;
csvwrite('piv1.dat',m1);
x=m1(1:57,1); % fixed y, 1st value y=0.002103261
u=m1(1:57,3);
%%%%%%%% figure 1 - fixed y, x vs U
figure (1)
plot(x,u);
xlabel('X','fontsize',10,'fontname','Times New Roman');
ylabel('U','fontsize',10,'fontname','Times New Roman');
saveas (gcf , 'x_vel_fixed_y_ave','png ');
%axis ([20 ,200 , - inf , inf ])
%%%%%%% figure 2 - fixed y, x vs U
x1=m1(742:798,1); % middle y
u1=m1(742:798,3);
figure (2)
plot(x1,u1);
xlabel('X','fontsize',10,'fontname','Times New Roman');
ylabel('U','fontsize',10,'fontname','Times New Roman');
saveas (gcf , 'x_vel_y_13_ave','png ');

%%%%%%%% figure 3 - fixed x, variable y; y vs U
y=m1(1:57:end,2); %
u3=m1(1:57:end,3);
figure (3)
plot(u3,y);
xlabel('U','fontsize',10,'fontname','Times New Roman');
ylabel('Y','fontsize',10,'fontname','Times New Roman');
saveas (gcf , 'u_y_x_0_002_ave','png');
%%%%%%%% figure 4 - fixed x, variable y; y vs U
y36=m1(36:57:end,2); %
u36=m1(36:57:end,3);
figure (4)
plot(u36,y36);
xlabel('U','fontsize',10,'fontname','Times New Roman');
ylabel('Y','fontsize',10,'fontname','Times New Roman');
saveas (gcf , 'u_y_x_36_ave','png');
%%%%%%%% figure 5 - fixed x, variable y; y vs U
y2=m1(56:57:end,2); %
u4=m1(56:57:end,3);
figure (5)
plot(u4,y2);
xlabel('U','fontsize',10,'fontname','Times New Roman');
ylabel('Y','fontsize',10,'fontname','Times New Roman');
saveas (gcf , 'u_y_x_56_ave','png');


Created: 2021-12-09 周四 10:32

​Validate​