How to find the actual value of d,b,t and D in the maximum value of sac?
1 回表示 (過去 30 日間)
古いコメントを表示
close all
clear all
clc
% Constants
c = 340; % Speed of sound
rho = 1.204; % Air Density
n = 1.825e-5; % dynamics viscosity
w = 3000*pi;
% Loop
for d=1:1:10
for t=50:10:200
for b=10:10:200
for D=10:10:800
sac(d,t,b,D) = (4*(32*n.*(t*10^-4)/((78.5*(d*10^-4).^2/(b*10^-4).^2)*rho*c*(d*10^-4).^2))*((sqrt(1+((d*10^-4)*sqrt(w*rho/(4*n)).^2/32)))+((sqrt(2)/32)*(d*10^-4)*sqrt(w*rho/(4*n))*(d*10^-4)./(t*10^-4))))./(((1+(32*n.*(t*10^-4)/((78.5*(d*10^-4).^2/(b*10^-4).^2)*rho*c*(d*10^-4).^2))*((sqrt(1+((d*10^-4)*sqrt(w*rho/(4*n)).^2/32)))+((sqrt(2)/32)*(d*10^-4)*sqrt(w*rho/(4*n))*(d*10^-4)./(t*10^-4)))).^2)+((w.*(t*10^-4))/((78.5*(d*10^-4).^2/(b*10^-4).^2)*c).*(1+(1./(sqrt(3^2+(((d*10^-4)*sqrt(w*rho/(4*n)).^2)/2))))+(0.85*((d*10^-4)./(t*10^-4))))-cot(w*(D*10^-4)/c)).^2);
end
end
end
end
M = max(sac(:));
0 件のコメント
回答 (1 件)
Torsten
2022 年 11 月 27 日
編集済み: Torsten
2022 年 11 月 27 日
close all
clear all
clc
% Constants
c = 340; % Speed of sound
rho = 1.204; % Air Density
n = 1.825e-5; % dynamics viscosity
w = 3000*pi;
% Loop
sacmax = -Inf;
indmax = zeros(1,4);
for d=1:1:10
for t=50:10:200
for b=10:10:200
for D=10:10:800
sac = (4*(32*n.*(t*10^-4)/((78.5*(d*10^-4).^2/(b*10^-4).^2)*rho*c*(d*10^-4).^2))*((sqrt(1+((d*10^-4)*sqrt(w*rho/(4*n)).^2/32)))+((sqrt(2)/32)*(d*10^-4)*sqrt(w*rho/(4*n))*(d*10^-4)./(t*10^-4))))./(((1+(32*n.*(t*10^-4)/((78.5*(d*10^-4).^2/(b*10^-4).^2)*rho*c*(d*10^-4).^2))*((sqrt(1+((d*10^-4)*sqrt(w*rho/(4*n)).^2/32)))+((sqrt(2)/32)*(d*10^-4)*sqrt(w*rho/(4*n))*(d*10^-4)./(t*10^-4)))).^2)+((w.*(t*10^-4))/((78.5*(d*10^-4).^2/(b*10^-4).^2)*c).*(1+(1./(sqrt(3^2+(((d*10^-4)*sqrt(w*rho/(4*n)).^2)/2))))+(0.85*((d*10^-4)./(t*10^-4))))-cot(w*(D*10^-4)/c)).^2);
if sac > sacmax
sacmax = sac;
indmax = [d,t,b,D];
end
end
end
end
end
sacmax
indmax
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!