Area Mach Number Relation

8 views (last 30 days)
Steven Castrillon
Steven Castrillon on 30 Sep 2019
Commented: Steven Castrillon on 30 Sep 2019
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!!!

Answers (1)

darova
darova on 30 Sep 2019
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 Comments
darova
darova on 30 Sep 2019
I like it
Steven Castrillon
Steven Castrillon on 30 Sep 2019
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

Sign in to comment.

Categories

Find more on Performance and Memory in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!