L04 Code Boundary Layer Plate
L04 Code Boundary Layer Plate
DATE: 02/21/2025
The loop below imports data from each sheet of excel data and make
stations
for i=1:1:3
data = xlsread('L04_Data Sheet_Boundary Layer Plate.xlsx',i);
% Average stagnation pressure of each taps in pascal
ave_stag(i,1:10) =
-248.84.*(data(1:10,2)+data(1:10,3)+data(1:10,4)+data(1:10,5))./4;
% Average static pressure of flow in pascal
ave_static_flow(1,i) = -248.84.*(data(12,2)+data(12,3)+data(12,4)+data(12,5))/4;
% Average stagnation pressure of flow in pascal
ave_stag_flow(1,i) = -248.84.*(data(13,2)+data(13,3)+data(13,4)+data(13,5))/4;
% Dynamic pressure at each pressure taps
dy_pressure(i,1:10) = ave_stag(i,1:10)-ave_static_flow(1,i);
% Velocity at each pressure taps
vel_tap(i,1:10) = sqrt(2.*dy_pressure(i,1:10)./density);
% Dyanamic pressure of flow
dy_pressure_flow(1,i) = ave_stag_flow(1,i)-ave_static_flow(1,i);
% Velocity of flow
vel_flow(1,i) = sqrt(2.*dy_pressure_flow(1,i)./density);
% Reynolds Number at each station
reynolds(1,i) = density*vel_flow(1,i)*x(i)/mu;
disp(reynolds(1,i))
% Boundary layer thickness δ at each station
if reynolds(1,i)<2000;
delta(1,i)=5.*x(1,i)/sqrt(reynolds(1,i));
1
else;
delta(1,i)=0.37.*x(1,i)/(reynolds(1,i)^(1/5));
end
disp(delta(1,i))
end
8.1938e+06
0.0920
1.4741e+07
0.1499
2.1234e+07
0.2027
2
% Middle Station
figure; hold on
plot(vel_tap(2,1:10),tap_height);
plot(analy_vel_middle,height_analy_middle);
yline(delta(1,2), 'g--')
xline(u,'--')
title('Velocity vs. Height, Middle');
xlabel('Velocity(m/s)');
ylabel('Height(cm)');
legend('Experimental','Analytical','Boundary Layer Thickness','Theoretical
Velocity');
hold off;
3
% Rear Station
figure; hold on
plot(vel_tap(3,1:10),tap_height);
plot(analy_vel_rear,height_analy_rear);
yline(delta(1,3), 'g--')
xline(u,'--')
title('Velocity vs. Height, Rear');
xlabel('Velocity(m/s)');
ylabel('Height(cm)');
legend('Experimental','Analytical','Boundary Layer Thickness','Theoretical
Velocity');
hold off;
4
% All together
figure; hold on
plot(vel_tap(1,1:10),tap_height,'DisplayName','Front');hold on
plot(vel_tap(2,1:10),tap_height,'DisplayName','Middle');hold on
plot(vel_tap(3,1:10),tap_height,'DisplayName','Rear');hold on
%plot(analy_vel_rear,height_analy_rear);
title('Velocity vs. Height');
xlabel('Velocity(m/s)');
ylabel('Height(cm)');
legend('Location','Best');
hold off;
grid on
5
6