徳城余市総合研究所トップページへ戻る

マッハ数(M)と偏角(Theta,deg)を与えて衝撃波角(Beta,deg)を計算


Octaveスクリプトファイル名:ThtoBe.m
-----------------------------------------------------------
# マッハ数(M)と偏角(Theta,deg)を与えて衝撃波角(Beta,deg)を計算
# 適用範囲:M=2〜10程度
# ーーー定数ーーー
k=1.4;
# ーーー入力ーーー
M=input("Input:M=");
Theta=input("Input:Theta(deg)=");
#  ーーー計算ーーー
Ti=Theta*pi/180;
j=1.05/M+0.5*Ti;
Theta=atan((2*cot(j)*((M*sin(j))^2-1))/(M^2*(k+cos(2*j))+2));
while abs(Ti-Theta)>0.000001
j=j+0.5*(Ti-Theta);
Theta=atan((2*cot(j)*((M*sin(j))^2-1))/(M^2*(k+cos(2*j))+2));
endwhile
Beta=j*180/pi;
# ーーー出力ーーー
disp("Beta(deg)=")
disp(Beta)
-----------------------------------------------------------

(MM20120814)