Area Mach Number Relation

9 次查看(过去 30 天)
Steven Castrillon
Steven Castrillon 2019-9-30
I need to plot Mach number (M) as a function of Area ratios (A/A*) for subsonic and supersonic cases. I am trying to use newton-raphson method to iterate and find a converging solution for Mach number (M) at specific area ratios (A/A*), however i would like to be able to call in an array of A/A* inputs. The values for this array would from 0.1 to 10 (or 0.1:0.1:10) .
The function in question is
@(M) (1/M^2)*(((2+gm1*M^2)/gp1)^(gp1/gm1))-ARatio^2;
the variables for this function are;
g = 1.4;
gm1 = g-1;
gp1 = g+1;
Any help would be greatly appreciated!!!

回答(1 个)

darova
darova 2019-9-30
Here is what i reached using polyxpoly
g = 1.4;
gm1 = g-1;
gp1 = g+1;
F = @(M) 1./M.^2.*((2+gm1*M.^2)/gp1).^(gp1/gm1);%-ARatio^2;
M = linspace(0.1,3.5); % Mach number
A = sqrt( F(M) ); % A ratio
plot(M,A) % draw function
hold on
% find Mach number of each A
for a = linspace(0.1,5,10)
mm = [0 4]; % just horizontal line
aa = [a a];
[xm,ya] = polyxpoly(mm,aa,M,A);
plot(xm,ya,'.-r')
end
hold off
  5 个评论
Steven Castrillon
Steven Castrillon 2019-9-30
yes but can you please help me to introduce an array of values for ARatio?
in the code i provided, ARatio is set as : ARatio = 1.5
when i set it as: ARatio = [0.1:0.1:10] i get an error at
Error in AREAMACH2 (line 62)
if (fj*fjp1 > 0)
Please help

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by