平板边界层流速分布实验

平板边界层实验在热流体实验中大二上册,适用核工能动学生


MATLAB 源程序:

%原文链接 https://blog.csdn.net/dasdkhaksd/article/details/115013265?ops_request_misc=&request_id=&biz_id=102&utm_term=matla%E7%94%BB%E8%BE%B9%E7%95%8C%E5%B1%82%E9%80%9F%E5%BA%A6%E5%88%86%E5%B8%83&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-0-115013265.142^v88^control_2,239^v2^insert_chatgpt&spm=1018.2226.3001.4187
%本例对原文有删减,依照实验数据输入即可,注释部分有示例数据
clear,clc;
lw1=2;lw2=2;
mks=15;

Rg = 287; %气体常数(J/(kg·K))
g = 9.8; %重力加速度(m/s^2)
waterdensity = 997.125; %水的密度(kg/m^3)

atmosphericPressure =input('请输入大气压:(Pa)') ;%95910
temperature =input('请输入室温:(°C)')  ;%24.8
KVC =input('请输入运动粘性系数(查表):(10^-7m^2/s)') ;%156

K = 1;%风洞系数
gearFactor = 0.2;%压力计倾斜因子

staticPressure0 = input('请输入机械法流场静压:(Pa)');%254.1
staticPressure1 = input('请输入电测法流场静压:(Pa)');%248.3

%对已知实验参数的输入
%第一截面实验数据输入
x10 = 150;
y10 = input('请输入第一截面边界层内距离 (记得带方括号,行向量,下同):(mm)');
micromanometerP10 = input('请输入第一截面用微压计测得的读数数据:(mmC2H5OH)');
transmitterP10 = input('请输入第一截面用压差变送器测得的读数数据:(Pa)'); 
% y10 = [0.45 0.95 1.45 1.95 2.45 2.95 3.45 3.95 4.45];
% micromanometerP10 = [83.9 69.1 58.5	49 40.3 31.5 26	20.8 17];
% transmitterP10 = [150.4 123.3 105.6	86 68.2	52.9 40.6 30.5 24.8];

%第二截面实验数据输入
x20 = 250;
y20 = input('请输入第二截面边界层内距离的数据:(mm)');
micromanometerP20 = input('请输入第二截面用微压计测得的读数数据:(mmC2H5OH)');
transmitterP20 = input('请输入第二截面用压差变送器测得的读数数据:(Pa)');
% y20 = [0.45	0.95 1.45 1.95 2.45 3.45 4.45 5.45 ];
% micromanometerP20 = [85.5 74.5 66.2	59.9 52.5 40 29 20.5];
% transmitterP20 = [154.6	132.6 118 104.3	90.2 66.7 45.9 30.2];

%实验过程中通过计算出来的、不变的数据
airDensity = 1.123; %空气密度
staticPressure =0.5*(staticPressure0+staticPressure1) ; %流场静压取平均
x1 = x10 * 0.001;
y1 = y10 * 0.001;
x2 = x20 * 0.001;
y2 = y20 * 0.001;
velocityInf1 = 20.08;    %V无穷
velocityInf2 = 20.11;    %V无穷

micromanometerP1 = atmosphericPressure - micromanometerP10 * gearFactor * waterdensity * g * 0.001;
transmitterP1 = atmosphericPressure - transmitterP10;
micromanometerP2 = atmosphericPressure - micromanometerP20 * gearFactor * waterdensity * g * 0.001;
transmitterP2 = atmosphericPressure - transmitterP20;

%对第一截面数据进行处理
fprintf('>>>>>>>>>>**第一截面数据计算**<<<<<<<<<<\n');
Re1 = (velocityInf1 * x1) / (KVC * 1e-7);
fprintf('=>雷诺数 Re1= %.3f\n',Re1);

micromanometerVelocity1 = zeros(1,length(micromanometerP1));
for i=1:length(micromanometerP10)
    micromanometerVelocity1(i) =(2*g*gearFactor*(130-micromanometerP10(i))/1000*(waterdensity-airDensity)/1.123)^0.5;
end
% fprintf('=>用微压计测量的数据计算得到的边界层内的流速:(m/s)\n');
% disp(micromanometerVelocity1);
transmitterVelocity1 = zeros(1,length(transmitterP1));
for i=1:length(transmitterP10)
    transmitterVelocity1(i) =(2*(staticPressure1-transmitterP10(i))/airDensity)^0.5;
end
% fprintf('=>用压差变送器测量的数据计算得到的边界层内的流速:(m/s)\n');
% disp(transmitterVelocity1);
micromanometerVelocityRatio1 = micromanometerVelocity1 / velocityInf1;
% fprintf('=>用微压计测量的数据计算得到的边界层内的速度比:\n');
% disp(micromanometerVelocityRatio1);
transmitterVelocityRatio1 = transmitterVelocity1 / velocityInf1;
% fprintf('=>用压差变送器测量的数据计算得到的边界层内的速度比:\n');
% disp(transmitterVelocityRatio1);

%对第二截面数据进行处理
fprintf('>>>>>>>>>>**第二截面数据计算**<<<<<<<<<<\n');
Re2 = (velocityInf2 * x2) / (KVC * 1e-7);
fprintf('=>雷诺数 Re2= %.3f\n',Re2);

micromanometerVelocity2 = zeros(1,length(micromanometerP20));
for i=1:length(micromanometerP20)
    micromanometerVelocity2(i) =(2*g*gearFactor*(130-micromanometerP20(i))/1000*(waterdensity-airDensity)/1.123)^0.5;
end
% fprintf('=>用微压计测量的数据计算得到的边界层内的流速:(m/s)\n');
% disp(micromanometerVelocity2);
transmitterVelocity2 = zeros(1,length(transmitterP20));
for i=1:length(transmitterP20)
    transmitterVelocity2(i) = (2*(staticPressure1-transmitterP20(i))/airDensity)^0.5;
end
% fprintf('=>用压差变送器测量的数据计算得到的边界层内的流速:(m/s)\n');
% disp(transmitterVelocity2);
micromanometerVelocityRatio2 = micromanometerVelocity2 / velocityInf2;
% fprintf('=>用微压计测量的数据计算得到的边界层内的速度比:\n');
% disp(micromanometerVelocityRatio2);
transmitterVelocityRatio2 = transmitterVelocity2 / velocityInf2;
% fprintf('=>用压差变送器测量的数据计算得到的边界层内的速度比:\n');
% disp(transmitterVelocityRatio2);

%数据可视化
figure; %第一截面
hold on;grid on;
plot(micromanometerVelocityRatio1,y1,'o','markersize',mks); %微压计测量所得数据点
plot(transmitterVelocityRatio1,y1,'p','markersize',mks); %压差变送器测量所得数据点

micromanometerT1 = 0.62 : 0.01 : 0.99;
micromanometerU1 = spline(micromanometerVelocityRatio1,y1,micromanometerT1);
micromanometerBLT1 = spline(micromanometerVelocityRatio1,y1,0.99); %Boundary layer thickness
fprintf('=>用微压计测量得出的边界层厚度为:%.3f mm\n',micromanometerBLT1 * 1000);
plot(micromanometerT1,micromanometerU1,'-.','linewidth',lw1); %微压计测量拟合曲线。

transmitterT1 = 0.65 : 0.01 : 0.99;
transmitterU1 = spline(transmitterVelocityRatio1,y1,transmitterT1);
transmitterBLT1 = spline(transmitterVelocityRatio1,y1,0.99);
fprintf('=>用压差变送器测量得出的边界层厚度为:%.3f mm\n',transmitterBLT1 * 1000);
plot(transmitterT1,transmitterU1,'--','linewidth',lw1); %压差变送器测量拟合曲线

micromanometerY1 = 0 : 0.00001 : transmitterBLT1;
micromanometerX1 = ((3 * micromanometerY1 - (micromanometerY1.^3) / (transmitterBLT1^2))...
    / (2 * transmitterBLT1));
plot(micromanometerX1,micromanometerY1,'b-','linewidth',lw2); %层流理论曲线

transmitterY1 = 0 : 0.00001 : transmitterBLT1;
transmitterX1 = (transmitterY1 / transmitterBLT1).^(1/7);
plot(transmitterX1,transmitterY1,'r-','linewidth',lw2); %紊流理论曲线

title('第一截面边界层速度分布曲线');
xlabel('速度比','FontSize',12,'FontWeight','bold');
ylabel('离平板壁面距离 y(m)','FontSize',12,'FontWeight','bold');
axis tight;
legend('微压计测量所得数据点','压差变送器测量所得数据点','微压计测量拟合曲线','压差变送器测量拟合曲线',...
    '层流理论曲线','紊流理论曲线','location','northwest');

figure; %第二截面
hold on;grid on;
plot(micromanometerVelocityRatio2,y2,'o','markersize',mks); %微压计测量所得数据点
plot(transmitterVelocityRatio2,y2,'p','markersize',mks); %压差变送器测量所得数据点

micromanometerT2 = 0.62 : 0.01 : 0.99;
micromanometerU2 = spline(micromanometerVelocityRatio2,y2,micromanometerT2);
micromanometerBLT2 = spline(micromanometerVelocityRatio2,y2,0.99);
fprintf('=>用微压计测量得出的边界层厚度为:%.3f mm\n',micromanometerBLT2 * 1000);
plot(micromanometerT2,micromanometerU2,'-.','linewidth',lw1); %微压计测量拟合曲线
transmitterT2 = 0.62 : 0.01 : 0.99;

transmitterU2 = spline(transmitterVelocityRatio2,y2,transmitterT2);
transmitterBLT2 = spline(transmitterVelocityRatio2,y2,0.99);
fprintf('=>用压差变送器测量得出的边界层厚度为:%.3f mm\n',transmitterBLT2 * 1000);
plot(transmitterT2,transmitterU2,'--','linewidth',lw1); %压差变送器测量拟合曲线

micromanometerY2 = 0:0.00001 : transmitterBLT2;
micromanometerX2 = ((3 * micromanometerY2 - (micromanometerY2.^3) / (transmitterBLT2^2)))...
    / (2*transmitterBLT2);
plot(micromanometerX2,micromanometerY2,'b-','linewidth',lw2); %层流理论曲线

transmitterY2 = 0 : 0.00001 : transmitterBLT2;
transmitterX2 = (transmitterY2 / transmitterBLT2).^(1/7);
plot(transmitterX2,transmitterY2,'r-','linewidth',lw2); %紊流理论曲线

title('第二截面边界层速度分布曲线');
xlabel('速度比','FontSize',12,'FontWeight','bold');
ylabel('离平板壁面距离 y(m)','FontSize',12,'FontWeight','bold');
axis tight;
legend('微压计测量所得数据点','压差变送器测量所得数据点','微压计测量拟合曲线','压差变送器测量拟合曲线',...
    '层流理论曲线','紊流理论曲线','location','northwest');

%流态分析
fprintf('>>>>>>>>>>**流态分析**<<<<<<<<<<\n');
fprintf('一、对第一截面:\n');

sigmaLin1=5 * sqrt((KVC * 1e-7 * x1) / velocityInf1);display(sigmaLin1*1000);
sigmaTu1=0.37 * x1 * ((KVC * 1e-7) / (velocityInf1 * x1))^0.2;display(sigmaTu1*1000);

fprintf('二、对第二截面:\n');
sigmaLin2=5 * sqrt((KVC * 1e-7 * x2) / velocityInf2);display(sigmaLin2*1000);
sigmaTu2=0.37 * x2 * ((KVC * 1e-7) / (velocityInf2 * x2))^0.2;display(sigmaTu2*1000);
2 Likes

非常好工作 :kissing_closed_eyes:

:heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes: